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

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

Commit Message

Cheng-Hao Yang Aug. 2, 2022, 10:29 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: