[libcamera-devel,21/27] libcamera: pipeline: vimc: Set a default format

Message ID 20190206060818.13907-22-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • Capture frames throught requests
Related show

Commit Message

Laurent Pinchart Feb. 6, 2019, 6:08 a.m. UTC
From: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Pick a default format for the one stream in a vimc camera. This is
just a starting point to define a good default format for the vimc
camera, and is expected to evolve over time as the capabilities of the
library grows.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/pipeline/vimc.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index ea6f28c64cc0..9c0406bef9dc 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -67,7 +67,11 @@  PipeHandlerVimc::streamConfiguration(Camera *camera,
 
 	StreamConfiguration config{};
 
-	LOG(VIMC, Info) << "TODO: Return a good default format";
+	LOG(VIMC, Debug) << "Retrieving default format";
+	config.width = 640;
+	config.height = 480;
+	config.pixelFormat = V4L2_PIX_FMT_RGB24;
+	config.bufferCount = 4;
 
 	configs[&stream_] = config;