diff options
author | Emilian Peev <epeev@google.com> | 2020-04-29 12:24:54 -0700 |
---|---|---|
committer | Emilian Peev <epeev@google.com> | 2020-04-29 12:24:54 -0700 |
commit | cef89853e411df195a435970ce314d3783d29c9f (patch) | |
tree | b4d26b41af964c8bb6ab6cdf89485c452ee824b7 | |
parent | dceae19f124d6133bc74931a1990c4264007a888 (diff) | |
download | Camera2-cef89853e411df195a435970ce314d3783d29c9f.tar.gz |
Camera2: Set appropriate template for pre-capture
The pre-capture sequence as well as the repeating
request after still image capture must use an
appropriate capture template.
The current still capture defaults are not ideally
suited for a repeating request. The settings can
introduce extra latency and other side effects.
Bug: 146758760
Test: Manual using application
Change-Id: I3a52a4726be73b221f51bece74b23002668289cf
-rw-r--r-- | src/com/android/camera/one/v2/photo/PictureTakerFactory.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/camera/one/v2/photo/PictureTakerFactory.java b/src/com/android/camera/one/v2/photo/PictureTakerFactory.java index 68ca5a752..97dd60482 100644 --- a/src/com/android/camera/one/v2/photo/PictureTakerFactory.java +++ b/src/com/android/camera/one/v2/photo/PictureTakerFactory.java @@ -48,14 +48,16 @@ public final class PictureTakerFactory { // performs the AF & AE precapture sequence. ImageCaptureCommand flashOnCommand = new ConvergedImageCaptureCommand( sharedImageReader, frameServer, rootRequestBuilder, - CameraDevice.TEMPLATE_STILL_CAPTURE, CameraDevice.TEMPLATE_STILL_CAPTURE, + CameraDevice.TEMPLATE_PREVIEW /* repeatingRequestTemplate */, + CameraDevice.TEMPLATE_STILL_CAPTURE /* stillCaptureRequestTemplate */, Arrays.asList(rootRequestBuilder), true /* ae */, true /* af */); // When flash is OFF, wait for AF convergence, but not AE convergence // (which can be very slow). ImageCaptureCommand flashOffCommand = new ConvergedImageCaptureCommand( sharedImageReader, frameServer, rootRequestBuilder, - CameraDevice.TEMPLATE_STILL_CAPTURE, CameraDevice.TEMPLATE_STILL_CAPTURE, + CameraDevice.TEMPLATE_PREVIEW /* repeatingRequestTemplate */, + CameraDevice.TEMPLATE_STILL_CAPTURE /* stillCaptureRequestTemplate */, Arrays.asList(rootRequestBuilder), false /* ae */, true /* af */); // When flash is AUTO, wait for AF & AE. @@ -63,7 +65,8 @@ public final class PictureTakerFactory { // not necessary, then this could skip waiting for AE convergence. ImageCaptureCommand flashAutoCommand = new ConvergedImageCaptureCommand( sharedImageReader, frameServer, rootRequestBuilder, - CameraDevice.TEMPLATE_STILL_CAPTURE, CameraDevice.TEMPLATE_STILL_CAPTURE, + CameraDevice.TEMPLATE_PREVIEW /* repeatingRequestTemplate */, + CameraDevice.TEMPLATE_STILL_CAPTURE /* stillCaptureRequestTemplate */, Arrays.asList(rootRequestBuilder), true /* ae */, true /* af */); ImageCaptureCommand flashBasedCommand = new FlashBasedPhotoCommand(logFactory, flashMode, |