summaryrefslogtreecommitdiff
path: root/src/android/camera_stream.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-10-03 11:36:41 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-10-07 16:07:44 +0200
commit216030aa9d0953cff552d5892d32e5cd73864202 (patch)
tree6374d754012666ecfab24cc8fe84f894d29aaebc /src/android/camera_stream.h
parent9e95d5e4531039f8e21c65ea88be9ad6aaa1ced0 (diff)
android: camera_stream: Retrieve Stream and Configuration
It's a common pattern to access the libcamera::Stream and libcamera::StreamConfiguration using the CameraStream instance's index. Add two methods to the CameraStream to shorten access to the two fields. This allows removing the index() method from the class interface. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_stream.h')
-rw-r--r--src/android/camera_stream.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
index d95c2a38..d8d9d8c4 100644
--- a/src/android/camera_stream.h
+++ b/src/android/camera_stream.h
@@ -115,7 +115,9 @@ public:
const libcamera::PixelFormat &format() const { return format_; }
const libcamera::Size &size() const { return size_; }
Type type() const { return type_; }
- unsigned int index() const { return index_; }
+
+ const libcamera::StreamConfiguration &configuration() const;
+ libcamera::Stream *stream() const;
int configure(const libcamera::StreamConfiguration &cfg);
int process(const libcamera::FrameBuffer &source,