@@ -131,6 +131,7 @@ public:
const ControlInfoMap &controls() const;
const ControlList &properties() const;
+ const MetadataListPlan &metadata() const;
const std::set<Stream *> &streams() const;
@@ -18,6 +18,7 @@
#include <libcamera/base/class.h>
#include <libcamera/camera.h>
+#include <libcamera/metadata_list_plan.h>
namespace libcamera {
@@ -40,6 +41,7 @@ public:
std::queue<Request *> waitingRequests_;
ControlInfoMap controlInfo_;
ControlList properties_;
+ MetadataListPlan metadataPlan_;
uint32_t requestSequence_;
@@ -669,6 +669,14 @@ Camera::Private::~Private()
* over a single capture session.
*/
+/**
+ * \var Camera::Private::metadataPlan_
+ * \brief The set of metadata supported by the camera
+ *
+ * The metadata information shall be initialised by the pipeline handler when
+ * creating the camera.
+ */
+
static const char *const camera_state_names[] = {
"Available",
"Acquired",
@@ -1074,6 +1082,19 @@ const ControlInfoMap &Camera::controls() const
return _d()->controlInfo_;
}
+/**
+ * \brief Retrieve the set of metadata supported by the camera
+ *
+ * The list of metadata controls that may be reported by the camera
+ * for a \ref Request::metadata() "request".
+ *
+ * \return A MetadataListPlan listing the metadata controls supported by the camera
+ */
+const MetadataListPlan &Camera::metadata() const
+{
+ return _d()->metadataPlan_;
+}
+
/**
* \brief Retrieve the list of properties of the camera
*
Just like `ControlInfoMap controlInfo_` is a public member of the private camera data for pipeline handlers to populate, add a `MetadataListPlan` as well for the pipeline handlers to fill. This will be used to initialize the `MetadataList` of each request created by the camera. Also add `Camera::metadata()`, which makes it accessible for applications. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- changes in v2: * make it available in `Camera::metadata()` --- include/libcamera/camera.h | 1 + include/libcamera/internal/camera.h | 2 ++ src/libcamera/camera.cpp | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+)