diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-04-19 16:45:20 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-04-28 13:42:53 +0300 |
commit | 432b14013c4be73894d6931923a58563201589a1 (patch) | |
tree | d6a605c5804ae18fd20b51ace2055143232c7fa8 | |
parent | ff24be7022b39533cce219468b6fa3ce84460f94 (diff) |
libcamera: camera: Log proposed configuration in streamConfiguration()
The IPU3 and RKISP1 pipeline handlers log the camera configuration they
propose in their streamConfiguration() methods. Other pipeline handlers
are expected to log similar information, move it to the Camera class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
-rw-r--r-- | src/libcamera/camera.cpp | 15 | ||||
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 4 | ||||
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 9cea3fd0..ef9e15be 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -546,7 +546,20 @@ Camera::streamConfiguration(const std::vector<StreamUsage> &usages) if (disconnected_ || !usages.size() || usages.size() > streams_.size()) return CameraConfiguration(); - return pipe_->streamConfiguration(this, usages); + CameraConfiguration config = pipe_->streamConfiguration(this, usages); + + std::ostringstream msg("streams configuration:"); + unsigned int index = 0; + + for (Stream *stream : config) { + const StreamConfiguration &cfg = config[stream]; + msg << " (" << index << ") " << cfg.toString(); + index++; + } + + LOG(Camera, Debug) << msg.str(); + + return config; } /** diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 97a30920..fbb37498 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -316,10 +316,6 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, streamConfig.bufferCount = IPU3_BUFFER_COUNT; cameraConfig[stream] = streamConfig; - - LOG(IPU3, Debug) - << "Stream '" << stream->name_ << "' format set to " - << streamConfig.toString(); } return cameraConfig; diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index d21c6266..9a63a68b 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -124,8 +124,6 @@ CameraConfiguration PipelineHandlerRkISP1::streamConfiguration(Camera *camera, configs[&data->stream_] = config; - LOG(RkISP1, Debug) << "Stream format set to " << config.toString(); - return configs; } |