summaryrefslogtreecommitdiff
path: root/src/android/camera_metadata.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-07-16 18:38:44 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-08-02 18:07:19 +0900
commit24f80f14af50872c2294bce96da97492ca41f72f (patch)
tree21706481c9fc14fd6799a6d12b733f8d25cf30e7 /src/android/camera_metadata.h
parent10cdc914dad282b4ca0ad11067d5c6d446af1fcc (diff)
android: metadata: Add hasEntry and entryContains
Add convenience functions for checking if an entry is present in a CameraMetadata instance, and to check if an array entry includes a specific value. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_metadata.h')
-rw-r--r--src/android/camera_metadata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index 3b7c9e24..03b3e701 100644
--- a/src/android/camera_metadata.h
+++ b/src/android/camera_metadata.h
@@ -29,6 +29,10 @@ public:
bool isValid() const { return valid_; }
bool getEntry(uint32_t tag, camera_metadata_ro_entry_t *entry) const;
+ template<typename T> bool entryContains(uint32_t tag, T value) const;
+
+ bool hasEntry(uint32_t tag) const;
+
template<typename T,
std::enable_if_t<std::is_arithmetic_v<T>> * = nullptr>
bool addEntry(uint32_t tag, const T &data)