Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f20dd6b7 authored by Emilian Peev's avatar Emilian Peev
Browse files

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 6c79c9aa)
parent 70a12185
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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());
    }