diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2021-01-21 19:15:42 +0900 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2021-01-22 10:35:28 +0100 |
commit | 5e2596006bc662c1e565052728cd732d8f78bf1e (patch) | |
tree | 8c72dfafb1b46a063819c2870f72e2bc7bb5ddca /src/android/camera_metadata.h | |
parent | afbf0ec626db43b0117d28ef4f9b825a7d19929a (diff) |
android: camera_metadata: Add copy constructor and getEntry
Add a copy constructor and assignment operator to CameraMetadata, as well
a constructor from camera_metadata_t. Also add a function getEntry to
allow getting metadata entries from CameraMetadata. This allows us to
use CameraMetadata for reading from camera_metadata_t.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_metadata.h')
-rw-r--r-- | src/android/camera_metadata.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h index 9d047b1b..720b760d 100644 --- a/src/android/camera_metadata.h +++ b/src/android/camera_metadata.h @@ -15,9 +15,14 @@ class CameraMetadata { public: CameraMetadata(size_t entryCapacity, size_t dataCapacity); + CameraMetadata(const camera_metadata_t *metadata); + CameraMetadata(const CameraMetadata &other); ~CameraMetadata(); + CameraMetadata &operator=(const CameraMetadata &other); + bool isValid() const { return valid_; } + bool getEntry(uint32_t tag, camera_metadata_ro_entry_t *entry) const; bool addEntry(uint32_t tag, const void *data, size_t data_count); bool updateEntry(uint32_t tag, const void *data, size_t data_count); |