googlearchive/android-Camera2Video

Coloured Preview, 1-second recording, and crashed when pressing stop button

Closed this issue · 2 comments

I tested the code on Huawei Honor 5C. There are 3 issues:

  • Preview was layered by transparent Blue color (it only happened once)
  • Recording only runs for 1 second and then it freezes
  • When pressing stop button, it's crashed with this stacktrace
    07-25 16:51:42.200 4726-4726/com.example.android.camera2video E/MediaRecorder: stop failed: -1007
    07-25 16:51:42.211 4726-4726/com.example.android.camera2video E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.android.camera2video, PID: 4726
    java.lang.RuntimeException: stop failed.
    at android.media.MediaRecorder.native_stop(Native Method)
    at android.media.MediaRecorder.stop(MediaRecorder.java:1236)
    at com.example.android.camera2video.Camera2VideoFragment.stopRecordingVideo(Camera2VideoFragment.java:682)
    at com.example.android.camera2video.Camera2VideoFragment.onClick(Camera2VideoFragment.java:312)
    at android.view.View.performClick(View.java:5646)
    at android.view.View$PerformClick.run(View.java:22459)
    at android.os.Handler.handleCallback(Handler.java:761)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:156)
    at android.app.ActivityThread.main(ActivityThread.java:6523)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

plz reffer to issue #57

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!