diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-07-01 16:42:13 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-07-06 23:58:42 +0100 |
commit | 2f34f5ef064505e82c86932a48ddcaa92b9b95f1 (patch) | |
tree | cd8dff0179d11c3255cb5a3ed3be440f2b565cbc /src/android/camera_device.h | |
parent | eac0542c5e15137854e9ecf864da9953960dbcd8 (diff) |
android: camera_device: Maintain a vector of CameraStream
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 <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_device.h')
-rw-r--r-- | src/android/camera_device.h | 10 |
1 files changed, 10 insertions, 0 deletions
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<Camera3StreamConfiguration> streamConfigurations_; std::map<int, libcamera::PixelFormat> formatsMap_; + std::vector<CameraStream> streams_; int facing_; int orientation_; |