[libcamera-devel] [PATCH v2 1/9] Add StreamRole in StreamConfiguration
Harvey Yang
chenghaoyang at chromium.org
Thu May 26 10:27:29 CEST 2022
From: Harvey Yang <chenghaoyang at 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 at chromium.org>
---
include/libcamera/stream.h | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
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:
--
2.36.1.124.g0e6072fb45-goog
More information about the libcamera-devel
mailing list