summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-07-24 13:59:15 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-08-05 14:33:52 +0200
commitf2d19266a4d3788e8787db469337c7969fd152d2 (patch)
tree87a048031cede47801b8202715c98b0019d844e7 /src/android
parent17a21b095a555ad70617bd9007b91609b0865111 (diff)
android: camera_metadata: Add const version of get()
Add a const version of the CameraMetadata::get() method to retrieve a const pointer to the camera metadata wrapped by the class instance. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_metadata.cpp5
-rw-r--r--src/android/camera_metadata.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
index 47b2e4ef..ea33e9c2 100644
--- a/src/android/camera_metadata.cpp
+++ b/src/android/camera_metadata.cpp
@@ -50,3 +50,8 @@ camera_metadata_t *CameraMetadata::get()
{
return valid_ ? metadata_ : nullptr;
}
+
+const camera_metadata_t *CameraMetadata::get() const
+{
+ return valid_ ? metadata_ : nullptr;
+}
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index 348a0181..f16dd27b 100644
--- a/src/android/camera_metadata.h
+++ b/src/android/camera_metadata.h
@@ -21,6 +21,7 @@ public:
bool addEntry(uint32_t tag, const void *data, size_t data_count);
camera_metadata_t *get();
+ const camera_metadata_t *get() const;
private:
camera_metadata_t *metadata_;