Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88014186 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android Git Automerger
Browse files

am ee46bd37: am 2b0b701f: am 0c388650: Merge "ACodec: add frame render/drop systrace"

* commit 'ee46bd37':
  ACodec: add frame render/drop systrace
parents ee7a5ef6 ee46bd37
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;
    }