googlearchive/android-Camera2Video

E/CameraDeviceGLThread-0: Received exception on GL render thread

Closed this issue · 4 comments

E/CameraCaptureSession: Session 1: Exception while stopping repeating:
android.hardware.camera2.CameraAccessException: The camera device has encountered a serious error
at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2000)
at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:913)
at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:378)
at com.example.android.camera2video.Camera2VideoFragment.closePreviewSession(Camera2VideoFragment.java:672)
at com.example.android.camera2video.Camera2VideoFragment.startPreview(Camera2VideoFragment.java:494)
at com.example.android.camera2video.Camera2VideoFragment.stopRecordingVideo(Camera2VideoFragment.java:692)
at com.example.android.camera2video.Camera2VideoFragment.onClick(Camera2VideoFragment.java:312)
at android.view.View.performClick(View.java:5207)
at android.view.View$PerformClick.run(View.java:21177)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

FIX: add the following code as the first line in the method Camera2VideoFragment::stopRecordingVideo()

try {
mPreviewSession.stopRepeating();
} catch (CameraAccessException e) {
e.printStackTrace();
}

it's doesn't work

@madhurgoel what about E/MediaRecorder: stop failed: -1007 ?

#86

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!