[libcamera-devel,v2] qcam: Switch default stream role to viewfinder

Message ID 20200211085010.10191-1-naush@raspberrypi.com
State Accepted
Commit 8ce24bebbf177136b1a5640287239644e98c4b52
Headers show
Series
  • [libcamera-devel,v2] qcam: Switch default stream role to viewfinder
Related show

Commit Message

Naushir Patuck Feb. 11, 2020, 8:50 a.m. UTC
qcam currently only displays a standard viewfinder. As such set the
StreamRole parameter to Viewfinder so that the pipeline handlers can
setup the appropriate resolutions and formats.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/qcam/main_window.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Feb. 11, 2020, 9:15 a.m. UTC | #1
Hi Naush,

Thank you for the patch.

On Tue, Feb 11, 2020 at 08:50:10AM +0000, Naushir Patuck wrote:
> qcam currently only displays a standard viewfinder. As such set the
> StreamRole parameter to Viewfinder so that the pipeline handlers can
> setup the appropriate resolutions and formats.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and pushed to master.

> ---
>  src/qcam/main_window.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
> index df51fa8..70a3e61 100644
> --- a/src/qcam/main_window.cpp
> +++ b/src/qcam/main_window.cpp
> @@ -125,7 +125,7 @@ int MainWindow::startCapture()
>  {
>  	int ret;
>  
> -	config_ = camera_->generateConfiguration({ StreamRole::VideoRecording });
> +	config_ = camera_->generateConfiguration({ StreamRole::Viewfinder });
>  
>  	StreamConfiguration &cfg = config_->at(0);
>  	if (options_.isSet(OptSize)) {

Patch

diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index df51fa8..70a3e61 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -125,7 +125,7 @@  int MainWindow::startCapture()
 {
 	int ret;
 
-	config_ = camera_->generateConfiguration({ StreamRole::VideoRecording });
+	config_ = camera_->generateConfiguration({ StreamRole::Viewfinder });
 
 	StreamConfiguration &cfg = config_->at(0);
 	if (options_.isSet(OptSize)) {