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

Commit 0cf2dfba authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

IOMX: convert ANWB to Gralloc meta if using useBuffer in the same process am:...

IOMX: convert ANWB to Gralloc meta if using useBuffer in the same process am: 4fb1e42a am: 63482ec6
am: c0f5ebae

Change-Id: I7e3f990bdb4a2814253bb346e6e9f02936769d54
parents 4159ad15 c0f5ebae
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -167,8 +167,10 @@ struct BufferMeta {
        return buf;
    }

    bool copyToOmx() const {
        return mCopyToOmx;
    bool copyingOrSharingToOmx(const OMX_BUFFERHEADERTYPE *header) const {
        return mCopyToOmx
                                    // sharing buffer with client
                || (mMem != NULL && mMem->pointer() == header->pBuffer);
    }

    void setGraphicBuffer(const sp<GraphicBuffer> &graphicBuffer) {
@@ -1272,7 +1274,7 @@ status_t OMXNodeInstance::emptyBuffer(

    // convert incoming ANW meta buffers if component is configured for gralloc metadata mode
    // ignore rangeOffset in this case
    if (buffer_meta->copyToOmx()
    if (buffer_meta->copyingOrSharingToOmx(header)
            && mMetadataType[kPortIndexInput] == kMetadataBufferTypeGrallocSource
            && backup->capacity() >= sizeof(VideoNativeMetadata)
            && codec->capacity() >= sizeof(VideoGrallocMetadata)