[libcamera-devel,v2,1/9] Add StreamRole in StreamConfiguration
diff mbox series

Message ID 20220526082737.1081262-2-chenghaoyang@google.com
State Superseded
Headers show
Series
  • Use two imgus in ipu3 pipeline handler
Related show

Commit Message

Harvey Yang May 26, 2022, 8:27 a.m. UTC
From: Harvey Yang <chenghaoyang@chromium.org>

To let ipu3 pipeline handler understand the usage of streams, this patch
adds StreamRole member variable in StreamConfiguration, which should be
set by the (Android) adapter.

Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
---
 include/libcamera/stream.h | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index f0ae7e62..c9e79226 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -22,6 +22,15 @@  namespace libcamera {
 class Camera;
 class Stream;
 
+enum StreamRole {
+	Raw,
+	StillCapture,
+	VideoRecording,
+	Viewfinder,
+};
+
+using StreamRoles = std::vector<StreamRole>;
+
 class StreamFormats
 {
 public:
@@ -50,6 +59,8 @@  struct StreamConfiguration {
 
 	std::optional<ColorSpace> colorSpace;
 
+	StreamRole streamRole;
+
 	Stream *stream() const { return stream_; }
 	void setStream(Stream *stream) { stream_ = stream; }
 	const StreamFormats &formats() const { return formats_; }
@@ -61,15 +72,6 @@  private:
 	StreamFormats formats_;
 };
 
-enum StreamRole {
-	Raw,
-	StillCapture,
-	VideoRecording,
-	Viewfinder,
-};
-
-using StreamRoles = std::vector<StreamRole>;
-
 class Stream
 {
 public: