I'm using CAMERA2 API and meanwhile developing an application without any errors the application will run superbly. But after recording some chunks of clips it shows above mentioned error.
This is my approach,
1.Open the camera using cameraManager
class and then set video preview into texture field
- After we started to record video it will break according to given time and instantly it will start record again and it will continuously create chunks of videos until user stopped the recording
Without any issues, it creates many(around 200-300) camera sessions. But suddenly it occurs below error. I've given some times to set up the camera sessions and release those sessions using Timer
class and TimerSchdule
class.
I've read this, and here, and here for extract what are the exactly happens. Thought needs some further help.
What I want to know is
What is this error says?
generally, why those errors occur in
EDIT :
error --->>>>
10-11 12:20:58.966 27862-27988/? E/CameraDeviceGLThread-0: Received exception on GL render thread:
java.lang.IllegalStateException: glDrawArrays: GLES20 error: 0x505
at android.hardware.camera2.legacy.SurfaceTextureRenderer.checkGlError(SurfaceTextureRenderer.java:537)
at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawFrame(SurfaceTextureRenderer.java:346)
at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawIntoSurfaces(SurfaceTextureRenderer.java:726)
at android.hardware.camera2.legacy.GLThreadManager$1.handleMessage(GLThreadManager.java:105)