summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-06-04 10:30:02 -0700
committerLajos Molnar <lajos@google.com>2015-06-05 17:57:19 -0700
commit26a48f304a8754d655e554178ffb6d7ba4c5aac3 (patch)
tree29d2f266cec93fa3aa146d9de238132be0658297 /media/libstagefright/OMXCodec.cpp
parentbf913163c69abf9e67bb393f032d0c3e1a642957 (diff)
downloadframeworks_av-26a48f304a8754d655e554178ffb6d7ba4c5aac3.zip
frameworks_av-26a48f304a8754d655e554178ffb6d7ba4c5aac3.tar.gz
frameworks_av-26a48f304a8754d655e554178ffb6d7ba4c5aac3.tar.bz2
stagefright: add support for batching OMX events
Bug: 20503131 Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r--media/libstagefright/OMXCodec.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 927cc6c..96aa808 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -116,12 +116,15 @@ struct OMXCodecObserver : public BnOMXObserver {
}
// from IOMXObserver
- virtual void onMessage(const omx_message &msg) {
+ virtual void onMessages(const std::list<omx_message> &messages) {
sp<OMXCodec> codec = mTarget.promote();
if (codec.get() != NULL) {
Mutex::Autolock autoLock(codec->mLock);
- codec->on_message(msg);
+ for (std::list<omx_message>::const_iterator it = messages.cbegin();
+ it != messages.cend(); ++it) {
+ codec->on_message(*it);
+ }
codec.clear();
}
}