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

Commit 9138a138 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make retrieving SMPTE2094-10 metadata optional."

parents 08749b23 93247497
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -22,8 +22,9 @@ package android.hardware.graphics.common;
 * This is an enum that defines the common types of gralloc 4 buffer metadata. The comments for
 * each enum include a description of the metadata that is associated with the type.
 *
 * IMapper@4.x must support getting the following standard buffer metadata types. IMapper@4.x may
 * support setting these standard buffer metadata types as well.
 * IMapper@4.x must support getting the following standard buffer metadata types, with the exception
 * of SMPTE 2094-10 metadata. IMapper@4.x may support setting these standard buffer metadata types
 * as well.
 *
 * When encoding these StandardMetadataTypes into a byte stream, the associated MetadataType is
 * is first encoded followed by the StandardMetadataType value. The MetadataType is encoded by
+7 −1
Original line number Diff line number Diff line
@@ -93,7 +93,13 @@ class GraphicsMapperHidlTest
        ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(descriptorInfo, true));

        hidl_vec<uint8_t> vec;
        ASSERT_EQ(Error::NONE, mGralloc->get(bufferHandle, metadataType, &vec));
        const auto result = mGralloc->get(bufferHandle, metadataType, &vec);

        if (metadataType == gralloc4::MetadataType_Smpte2094_10 && result == Error::UNSUPPORTED) {
            GTEST_SKIP() << "getting metadata for Smpte2094-10 is unsupported";
        }

        ASSERT_EQ(Error::NONE, result);

        ASSERT_NO_FATAL_FAILURE(decode(descriptorInfo, vec));
    }