iOS Question Problems with the "MJPEG decoder"

D

Deleted member 103

Guest
Hi,
I have problems with the MJPEG decoder, in the new iOS version was changed by Apple something so this decoder stops working.

With this example I can receive the pictures from the example MJPEG / CCTV Server.

After the connection, however, only the first picture is displayed and the transfer is terminated.

Can someone confirm that? If yes, is there a solution?
 

Attachments

  • Decoder.zip
    171 KB · Views: 191

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've tested it with an Android device running CCTV server and this B4i program:

B4X:
Sub Process_Globals
   Public App As Application
   Public NavControl As NavigationController
   Private Page1 As Page
   Private ImageView1 As ImageView
   Private mj1 As MJPEG
End Sub

Private Sub Application_Start (Nav As NavigationController)
   NavControl = Nav
   Page1.Initialize("Page1")
   Page1.Title = "Page 1"
   Page1.RootPanel.LoadLayout("1")
   NavControl.ShowPage(Page1)
   mj1.Initialize(Me, "mj1")
   mj1.Connect("192.168.0.7/", 51042)
End Sub

It works properly in release mode. You can also get it working in debug mode if you reduce the frames per second on the Android device.

Tested on iPhone 8 running OS 11.3.
 
Upvote 0
D

Deleted member 103

Guest
It works with Android and iOS, but not with iOS and iOS devices.
Look at the time in the 2 pictures.

20180515_212141.jpg


20180515_212703.jpg
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Does it work with other mjpeg streams, not created with B4X MJPEG server?
It works with all, but only with iOS version smaller than 11.

I've tested it with an Android device running CCTV server and this B4i program:
It works with Android and iOS, but not with iOS and iOS devices.


You must include all the relevant information when you post questions. It takes time to configure the test environment. Sorry but I cannot further help you here.
 
Upvote 0
D

Deleted member 103

Guest
I beg your pardon, but to explain, and also in English, is very difficult for me. :(

Try the following with 2 iPhone / iPad with iOS 11+:
1) The "CCTV server" on iPhone or iPad
2) Connect and test the client with Safari or other browsers, or the client with my code (see first post) test.

If the client is an iPhone with iOS 10, then everything works.

Erel, but if you do not feel like testing any more, which I can understand, then let it stay, I do not mind.
 
Upvote 0
D

Deleted member 103

Guest
You will need to debug it. Things that you should try:
1. Reduce the frame rate in the server.
2. Add some log messages to the client to see whether NewData is raised.
3. Make sure to test in release mode.

OK, I have already tried points 1 and 3, unfortunately without success; I'll try point 2 now.
 
Upvote 0
D

Deleted member 103

Guest
Hi Erel,

please try your example MJPEG / CCTV Server like this:
1.Test:
1) Start your "MJPEG / CCTV Server" on an iPad / iPhone with iOS 11+
2) Start a browser (Safari or others) on another iPad / iPhone with iOS 11+ and connect.
Result: it does not work for me. :(

2.Test:
1) Start your "MJPEG / CCTV Server" on an iPad / iPhone with iOS 11+
2) Start a browser (Safari or others) on another iPad / iPhone with iOS 10 and connect.
Result: I work very well. :)

3.Test:
1) Start your "MJPEG / CCTV Server" on an iPad / iPhone with iOS 11+
2) Launch a browser on an Android device and connect.
Result: I work very well. :)

4.Test:
1) Start your "MJPEG / CCTV Server" on an Android device
2) Start a browser on an iPad / iPhone with iOS 11+ and connect.
Result: it does not work for me. :(

5.Test:
1) Start your "MJPEG / CCTV Server" on an Android device
2) Start a browser on an iPad / iPhone with iOS 10 and connect.
Result: I work very well. :)

These tests prove that something has been changed in iOS 11+, which makes the whole thing no longer work.

2. Add some log messages to the client to see whether NewData is raised.
I have done this test, unfortunately I could not observe anything extraordinary.:(
 
Upvote 0
D

Deleted member 103

Guest
Don't use the browser at all. Use mjpeg decoder. I tested it by running the server on an Android device (it doesn't matter where you run it) and the decoder on an iOS 11.3 device and it worked fine.
I'm sorry Erel, but the decoder behaves exactly like the browser.
I did these tests just so you do not have to waste so much time.

But fine, if it works for you, then it may be on my network or my devices are scrap. :(

Nevertheless, many thanks for your time. :)
 
Upvote 0

Similar Threads

Top