From 2f34f5ef064505e82c86932a48ddcaa92b9b95f1 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 1 Jul 2020 16:42:13 +0100 Subject: android: camera_device: Maintain a vector of CameraStream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a vector storing a CameraStream to track and maintain state between an Android stream (camera3_stream_t) and a libcamera Stream. Only the index of the libcamera stream is stored, to facilitate identifying the correct index for both the StreamConfiguration and Stream vectors. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- src/android/camera_device.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/android/camera_device.h') diff --git a/src/android/camera_device.h b/src/android/camera_device.h index d7834d94..d00f617b 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -25,6 +25,15 @@ class CameraMetadata; +struct CameraStream { + /* + * The index of the libcamera StreamConfiguration as added during + * configureStreams(). A single libcamera Stream may be used to deliver + * one or more streams to the Android framework. + */ + unsigned int index; +}; + class CameraDevice : protected libcamera::Loggable { public: @@ -90,6 +99,7 @@ private: std::vector streamConfigurations_; std::map formatsMap_; + std::vector streams_; int facing_; int orientation_; -- cgit v1.2.1