diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-24 17:54:07 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-03-03 00:59:19 +0200 |
commit | 7b29587840152328eace5a4a9f836d56e545c63e (patch) | |
tree | 0bc3e88a04c17a8e983ed13788a897c9d576090d /src | |
parent | f05d08a93f41b68dac65b16d8066fac1e7af5ca6 (diff) |
libcamera: pipeline: simple: Rename Configuration::pixelFormat
The Configuration::pixelFormat field stores the pixel format at the
output of the capture part of the pipeline. Rename it to captureFormat,
to match the related captureSize field.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Phi-Bang Nguyen <pnguyen@baylibre.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/simple/simple.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index a4537a2e..bce19009 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -157,7 +157,7 @@ public: struct Configuration { uint32_t code; - PixelFormat pixelFormat; + PixelFormat captureFormat; Size captureSize; SizeRange outputSizes; }; @@ -379,7 +379,7 @@ int SimpleCameraData::init() Configuration config; config.code = code; - config.pixelFormat = pixelFormat; + config.captureFormat = pixelFormat; config.captureSize = format.size; if (!converter) { @@ -551,7 +551,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate() status = Adjusted; } - needConversion_ = cfg.pixelFormat != pipeConfig.pixelFormat + /* \todo Create a libcamera core class to group format and size */ + needConversion_ = cfg.pixelFormat != pipeConfig.captureFormat || cfg.size != pipeConfig.captureSize; cfg.bufferCount = 3; @@ -656,7 +657,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) return ret; /* Configure the video node. */ - V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig.pixelFormat); + V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig.captureFormat); V4L2DeviceFormat captureFormat; captureFormat.fourcc = videoFormat; @@ -686,7 +687,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) if (useConverter_) { StreamConfiguration inputCfg; - inputCfg.pixelFormat = pipeConfig.pixelFormat; + inputCfg.pixelFormat = pipeConfig.captureFormat; inputCfg.size = pipeConfig.captureSize; inputCfg.stride = captureFormat.planes[0].bpl; inputCfg.bufferCount = cfg.bufferCount; |