From 4b8363a8bad1ff879ee50f18a2c929f19119cac4 Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Tue, 10 Sep 2019 15:18:08 -0700 Subject: [PATCH] Camera: Update doc for stale queued buffer in input surface In case a reprocessable capture session is re-created, any pending queued buffers in the input surface will be flushed. This makes sure newly created reprocessable capture session won't be stuck waiting for stale buffers from previous session. Test: Read docs Bug: 138729150 Change-Id: Ia14221f31a6d4f6ebf35f630036ece66de1d0874 --- core/java/android/hardware/camera2/CameraDevice.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index ed2d0c9344c6c..24c6c6985a4c8 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -567,6 +567,9 @@ public abstract class CameraDevice implements AutoCloseable { * match one of the supported input sizes for {@link android.graphics.ImageFormat#PRIVATE} * format. Otherwise, creating a reprocessable capture session will fail.

* + *

Starting from API level 30, recreating a reprocessable capture session will flush all the + * queued but not yet processed buffers from the input surface.

+ * *

The guaranteed stream configurations listed in * {@link #createCaptureSession createCaptureSession} are also guaranteed to work for * {@link #createReprocessableCaptureSession createReprocessableCaptureSession}. In addition,