summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-14 22:33:20 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-18 18:13:00 +0300
commit9c907813321612e245ecdd25950959e8efbe9872 (patch)
treeed94c1620a18da4d00a402dcc8d46d94ea025d52 /src
parent8f6f63a2088875563c886946132bebc2ff624141 (diff)
libcamera: camera: Log requested configuration in configureStreams()
The IPU3 pipeline handler logs the requested configuration in its configureStreams() handler. This is useful for other pipeline handlers as well, move it to the Camera class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera.cpp14
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp6
2 files changed, 14 insertions, 6 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 75a21008..bd381fa1 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -5,6 +5,8 @@
* camera.cpp - Camera device
*/
+#include <iomanip>
+
#include <libcamera/camera.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
@@ -595,11 +597,23 @@ int Camera::configureStreams(const CameraConfiguration &config)
return -EINVAL;
}
+ std::ostringstream msg("configuring streams:");
+ unsigned int index = 0;
+
for (Stream *stream : config) {
if (streams_.find(stream) == streams_.end())
return -EINVAL;
+
+ const StreamConfiguration &cfg = config[stream];
+ msg << " (" << index << ") " << cfg.width << "x"
+ << cfg.height << "-0x" << std::hex << std::setfill('0')
+ << std::setw(8) << cfg.pixelFormat;
+
+ index++;
}
+ LOG(Camera, Info) << msg.str();
+
ret = pipe_->configureStreams(this, config);
if (ret)
return ret;
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 924eb46c..f2306efb 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -244,12 +244,6 @@ int PipelineHandlerIPU3::configureStreams(Camera *camera,
ImgUDevice *imgu = data->imgu_;
int ret;
- LOG(IPU3, Info)
- << "Requested image format " << cfg.width << "x"
- << cfg.height << "-0x" << std::hex << std::setfill('0')
- << std::setw(8) << cfg.pixelFormat << " on camera '"
- << camera->name() << "'";
-
/*
* Verify that the requested size respects the IPU3 alignement
* requirements (the image width shall be a multiple of 8 pixels and