apps: cam: Print an error when outputting DNG and DNG support is missing
When DNG support is missing, the cam application ignores the .dng suffix of the file pattern and writes raw binary data instead, without notifying the user. This leads to confusion. Fix it by printing an error message. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
@@ -256,11 +256,16 @@ int CameraSession::start()
|
||||
#endif
|
||||
|
||||
if (options_.isSet(OptFile)) {
|
||||
if (!options_[OptFile].toString().empty())
|
||||
sink_ = std::make_unique<FileSink>(camera_.get(), streamNames_,
|
||||
options_[OptFile]);
|
||||
else
|
||||
sink_ = std::make_unique<FileSink>(camera_.get(), streamNames_);
|
||||
std::unique_ptr<FileSink> sink =
|
||||
std::make_unique<FileSink>(camera_.get(), streamNames_);
|
||||
|
||||
if (!options_[OptFile].toString().empty()) {
|
||||
ret = sink->setFilePattern(options_[OptFile]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
sink_ = std::move(sink);
|
||||
}
|
||||
|
||||
if (sink_) {
|
||||
|
||||
Reference in New Issue
Block a user