From 63edd77ab527f615afc193ea50e15dfcdeb9fe6f Mon Sep 17 00:00:00 2001 From: Manoj Kumar AVM Date: Thu, 3 Sep 2015 16:26:25 -0700 Subject: Stagefright: Addition of DS capability Adding support for sending and receiving DS Mode events. Change-Id: I5be1c1e9b7c33b55f0f3aa71725b90cd0f90f0ad --- media/libstagefright/ACodec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'media/libstagefright/ACodec.cpp') diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 238cd47..43006f3 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -5205,6 +5205,8 @@ bool ACodec::BaseState::onOMXFillBufferDone( reply->setInt32("buffer-id", info->mBufferID); + (void)mCodec->setDSModeHint(reply, flags, timeUs); + notify->setMessage("reply", reply); notify->post(); @@ -5259,8 +5261,9 @@ void ACodec::BaseState::onOutputBufferDrained(const sp &msg) { ALOGW_IF(err != NO_ERROR, "failed to set crop: %d", err); } + bool skip = mCodec->getDSModeHint(msg); int32_t render; - if (mCodec->mNativeWindow != NULL + if (!skip && mCodec->mNativeWindow != NULL && msg->findInt32("render", &render) && render != 0 && info->mData != NULL && info->mData->size() != 0) { ATRACE_NAME("render"); -- cgit v1.1