summaryrefslogtreecommitdiff
path: root/simple-cam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'simple-cam.cpp')
-rw-r--r--simple-cam.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/simple-cam.cpp b/simple-cam.cpp
index e282463..4de1b7d 100644
--- a/simple-cam.cpp
+++ b/simple-cam.cpp
@@ -46,6 +46,29 @@ static void requestComplete(Request *request)
static void processRequest(Request *request)
{
+ std::cout << std::endl
+ << "Request completed: " << request->toString() << std::endl;
+
+ /*
+ * When a request has completed, it is populated with a metadata control
+ * list that allows an application to determine various properties of
+ * the completed request. This can include the timestamp of the Sensor
+ * capture, or its gain and exposure values, or properties from the IPA
+ * such as the state of the 3A algorithms.
+ *
+ * ControlValue types have a toString, so to examine each request, print
+ * all the metadata for inspection. A custom application can parse each
+ * of these items and process them according to its needs.
+ */
+ const ControlList &requestMetadata = request->metadata();
+ for (const auto &ctrl : requestMetadata) {
+ const ControlId *id = controls::controls.at(ctrl.first);
+ const ControlValue &value = ctrl.second;
+
+ std::cout << "\t" << id->name() << " = " << value.toString()
+ << std::endl;
+ }
+
/*
* Each buffer has its own FrameMetadata to describe its state, or the
* usage of each buffer. While in our simple capture we only provide one