Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video recording unsupported on API<23 #612

Open
aforcier opened this issue Nov 21, 2020 · 0 comments
Open

Video recording unsupported on API<23 #612

aforcier opened this issue Nov 21, 2020 · 0 comments
Labels
[Type] Crash The app stops unexpectedly.

Comments

@aforcier
Copy link
Collaborator

I was looking at restoring the RECORD_AUDIO permission (#489, initially removed for API<23 in #488 to not prompt those users for a permission for an unreleased feature).

After restoring the permission however, I get this crash when recording video on API 21 or 22 devices:

com.automattic.loop E/AndroidRuntime: FATAL EXCEPTION: CameraX-video encoding thread
    Process: com.automattic.loop, PID: 8839
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
        at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
        at androidx.camera.core.VideoCapture.videoEncode(VideoCapture.java:604)
        at androidx.camera.core.VideoCapture$2.run(VideoCapture.java:348)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.os.HandlerThread.run(HandlerThread.java:61)

Some research suggests that updating CameraX might help either resolve the issue or handle it better (I'm not sure which is the case).

We want to update CameraX when we can anyway (#197), though probably not in time for initial release.

For now (initial release) I suggest we do nothing. If we don't add the RECORD_AUDIO permission for API 21/22, attempting to record a video just fails silently. This is better than a crash or a rushed CameraX update that may cause bigger issues on all API levels.

@aforcier aforcier added the [Type] Crash The app stops unexpectedly. label Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Crash The app stops unexpectedly.
Projects
None yet
Development

No branches or pull requests

1 participant