summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-01-21 12:50:04 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-01-22 10:37:07 +0100
commitb9369a0e6079df987a70fd9edfa294d098147d93 (patch)
tree7244ad22a5616d4cb2f4ca8e4e5af77eb697d231 /src
parent4b18b82c4f45a6d17ec976acd709a31f6873a01e (diff)
android: camera_metadata: Add defaul constructor
Add a default constructor that initializes a non valid CameraMetadata to allow embedding instances of the class in other types. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-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 8e36e758..6f1bcdbe 100644
--- a/src/android/camera_metadata.cpp
+++ b/src/android/camera_metadata.cpp
@@ -13,6 +13,11 @@ using namespace libcamera;
LOG_DEFINE_CATEGORY(CameraMetadata)
+CameraMetadata::CameraMetadata()
+ : metadata_(nullptr), valid_(false)
+{
+}
+
CameraMetadata::CameraMetadata(size_t entryCapacity, size_t dataCapacity)
{
metadata_ = allocate_camera_metadata(entryCapacity, dataCapacity);
diff --git a/src/android/camera_metadata.h b/src/android/camera_metadata.h
index 720b760d..d653e2f0 100644
--- a/src/android/camera_metadata.h
+++ b/src/android/camera_metadata.h
@@ -14,6 +14,7 @@
class CameraMetadata
{
public:
+ CameraMetadata();
CameraMetadata(size_t entryCapacity, size_t dataCapacity);
CameraMetadata(const camera_metadata_t *metadata);
CameraMetadata(const CameraMetadata &other);