Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6de3239e authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Support for metadata buffer size queries

Allow camera metadata clients to query the camera metadata
buffer size.

Bug: 168100424
Bug: 170243539
Test: Camera CTS
Change-Id: I08773340850e91e2f0af8be6d77ee369adbb510f
parent ff7d528f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -169,6 +169,11 @@ bool CameraMetadata::isEmpty() const {
    return entryCount() == 0;
}

size_t CameraMetadata::bufferSize() const {
    return (mBuffer == NULL) ? 0 :
            get_camera_metadata_size(mBuffer);
}

status_t CameraMetadata::sort() {
    if (mLocked) {
        ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
+5 −0
Original line number Diff line number Diff line
@@ -127,6 +127,11 @@ class CameraMetadata: public Parcelable {
     */
    bool isEmpty() const;

    /**
     * Return the allocated camera metadata buffer size in bytes.
     */
    size_t bufferSize() const;

    /**
     * Sort metadata buffer for faster find
     */