diff options
author | Lajos Molnar <lajos@google.com> | 2015-06-22 05:03:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-22 05:03:04 +0000 |
commit | 5cecaa9430ef1d721968f1cd621c1c45c52190ce (patch) | |
tree | 2923f08f431767fdaee186ecc6c79b2cca21f207 | |
parent | 81e998b0d1a8f35c2eadce994ab930e83bfc9d0b (diff) | |
parent | e421a32aa696cd8abbf8fdc97cc8f37dbf372cac (diff) | |
download | frameworks_av-5cecaa9430ef1d721968f1cd621c1c45c52190ce.zip frameworks_av-5cecaa9430ef1d721968f1cd621c1c45c52190ce.tar.gz frameworks_av-5cecaa9430ef1d721968f1cd621c1c45c52190ce.tar.bz2 |
Merge "stagefright: allow state change while handling OMX message list" into mnc-dev
-rw-r--r-- | include/media/stagefright/ACodec.h | 3 | ||||
-rw-r--r-- | media/libstagefright/ACodec.cpp | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h index f9ea38e..a4b24d7 100644 --- a/include/media/stagefright/ACodec.h +++ b/include/media/stagefright/ACodec.h @@ -110,6 +110,9 @@ private: enum { kWhatSetup = 'setu', kWhatOMXMessage = 'omx ', + // same as kWhatOMXMessage - but only used with + // handleMessage during OMX message-list handling + kWhatOMXMessageItem = 'omxI', kWhatOMXMessageList = 'omxL', kWhatInputBufferFilled = 'inpF', kWhatOutputBufferDrained = 'outD', diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 478a0f5..bb53ce6 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -4511,6 +4511,12 @@ bool ACodec::BaseState::onMessageReceived(const sp<AMessage> &msg) { return checkOMXMessage(msg) ? onOMXMessageList(msg) : true; } + case ACodec::kWhatOMXMessageItem: + { + // no need to check as we already did it for kWhatOMXMessageList + return onOMXMessage(msg); + } + case ACodec::kWhatOMXMessage: { return checkOMXMessage(msg) ? onOMXMessage(msg) : true; @@ -4598,7 +4604,8 @@ bool ACodec::BaseState::onOMXMessageList(const sp<AMessage> &msg) { bool receivedRenderedEvents = false; for (std::list<sp<AMessage>>::const_iterator it = msgList->getList().cbegin(); it != msgList->getList().cend(); ++it) { - onOMXMessage(*it); + (*it)->setWhat(ACodec::kWhatOMXMessageItem); + mCodec->handleMessage(*it); int32_t type; CHECK((*it)->findInt32("type", &type)); if (type == omx_message::FRAME_RENDERED) { |