diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-04-29 03:59:45 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-04 14:11:33 +0300 |
commit | 8a845ab078c3fe12ac4edd16c8cbac5b7ec03b98 (patch) | |
tree | 945c6a147ed76a1f09b36ddc06fbdb44b221f970 /src/libcamera/pipeline/simple | |
parent | d5d6dbe85cf270aee7c956429a5a692feca3900f (diff) |
libcamera: Replace toString with operator<<() for format classes
Now that format 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>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/pipeline/simple')
-rw-r--r-- | src/libcamera/pipeline/simple/converter.cpp | 4 | ||||
-rw-r--r-- | src/libcamera/pipeline/simple/simple.cpp | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp index ee8376de..77c44fc8 100644 --- a/src/libcamera/pipeline/simple/converter.cpp +++ b/src/libcamera/pipeline/simple/converter.cpp @@ -65,8 +65,8 @@ int SimpleConverter::Stream::configure(const StreamConfiguration &inputCfg, format.planes[0].bpl != inputCfg.stride) { LOG(SimplePipeline, Error) << "Input format not supported (requested " - << inputCfg.size << "-" << videoFormat.toString() - << ", got " << format.toString() << ")"; + << inputCfg.size << "-" << videoFormat + << ", got " << format << ")"; return -EINVAL; } diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index e76bf012..76bd228b 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -607,10 +607,10 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format, LOG(SimplePipeline, Debug) << "Source '" << source->entity()->name() << "':" << source->index() - << " produces " << sourceFormat.toString() + << " produces " << sourceFormat << ", sink '" << sink->entity()->name() << "':" << sink->index() - << " requires " << format->toString(); + << " requires " << format; return -EINVAL; } } @@ -620,7 +620,7 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format, << "':" << source->index() << " -> '" << sink->entity()->name() << "':" << sink->index() - << " configured with format " << format->toString(); + << " configured with format " << format; } return 0; @@ -939,8 +939,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) captureFormat.size != pipeConfig->captureSize) { LOG(SimplePipeline, Error) << "Unable to configure capture in " - << pipeConfig->captureSize << "-" - << videoFormat.toString(); + << pipeConfig->captureSize << "-" << videoFormat; return -EINVAL; } |