summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-29 03:59:45 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-04 14:11:25 +0300
commit37958dfd713dd00d4a71a78a6a45f8016ad82e65 (patch)
treec8f958dc5a9877d6d6afe95bcf8e960e3ca1f722 /src/libcamera/pipeline
parent4f1d1a48fe7ebe1282d7608a59cb059e1367e584 (diff)
libcamera: Replace toString with operator<<() for geometry classes
Now that geometry classes implement the stream formatting operator<<(), use it instead of the toString() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline')
-rw-r--r--src/libcamera/pipeline/ipu3/imgu.cpp19
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp2
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp6
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.cpp2
-rw-r--r--src/libcamera/pipeline/simple/converter.cpp2
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp8
-rw-r--r--src/libcamera/pipeline/uvcvideo/uvcvideo.cpp3
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp2
8 files changed, 21 insertions, 23 deletions
diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index e5bbc382..3ac997cc 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -386,9 +386,9 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)
pipeConfigs.clear();
LOG(IPU3, Debug) << "Calculating pipe configuration for: ";
- LOG(IPU3, Debug) << "input: " << pipe->input.toString();
- LOG(IPU3, Debug) << "main: " << pipe->main.toString();
- LOG(IPU3, Debug) << "vf: " << pipe->viewfinder.toString();
+ LOG(IPU3, Debug) << "input: " << pipe->input;
+ LOG(IPU3, Debug) << "main: " << pipe->main;
+ LOG(IPU3, Debug) << "vf: " << pipe->viewfinder;
const Size &in = pipe->input;
@@ -397,8 +397,7 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)
* See https://bugs.libcamera.org/show_bug.cgi?id=32
*/
if (in.width < ImgUDevice::kIFMaxCropWidth || in.height < ImgUDevice::kIFMaxCropHeight) {
- LOG(IPU3, Error) << "Input resolution " << in.toString()
- << " not supported";
+ LOG(IPU3, Error) << "Input resolution " << in << " not supported";
return {};
}
@@ -460,9 +459,9 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)
}
LOG(IPU3, Debug) << "Computed pipe configuration: ";
- LOG(IPU3, Debug) << "IF: " << pipeConfigs[bestIndex].iif.toString();
- LOG(IPU3, Debug) << "BDS: " << pipeConfigs[bestIndex].bds.toString();
- LOG(IPU3, Debug) << "GDC: " << pipeConfigs[bestIndex].gdc.toString();
+ LOG(IPU3, Debug) << "IF: " << pipeConfigs[bestIndex].iif;
+ LOG(IPU3, Debug) << "BDS: " << pipeConfigs[bestIndex].bds;
+ LOG(IPU3, Debug) << "GDC: " << pipeConfigs[bestIndex].gdc;
return pipeConfigs[bestIndex];
}
@@ -496,13 +495,13 @@ int ImgUDevice::configure(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputF
ret = imgu_->setSelection(PAD_INPUT, V4L2_SEL_TGT_CROP, &iif);
if (ret)
return ret;
- LOG(IPU3, Debug) << "ImgU IF rectangle = " << iif.toString();
+ LOG(IPU3, Debug) << "ImgU IF rectangle = " << iif;
Rectangle bds{ 0, 0, pipeConfig.bds };
ret = imgu_->setSelection(PAD_INPUT, V4L2_SEL_TGT_COMPOSE, &bds);
if (ret)
return ret;
- LOG(IPU3, Debug) << "ImgU BDS rectangle = " << bds.toString();
+ LOG(IPU3, Debug) << "ImgU BDS rectangle = " << bds;
V4L2SubdeviceFormat gdcFormat = {};
gdcFormat.mbus_code = MEDIA_BUS_FMT_FIXED;
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index acc0beca..d8c709b7 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -166,7 +166,7 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &
bestFormat.size = size;
}
- LOG(RPI, Debug) << "Format: " << size.toString()
+ LOG(RPI, Debug) << "Format: " << size
<< " fmt " << format.toString()
<< " Score: " << score
<< " (best " << bestScore << ")";
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 1624e2ec..1c53495c 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -592,13 +592,13 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
LOG(RkISP1, Debug)
<< "ISP input pad configured with " << format.toString()
- << " crop " << rect.toString();
+ << " crop " << rect;
/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */
format.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8;
LOG(RkISP1, Debug)
<< "Configuring ISP output pad with " << format.toString()
- << " crop " << rect.toString();
+ << " crop " << rect;
ret = isp_->setSelection(2, V4L2_SEL_TGT_CROP, &rect);
if (ret < 0)
@@ -610,7 +610,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
LOG(RkISP1, Debug)
<< "ISP output pad configured with " << format.toString()
- << " crop " << rect.toString();
+ << " crop " << rect;
std::map<unsigned int, IPAStream> streamConfig;
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index f195f91e..490d09e4 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -119,7 +119,7 @@ int RkISP1Path::configure(const StreamConfiguration &config,
LOG(RkISP1, Debug)
<< "Configured " << name_ << " resizer input pad with "
- << ispFormat.toString() << " crop " << rect.toString();
+ << ispFormat.toString() << " crop " << rect;
ispFormat.size = config.size;
diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
index 9cbc6ee3..ee8376de 100644
--- a/src/libcamera/pipeline/simple/converter.cpp
+++ b/src/libcamera/pipeline/simple/converter.cpp
@@ -65,7 +65,7 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg,
format.planes[0].bpl != inputCfg.stride) {
LOG(SimplePipeline, Error)
<< "Input format not supported (requested "
- << inputCfg.size.toString() << "-" << videoFormat.toString()
+ << inputCfg.size << "-" << videoFormat.toString()
<< ", got " << format.toString() << ")";
return -EINVAL;
}
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index ece821bf..e76bf012 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -474,7 +474,7 @@ int SimpleCameraData::init()
video_->formats(format.mbus_code);
LOG(SimplePipeline, Debug)
- << "Adding configuration for " << format.size.toString()
+ << "Adding configuration for " << format.size
<< " in pixel formats [ "
<< utils::join(videoFormats, ", ",
[](const auto &f) {
@@ -808,8 +808,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
if (!pipeConfig_->outputSizes.contains(cfg.size)) {
LOG(SimplePipeline, Debug)
- << "Adjusting size from " << cfg.size.toString()
- << " to " << pipeConfig_->captureSize.toString();
+ << "Adjusting size from " << cfg.size
+ << " to " << pipeConfig_->captureSize;
cfg.size = pipeConfig_->captureSize;
status = Adjusted;
}
@@ -939,7 +939,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
captureFormat.size != pipeConfig->captureSize) {
LOG(SimplePipeline, Error)
<< "Unable to configure capture in "
- << pipeConfig->captureSize.toString() << "-"
+ << pipeConfig->captureSize << "-"
<< videoFormat.toString();
return -EINVAL;
}
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index 40654a0b..e5a79417 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -143,8 +143,7 @@ CameraConfiguration::Status UVCCameraConfiguration::validate()
if (cfg.size != size) {
LOG(UVC, Debug)
- << "Adjusting size from " << size.toString()
- << " to " << cfg.size.toString();
+ << "Adjusting size from " << size << " to " << cfg.size;
status = Adjusted;
}
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index c3e33ecf..3db0ffe5 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -164,7 +164,7 @@ CameraConfiguration::Status VimcCameraConfiguration::validate()
if (cfg.size != size) {
LOG(VIMC, Debug)
- << "Adjusting size to " << cfg.size.toString();
+ << "Adjusting size to " << cfg.size;
status = Adjusted;
}