summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-05-01 20:12:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-01 20:12:34 +0000
commit88014186c34dbc5c8f4cdf0936cae2a36e4b61ac (patch)
tree8eb907919db111a5cb1eabc623a045b8036d913d /media/libstagefright
parentee7a5ef61b8d1149811ee73c80aca2ac8474d559 (diff)
parentee46bd378b7a68789be9c85d8a59fa02d4aed030 (diff)
downloadframeworks_av-88014186c34dbc5c8f4cdf0936cae2a36e4b61ac.zip
frameworks_av-88014186c34dbc5c8f4cdf0936cae2a36e4b61ac.tar.gz
frameworks_av-88014186c34dbc5c8f4cdf0936cae2a36e4b61ac.tar.bz2
am ee46bd37: am 2b0b701f: am 0c388650: Merge "ACodec: add frame render/drop systrace"
* commit 'ee46bd378b7a68789be9c85d8a59fa02d4aed030': ACodec: add frame render/drop systrace
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/ACodec.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index f11791c..5bca317 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -17,6 +17,8 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "ACodec"
+#include <utils/Trace.h>
+
#include <media/stagefright/ACodec.h>
#include <binder/MemoryDealer.h>
@@ -3681,6 +3683,7 @@ void ACodec::BaseState::onOutputBufferDrained(const sp<AMessage> &msg) {
if (mCodec->mNativeWindow != NULL
&& msg->findInt32("render", &render) && render != 0
&& info->mData != NULL && info->mData->size() != 0) {
+ ATRACE_NAME("render");
// The client wants this buffer to be rendered.
status_t err;
@@ -3693,6 +3696,10 @@ void ACodec::BaseState::onOutputBufferDrained(const sp<AMessage> &msg) {
info->mStatus = BufferInfo::OWNED_BY_US;
}
} else {
+ if (mCodec->mNativeWindow != NULL &&
+ (info->mData == NULL || info->mData->size() != 0)) {
+ ATRACE_NAME("frame-drop");
+ }
info->mStatus = BufferInfo::OWNED_BY_US;
}