You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when it pauses/back button, I get the following fatal exception:
2019-12-15 22:17:14.573 29392-29392/com.myapp.app E/MessageQueue-JNI: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1448) at com.android.org.conscrypt.Platform.blockGuardOnNetwork(Platform.java:325) at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:724) at com.android.okhttp.okio.Okio$2.read(Okio.java:142) at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:218) at com.android.okhttp.okio.RealBufferedSource.read(RealBufferedSource.java:56) at com.android.okhttp.internal.http.Http1xStream$ChunkedSource.read(Http1xStream.java:886) at com.android.okhttp.internal.Util.skipAll(Util.java:159) at com.android.okhttp.internal.Util.discard(Util.java:141) at com.android.okhttp.internal.http.Http1xStream$ChunkedSource.close(Http1xStream.java:919) at com.android.okhttp.okio.RealBufferedSource.close(RealBufferedSource.java:402) at com.android.okhttp.okio.RealBufferedSource$1.close(RealBufferedSource.java:390) at java.io.BufferedInputStream.close(BufferedInputStream.java:485) at java.io.FilterInputStream.close(FilterInputStream.java:181) at com.github.niqdev.mjpeg.MjpegViewDefault._stopPlayback(MjpegViewDefault.java:276) at com.github.niqdev.mjpeg.MjpegViewDefault.stopPlayback(MjpegViewDefault.java:417) at com.github.niqdev.mjpeg.MjpegSurfaceView.stopPlayback(MjpegSurfaceView.java:134) at com.myapp.app.fragments.CameraViewFragment.onPause(CameraViewFragment.java:108)
I don't know if this causes the following problem:
When I view a mjpeg stream and I go back. I re-view the mjpeg stream, the fps drops. The more I go back and re-view the mjpeg stream, the more the fps drops until it becomes unwatchable.
The text was updated successfully, but these errors were encountered:
I think I found the solution.
I run the mjpegView.stopPlayback() in a thread. There is no more the fatal exception and there's no more the FPS drop issue.
I am using the same code as the sample app :
https://github.com/niqdev/ipcam-view/blob/master/app/src/main/java/com/github/niqdev/ipcam/IpCamDefaultActivity.java
i.e. stopPlayback onPause
But when it pauses/back button, I get the following fatal exception:
2019-12-15 22:17:14.573 29392-29392/com.myapp.app E/MessageQueue-JNI: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1448) at com.android.org.conscrypt.Platform.blockGuardOnNetwork(Platform.java:325) at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:724) at com.android.okhttp.okio.Okio$2.read(Okio.java:142) at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:218) at com.android.okhttp.okio.RealBufferedSource.read(RealBufferedSource.java:56) at com.android.okhttp.internal.http.Http1xStream$ChunkedSource.read(Http1xStream.java:886) at com.android.okhttp.internal.Util.skipAll(Util.java:159) at com.android.okhttp.internal.Util.discard(Util.java:141) at com.android.okhttp.internal.http.Http1xStream$ChunkedSource.close(Http1xStream.java:919) at com.android.okhttp.okio.RealBufferedSource.close(RealBufferedSource.java:402) at com.android.okhttp.okio.RealBufferedSource$1.close(RealBufferedSource.java:390) at java.io.BufferedInputStream.close(BufferedInputStream.java:485) at java.io.FilterInputStream.close(FilterInputStream.java:181) at com.github.niqdev.mjpeg.MjpegViewDefault._stopPlayback(MjpegViewDefault.java:276) at com.github.niqdev.mjpeg.MjpegViewDefault.stopPlayback(MjpegViewDefault.java:417) at com.github.niqdev.mjpeg.MjpegSurfaceView.stopPlayback(MjpegSurfaceView.java:134) at com.myapp.app.fragments.CameraViewFragment.onPause(CameraViewFragment.java:108)
I don't know if this causes the following problem:
When I view a mjpeg stream and I go back. I re-view the mjpeg stream, the fps drops. The more I go back and re-view the mjpeg stream, the more the fps drops until it becomes unwatchable.
The text was updated successfully, but these errors were encountered: