diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/camera.cpp | 6 | ||||
-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 | ||||
-rw-r--r-- | src/libcamera/pipeline_handler.cpp | 2 |
6 files changed, 41 insertions, 41 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 6b74eb8e..cb45bafe 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -129,10 +129,10 @@ bool CameraConfiguration::isValid() const return false; for (auto const &it : config_) { - const StreamConfiguration &conf = it.second; + const StreamConfiguration &cfg = it.second; - if (conf.size.width == 0 || conf.size.height == 0 || - conf.pixelFormat == 0 || conf.bufferCount == 0) + if (cfg.size.width == 0 || cfg.size.height == 0 || + cfg.pixelFormat == 0 || cfg.bufferCount == 0) return false; } 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, diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index 345abca8..4ecd6c49 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -175,7 +175,7 @@ PipelineHandler::~PipelineHandler() * \param[in] config The camera configurations to setup * * Configure the specified group of streams for \a camera according to the - * configuration specified in \a configs. The intended caller of this interface + * configuration specified in \a config. The intended caller of this interface * is the Camera class which will receive configuration to apply from the * application. * |