Merge "codec2: wait for fence in VideoNativeMetadata" into qt-dev am: c3fa11b6cc am: 4c6d99520c

am: be86ab7c08

Change-Id: Ibbbd2236819b8d760348f827ef893c55a389bda5
gugelfrei
Wonsik Kim 5 years ago committed by android-build-merger
commit eb9b5ebfd5

@ -25,6 +25,7 @@
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/foundation/AUtils.h>
#include <nativebase/nativebase.h>
#include <ui/Fence.h>
#include <C2AllocatorGralloc.h>
#include <C2BlockInternal.h>
@ -590,7 +591,12 @@ std::shared_ptr<C2Buffer> GraphicMetadataBuffer::asC2Buffer() {
std::shared_ptr<C2GraphicBlock> block = _C2BlockFactory::CreateGraphicBlock(alloc);
meta->pBuffer = 0;
// TODO: fence
// TODO: wrap this in C2Fence so that the component can wait when it
// actually starts processing.
if (meta->nFenceFd >= 0) {
sp<Fence> fence(new Fence(meta->nFenceFd));
fence->waitForever(LOG_TAG);
}
return C2Buffer::CreateGraphicBuffer(
block->share(C2Rect(buffer->width, buffer->height), C2Fence()));
#else

Loading…
Cancel
Save