[PATCH 07/12] libcamera: delayed_controls: Add some logging
Stefan Klug
stefan.klug at ideasonboard.com
Wed Mar 13 11:56:39 CET 2024
This replaces changes the log output to a more compact form.
There might be different opinions on that one
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
---
src/libcamera/delayed_controls.cpp | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
index 59314388..c46e54d1 100644
--- a/src/libcamera/delayed_controls.cpp
+++ b/src/libcamera/delayed_controls.cpp
@@ -104,6 +104,8 @@ DelayedControls::DelayedControls(V4L2Device *device,
maxDelay_ = std::max(maxDelay_, controlParams_[id].delay);
}
+ LOG(DelayedControls, Debug) << "Maximum delay: " << maxDelay_;
+
reset();
}
@@ -212,6 +214,14 @@ bool DelayedControls::push(const ControlList &controls)
bool DelayedControls::pushForFrame(uint32_t sequence, const ControlList &controls)
{
+ LOG(DelayedControls, Debug) << "push: " << sequence;
+ auto idMap = controls.idMap();
+ if (idMap) {
+ for (const auto &[id, value] : controls) {
+ LOG(DelayedControls, Debug) << " " << idMap->at(id)->name() << " : " << value.toString();
+ }
+ }
+
if (sequence < queueIndex_) {
LOG(DelayedControls, Debug) << "Got updated data for frame:" << sequence;
}
@@ -320,6 +330,7 @@ bool DelayedControls::pushForFrame(uint32_t sequence, const ControlList &control
*/
ControlList DelayedControls::get(uint32_t sequence)
{
+ LOG(DelayedControls, Debug) << "get " << sequence << ":";
ControlList out(device_->controls());
for (const auto &ctrl : values_) {
const ControlId *id = ctrl.first;
@@ -328,9 +339,8 @@ ControlList DelayedControls::get(uint32_t sequence)
out.set(id->id(), info);
LOG(DelayedControls, Debug)
- << "Reading " << id->name()
- << " to " << info.toString()
- << " at index " << sequence;
+ << " " << id->name()
+ << ": " << info.toString();
}
return out;
--
2.40.1
More information about the libcamera-devel
mailing list