Camera: Don't drop preview buffers during video

In case the camera device supports ZSL, avoid dropping
preview buffers while video recording is active. Preview
must not get interrupted in this case.

Bug: 117640175
Test: Manual using application, Camera CTS
Change-Id: I9021b4c46428e008298ddef0a86972640b0afa41
Merged-In: I9021b4c46428e008298ddef0a86972640b0afa41
(cherry picked from commit 6c79c9aa7f)
gugelfrei
Emilian Peev 6 years ago
parent 70a12185ec
commit f20dd6b779

@ -553,9 +553,11 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardCapture(
return DONE;
}
if (l.mParameters.isDeviceZslSupported) {
if ((l.mParameters.isDeviceZslSupported) && (l.mParameters.state != Parameters::RECORD) &&
(l.mParameters.state != Parameters::VIDEO_SNAPSHOT)) {
// If device ZSL is supported, drop all pending preview buffers to reduce the chance of
// rendering preview frames newer than the still frame.
// Additionally, preview must not get interrupted during video recording.
client->getCameraDevice()->dropStreamBuffers(true, client->getPreviewStreamId());
}

Loading…
Cancel
Save