diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-04-29 20:41:46 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-04-30 22:18:58 +0300 |
commit | 3fc0189e209738f3119fbce62221aa2cc6afc8f2 (patch) | |
tree | c861d3bc54864f113f2a335244bd88c52e14cdfe /src/libcamera/pipeline | |
parent | a2dddf7c26df3307b9d4554c25387a00687a6234 (diff) |
libcamera: pipeline: Unify naming of configurations in pipeline handlers
Name all instances of CameraConfiguration "config", and all instances of
StreamConfiguration "cfg" accross all pipeline handlers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/pipeline')
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 32 | ||||
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 14 | ||||
-rw-r--r-- | src/libcamera/pipeline/uvcvideo.cpp | 14 | ||||
-rw-r--r-- | src/libcamera/pipeline/vimc.cpp | 14 |
4 files changed, 37 insertions, 37 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 3aa47548..00416625 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -66,7 +66,7 @@ public: int configureInput(const Size &size, V4L2DeviceFormat *inputFormat); int configureOutput(ImgUOutput *output, - const StreamConfiguration &config); + const StreamConfiguration &cfg); int importBuffers(BufferPool *pool); int exportBuffers(ImgUOutput *output, BufferPool *pool); @@ -224,14 +224,14 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, const std::vector<StreamUsage> &usages) { IPU3CameraData *data = cameraData(camera); - CameraConfiguration cameraConfig = {}; + CameraConfiguration config = {}; std::set<IPU3Stream *> streams = { &data->outStream_, &data->vfStream_, }; for (const StreamUsage &usage : usages) { - StreamConfiguration streamConfig = {}; + StreamConfiguration cfg = {}; StreamUsage::Role role = usage.role(); IPU3Stream *stream = nullptr; @@ -262,7 +262,7 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, * * \todo Clarify ImgU alignment requirements. */ - streamConfig.size = { 2560, 1920 }; + cfg.size = { 2560, 1920 }; break; @@ -294,7 +294,7 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, res.width); unsigned int height = std::min(usage.size().height, res.height); - streamConfig.size = { width & ~7, height & ~3 }; + cfg.size = { width & ~7, height & ~3 }; break; } @@ -310,13 +310,13 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, streams.erase(stream); - streamConfig.pixelFormat = V4L2_PIX_FMT_NV12; - streamConfig.bufferCount = IPU3_BUFFER_COUNT; + cfg.pixelFormat = V4L2_PIX_FMT_NV12; + cfg.bufferCount = IPU3_BUFFER_COUNT; - cameraConfig[stream] = streamConfig; + config[stream] = cfg; } - return cameraConfig; + return config; } int PipelineHandlerIPU3::configureStreams(Camera *camera, @@ -424,10 +424,10 @@ int PipelineHandlerIPU3::configureStreams(Camera *camera, * Apply the largest available format to the stat node. * \todo Revise this when we'll actually use the stat node. */ - StreamConfiguration statConfig = {}; - statConfig.size = cio2Format.size; + StreamConfiguration statCfg = {}; + statCfg.size = cio2Format.size; - ret = imgu->configureOutput(&imgu->stat_, statConfig); + ret = imgu->configureOutput(&imgu->stat_, statCfg); if (ret) return ret; @@ -959,18 +959,18 @@ int ImgUDevice::configureInput(const Size &size, /** * \brief Configure the ImgU unit \a id video output * \param[in] output The ImgU output device to configure - * \param[in] config The requested configuration + * \param[in] cfg The requested configuration * \return 0 on success or a negative error code otherwise */ int ImgUDevice::configureOutput(ImgUOutput *output, - const StreamConfiguration &config) + const StreamConfiguration &cfg) { V4L2Device *dev = output->dev; unsigned int pad = output->pad; V4L2SubdeviceFormat imguFormat = {}; imguFormat.mbus_code = MEDIA_BUS_FMT_FIXED; - imguFormat.size = config.size; + imguFormat.size = cfg.size; int ret = imgu_->setFormat(pad, &imguFormat); if (ret) @@ -982,7 +982,7 @@ int ImgUDevice::configureOutput(ImgUOutput *output, V4L2DeviceFormat outputFormat = {}; outputFormat.fourcc = V4L2_PIX_FMT_NV12; - outputFormat.size = config.size; + outputFormat.size = cfg.size; outputFormat.planesCount = 2; ret = dev->setFormat(&outputFormat); diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 7acf8515..134d3df4 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -113,16 +113,16 @@ CameraConfiguration PipelineHandlerRkISP1::streamConfiguration(Camera *camera, const std::vector<StreamUsage> &usages) { RkISP1CameraData *data = cameraData(camera); - CameraConfiguration configs; - StreamConfiguration config{}; + CameraConfiguration config; + StreamConfiguration cfg{}; - config.pixelFormat = V4L2_PIX_FMT_NV12; - config.size = data->sensor_->resolution(); - config.bufferCount = RKISP1_BUFFER_COUNT; + cfg.pixelFormat = V4L2_PIX_FMT_NV12; + cfg.size = data->sensor_->resolution(); + cfg.bufferCount = RKISP1_BUFFER_COUNT; - configs[&data->stream_] = config; + config[&data->stream_] = cfg; - return configs; + return config; } int PipelineHandlerRkISP1::configureStreams(Camera *camera, diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp index 358e247b..5d2f1c98 100644 --- a/src/libcamera/pipeline/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo.cpp @@ -89,16 +89,16 @@ PipelineHandlerUVC::streamConfiguration(Camera *camera, const std::vector<StreamUsage> &usages) { UVCCameraData *data = cameraData(camera); - CameraConfiguration configs; - StreamConfiguration config{}; + CameraConfiguration config; + StreamConfiguration cfg{}; - config.pixelFormat = V4L2_PIX_FMT_YUYV; - config.size = { 640, 480 }; - config.bufferCount = 4; + cfg.pixelFormat = V4L2_PIX_FMT_YUYV; + cfg.size = { 640, 480 }; + cfg.bufferCount = 4; - configs[&data->stream_] = config; + config[&data->stream_] = cfg; - return configs; + return config; } int PipelineHandlerUVC::configureStreams(Camera *camera, diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 83fa9cf4..cdf43770 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -89,16 +89,16 @@ PipelineHandlerVimc::streamConfiguration(Camera *camera, const std::vector<StreamUsage> &usages) { VimcCameraData *data = cameraData(camera); - CameraConfiguration configs; - StreamConfiguration config{}; + CameraConfiguration config; + StreamConfiguration cfg{}; - config.pixelFormat = V4L2_PIX_FMT_RGB24; - config.size = { 640, 480 }; - config.bufferCount = 4; + cfg.pixelFormat = V4L2_PIX_FMT_RGB24; + cfg.size = { 640, 480 }; + cfg.bufferCount = 4; - configs[&data->stream_] = config; + config[&data->stream_] = cfg; - return configs; + return config; } int PipelineHandlerVimc::configureStreams(Camera *camera, |