lc-compliance: Ensure stream's colorspace is set after validate()
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> Tested-by: Robert Mader <robert.mader@collabora.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
5d2d005306
commit
5d8f4d0a20
@@ -52,6 +52,9 @@ void Capture::configure(libcamera::Span<const libcamera::StreamRole> roles)
|
||||
FAIL() << "Configuration not valid";
|
||||
}
|
||||
|
||||
for (const auto &cfg : *config_)
|
||||
EXPECT_TRUE(cfg.colorSpace) << "Colorspace not set for " << cfg;
|
||||
|
||||
if (camera_->configure(config_.get())) {
|
||||
config_.reset();
|
||||
FAIL() << "Failed to configure camera";
|
||||
|
||||
Reference in New Issue
Block a user