summaryrefslogtreecommitdiff
path: root/src/android/camera_metadata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_metadata.h')
-rw-r--r--src/android/camera_metadata.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index e70f60af..0c31ec6b 100644
--- a/src/android/camera_metadata.h
+++ b/src/android/camera_metadata.h
@@ -36,6 +36,17 @@ public:
template<typename T,
std::enable_if_t<std::is_arithmetic_v<T> ||
std::is_enum_v<T>> * = nullptr>
+ bool setEntry(uint32_t tag, const T &data)
+ {
+ if (hasEntry(tag))
+ return updateEntry(tag, &data, 1, sizeof(T));
+ else
+ return addEntry(tag, &data, 1, sizeof(T));
+ }
+
+ template<typename T,
+ std::enable_if_t<std::is_arithmetic_v<T> ||
+ std::is_enum_v<T>> * = nullptr>
bool addEntry(uint32_t tag, const T &data)
{
return addEntry(tag, &data, 1, sizeof(T));