summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-19 03:45:22 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-26 13:37:55 +0200
commit8c8fde05acd170f14ddbd395924819415a788eaf (patch)
tree70ce371f029d02d78fe35d2191f53637b06a8421
parentee7e2c93dfbf34b3500c895115c516e5e90d3e31 (diff)
qcam: Print whole stream configuration when adjusted
When the validate() function adjusts the stream configuration, we print the adjusted size for debugging purpose. Switch to printing the whole configuration, as the pixel format may be useful too. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/qcam/main_window.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 56573269..cf39ed7a 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -281,6 +281,7 @@ int MainWindow::startCapture()
config_ = camera_->generateConfiguration({ StreamRole::Viewfinder });
StreamConfiguration &cfg = config_->at(0);
+
if (options_.isSet(OptSize)) {
const std::vector<OptionValue> &sizeOptions =
options_[OptSize].toArray();
@@ -316,10 +317,9 @@ int MainWindow::startCapture()
return -EINVAL;
}
- if (validation == CameraConfiguration::Adjusted) {
- qInfo() << "Stream size adjusted to"
- << cfg.size.toString().c_str();
- }
+ if (validation == CameraConfiguration::Adjusted)
+ qInfo() << "Stream configuration adjusted to "
+ << cfg.toString().c_str();
ret = camera_->configure(config_.get());
if (ret < 0) {