From patchwork Mon Feb 4 18:55:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 502 Return-Path: Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 931FC60DB7 for ; Mon, 4 Feb 2019 19:55:33 +0100 (CET) X-Halon-ID: 71689809-28ae-11e9-a58a-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from localhost.localdomain (unknown [81.164.19.127]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 71689809-28ae-11e9-a58a-005056917f90; Mon, 04 Feb 2019 19:55:30 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Mon, 4 Feb 2019 19:55:21 +0100 Message-Id: <20190204185521.23471-3-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190204185521.23471-1-niklas.soderlund@ragnatech.se> References: <20190204185521.23471-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libcamera: pipeline: uvcvideo: set a default format X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 18:55:34 -0000 Pick a default format for the UVC one stream in a UVC camera. This is just a starting point to define a good default format for the UVC camera it's expected to evolve over time as the capabilities of the library grows. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/uvcvideo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp index 821e4c2189caabd0..ad4d45d0698519b6 100644 --- a/src/libcamera/pipeline/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo.cpp @@ -60,7 +60,11 @@ PipelineHandlerUVC::streamConfiguration(Camera *camera, StreamConfiguration config{}; - LOG(UVC, Info) << "TODO: Return a good default format"; + LOG(UVC, Debug) << "Retrieving default format"; + config.width = 640; + config.height = 480; + config.pixelFormat = V4L2_PIX_FMT_YUYV; + config.bufferCount = 4; configs[&stream_] = config;