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>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user