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

Commit 7cd41994 authored by Santhosh Behara's avatar Santhosh Behara Committed by Linux Build Service Account
Browse files

libstagefright: Populate the metadata flag for batchmode encoding

For the encoder batch mode to work, set mFlags to FLAG_USE_METADATA_INPUT
if the MetadataBufferType is set to kMetadataBufferTypeNativeHandleSource.

Change-Id: I7cead5088298c040477d5edabed1b3fc1f603894
parent 3306a381
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -415,12 +415,17 @@ MediaCodecSource::MediaCodecSource(
    CHECK(mLooper != NULL);

    AString mime;
    int32_t storeMeta = kMetadataBufferTypeInvalid;
    CHECK(mOutputFormat->findString("mime", &mime));

    if (!strncasecmp("video/", mime.c_str(), 6)) {
        mIsVideo = true;
    }

    if (mOutputFormat->findInt32("android._input-metadata-buffer-type", &storeMeta)
            && storeMeta == kMetadataBufferTypeNativeHandleSource) {
        mFlags |= FLAG_USE_METADATA_INPUT;
    }
    if (!(mFlags & FLAG_USE_SURFACE_INPUT)) {
        mPuller = new Puller(source);
    }