Now our application can easily capture 360 image from theta S,V, but there is some preview issues in SC2. sometime it works and sometime it doesn’t, so how we can resolve this issue?
While we debug the code we find out that we got exception on readMJpegFrame() in MJpegInputStream and this method calls from MJpegView like bitmap = mMJpegInputStream.readMJpegFrame();
showing it is working on SC2 on Android, Google Pixel
Example streaming from SC2 to Windows using same code
Article explaining what needs to be done
Example working with Flutter
It’s a bit old. I had intended to update and improve it, but I never got around to it. I recently tested it and it does work with the older version of Flutter and .Dart. From the commits, it looks like the last time I updated it was Aug, 2020.
Thanks @craig for reply, but we used sdk for theta camera S, V and later and we used below method for live preview and its work for theta V but doen’t work for SC2
The SDK you are using is broken on the SC2, but works on the S, V, Z1. To get it to work on the SC2, you need to repeatedly send the getLivePreview command again with the API whenever you get an EOF exception.
We can solved it by using our own logic for retry the LivePreview command again, once the preview fire the EOFException then we can catch it and fire the same command again after minor delay i.e. 0.5 second. It means you can fire command after 0.5 seconds when your first command failed.