google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

Flaky capturing #27

Open Ghedeon opened 8 years ago

Ghedeon commented 8 years ago

Not every single click results in onPictureTaken() callback.

I'm not talking about throttling when you click too fast, as you can see, it's enough time between clicks. It's just skipped randomly.

OnePlus One, 6.0.1

TL;DR of this log: Capture, Skip, Capture

18:30:24.111 D/MainActivity: onClick: 18:30:24.158 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:24.158 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.158 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.211 D/LegacyFocusStateMapper: onAutoFocusMoving - ignoring move callbacks from old af run1 18:30:24.213 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:24.213 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.213 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.269 I/RequestQueue: Repeating capture request cancelled. 18:30:24.302 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:24.303 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.303 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.883 I/RequestThread-0: Received jpeg. 18:30:24.884 I/RequestThread-0: Producing jpeg buffer... 18:30:24.887 D/ImageReader_JNI: ImageReader_lockedImageSetup: Receiving JPEG in HAL_PIXEL_FORMAT_RGBA_8888 buffer. 18:30:24.889 D/MainActivity: onPictureTaken 1026780 18:30:24.922 I/RequestQueue: Repeating capture request set. 18:30:24.924 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:24.924 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:24.924 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:25.053 D/LegacyFocusStateMapper: onAutoFocusMoving - ignoring move callbacks from old af run2 18:30:25.155 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:25.155 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:25.157 W/LegacyRequestMapper: Only received metering rectangles with weight 0.

18:30:29.720 D/MainActivity: onClick: 18:30:29.771 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:29.772 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:29.772 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:29.796 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:29.796 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:29.796 W/LegacyRequestMapper: Only received metering rectangles with weight 0.

18:30:36.730 D/MainActivity: onClick: 18:30:36.796 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:36.796 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:36.796 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:36.818 D/LegacyFocusStateMapper: onAutoFocusMoving - ignoring move callbacks from old af run4 18:30:36.872 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:36.872 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:36.872 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:36.873 I/RequestQueue: Repeating capture request cancelled. 18:30:36.941 W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 18:30:36.941 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:36.941 W/LegacyRequestMapper: Only received metering rectangles with weight 0. 18:30:37.702 I/RequestThread-0: Received jpeg. 18:30:37.702 I/RequestThread-0: Producing jpeg buffer... 18:30:37.703 D/ImageReader_JNI: ImageReader_lockedImageSetup: Receiving JPEG in HAL_PIXEL_FORMAT_RGBA_8888 buffer. 18:30:37.704 D/MainActivity: onPictureTaken 1022546

Ghedeon commented 8 years ago

Looks like same issue is already reported for the official Camera2Basic sample app: https://github.com/googlesamples/android-Camera2Basic/issues/33

aseem-khare commented 6 years ago

The issue is with your android device. The devices that do not support auto focus throw this error. You need to disable auto focus to get rid of this error.