Message ID | 20250701112922.62285-3-uajain@igalia.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Quoting Umang Jain (2025-07-01 12:29:22) > StreamConfiguration::colorspace is a std::optional<> and if unset by > the user, it should be populated by the pipeline handler after the > CameraConfiguration::validate(). > > Add a EXPECT_TRUE() check to ensure that each stream in the > CameraConfiguration has a colorspace set. > > Signed-off-by: Umang Jain <uajain@igalia.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> From Robert, for Patchwork: Tested-by: Robert Mader <robert.mader@collabora.com> > --- > src/apps/lc-compliance/helpers/capture.cpp | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp > index 2a3fa3b6..e767e45e 100644 > --- a/src/apps/lc-compliance/helpers/capture.cpp > +++ b/src/apps/lc-compliance/helpers/capture.cpp > @@ -52,6 +52,9 @@ void Capture::configure(libcamera::Span<const libcamera::StreamRole> roles) > FAIL() << "Configuration not valid"; > } > > + for (auto &cfg : *config_) > + EXPECT_TRUE(cfg.colorSpace) << cfg << " - colorspace not set."; > + > if (camera_->configure(config_.get())) { > config_.reset(); > FAIL() << "Failed to configure camera"; > -- > 2.50.0 >
diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp index 2a3fa3b6..e767e45e 100644 --- a/src/apps/lc-compliance/helpers/capture.cpp +++ b/src/apps/lc-compliance/helpers/capture.cpp @@ -52,6 +52,9 @@ void Capture::configure(libcamera::Span<const libcamera::StreamRole> roles) FAIL() << "Configuration not valid"; } + for (auto &cfg : *config_) + EXPECT_TRUE(cfg.colorSpace) << cfg << " - colorspace not set."; + if (camera_->configure(config_.get())) { config_.reset(); FAIL() << "Failed to configure camera";