From patchwork Thu Mar 26 01:35:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3323 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7EC0860411 for ; Thu, 26 Mar 2020 02:35:21 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qO8suRyg"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0E0AA2DC for ; Thu, 26 Mar 2020 02:35:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585186521; bh=3T9/s/5crVt4YZj/FE8gn1R1UHnE6deAiaFgLpKVD/o=; h=From:To:Subject:Date:From; b=qO8suRygBwYgGzRPneATuOm+mTqFIw8qDvIPf7RnBcTL5iR9+Jg/GH04fzYyuu6xY 0F+gmzmSWMPj/+pU1AMQ9plMF6xrx+vVTyrSZQuwk8vKY4yi9Vvdt3xcTkW9DEXNUq rpj9xi0D7YAASnqdX91oVsjScc++beVxpSOWrqRY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 26 Mar 2020 03:35:12 +0200 Message-Id: <20200326013512.25425-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] qcam: Print whole stream configuration when adjusted X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 01:35:21 -0000 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 Reviewed-by: Kieran Bingham --- src/qcam/main_window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 565732698a5e..cf39ed7aceca 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 &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) {