RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.52k
stars
770
forks
source link
UnsupportedOperationException: eglCreateWindowSurface() Android 4.1.1 on swith camera or stop #5
Hi!
I tried to use your library in project and found few bugs.
One of them:
Problem device: ASUS Padfone 2 with Android 4.1.1 (API 16)
App crashes on camera switch or stop streaming.
Exception:
java.lang.UnsupportedOperationException: eglCreateWindowSurface() can only be called with an instance of SurfaceView, SurfaceHolder or SurfaceTexture at the moment, this will be fixed later.
In Camera1ApiManager.clearSurface() method
My solution change argument of this method from Surface to SurfaceHolder:
Hi! I tried to use your library in project and found few bugs. One of them:
Problem device: ASUS Padfone 2 with Android 4.1.1 (API 16)
App crashes on camera switch or stop streaming. Exception: java.lang.UnsupportedOperationException: eglCreateWindowSurface() can only be called with an instance of SurfaceView, SurfaceHolder or SurfaceTexture at the moment, this will be fixed later. In Camera1ApiManager.clearSurface() method
My solution change argument of this method from Surface to SurfaceHolder:
I am not expert in video streaming, but I hope you wil use my solution to do your library better.
This fix works fine on all my devices:
ASUS Padfone 2 with Android 4.1.1 (API 16) Samsung Galaxy Tab Pro with Android 4.4.2 Nexus 5 with Android 6.0.1