Thanks a lot for officially releasing the video capture library....the pause/resume option and video quality option addition, will help making our camera apps a lot better for our users.
I recently tried replacing the old video capture api with the new one and noticed two major issues...
1. Unlike the previous API, there wasn't any proper mechanism for error handling...when the video gets saved. So it's hard to know what actually went wrong when a video doesn't get saved. E.g. Sometimes the recording is too is too short to be saved, so the earlier API had an option to handle that well with the onError callback which passed an message, error code and throwable, which made debugging the issue and displaying an appropriate message to the user a lot more easier. I tried stopping the recording as soon as I started and found that using a try-catch doesn't really help (at least in this case), and my app just crashes when it manually tries to generate a thumbnail for the recording that is assumed to be saved (locally storing the video uri from output options for now).
This issue could be handled by checking if the generated file exists or not, but handling video capture uri sent by another app could get a lot more tricker.
2. I get these logs after calling stop() on an ActiveRecording. Not sure if it is something to be concerned about..
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
E/BufferQueueConsumer: [GraphicBufferSource](id:457700000005,api:4,p:1022,c:17783) acquireBuffer: max acquired buffer count reached: 17 (max 16)
W/GraphicBufferSource: acquireBuffer_l: failed with err=-38
E/GraphicBufferSource: onFrameAvailable: acquireBuffer returned err=-38
Bringing this library out might have been a lot of work and I really appreciate the efforts taken by the CameraX team :)