Including/excluding audio requires restarting the camera (rebinding)

48 views
Skip to first unread message
Assigned to leoh...@google.com by wuj...@google.com

Mohit Shetty

unread,
Oct 26, 2021, 6:29:43 AM10/26/21
to Android CameraX Discussion Group
In the camera application I'm working on, I have implemented an option to include/exclude audio from the video recording the user captures.

Ideally, since I'm calling `withAudioEnabled()` on a fresh `PendingRecording` instance, it should be off by default and should only include audio if  `withAudioEnabled()` gets called on it, however once the audio gets enabled it continues to remain enabled until the camera is restarted even on a fresh `PendingRecording` instance.

To reproduce this issue one could comment out this line and test the app and then try testing the app after uncommenting it to get a clearer idea of the issue:

(The include audio option will be present in the settings when in video mode)

If this is how it was meant to be or if this config can't be changed without restarting the camera, you'll could maybe try re-locating the `withAudioEnabled()` method to the `VideoCapture` or `Recorder` class (not sure how technically feasible would it be though). However, if the config. can be changed without restarting the camera then we could either add a way to disable it or maybe turn it off by default while preparing a new recording.

Hope this issue gets resolved soon.

Thanks a lot in advance.

Regards,
Mohit

Leo Huang

unread,
Oct 26, 2021, 11:26:47 AM10/26/21
to Android CameraX Discussion Group, shetty...@gmail.com
Thank you for reporting it, this is a bug. The behavior should be what you expect. Audio settings should follow each `PendingReocrding`.


shetty...@gmail.com 在 2021年10月26日 星期二下午6:29:43 [UTC+8] 的信中寫道:

Mohit Shetty

unread,
Oct 26, 2021, 12:10:37 PM10/26/21
to Android CameraX Discussion Group, leoh...@google.com, Mohit Shetty
Thanks a lot for considering this issue. Hope it soon gets resolved!
Reply all
Reply to author
Forward
0 new messages