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

Commit 60dc41e4 authored by Manoj Kumar AVM's avatar Manoj Kumar AVM Committed by Gerrit - the friendly Code Review server
Browse files

Stagefright: Addition of DS capability

Adding support for sending and receiving DS Mode
events.

Change-Id: I5be1c1e9b7c33b55f0f3aa71725b90cd0f90f0ad
parent ec26dd12
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -565,6 +565,15 @@ protected:
        return OK;
    }

    virtual status_t setDSModeHint(sp<AMessage>& msg,
        OMX_U32 flags, int64_t timeUs) {
        return UNKNOWN_ERROR;
    }

    virtual bool getDSModeHint(const sp<AMessage>& msg) {
        return false;
    }

    sp<IOMXObserver> createObserver();

    DISALLOW_EVIL_CONSTRUCTORS(ACodec);
+4 −1
Original line number Diff line number Diff line
@@ -6220,6 +6220,8 @@ bool ACodec::BaseState::onOMXFillBufferDone(

            reply->setInt32("buffer-id", info->mBufferID);

            (void)mCodec->setDSModeHint(reply, flags, timeUs);

            notify->setMessage("reply", reply);

            notify->post();
@@ -6285,8 +6287,9 @@ void ACodec::BaseState::onOutputBufferDrained(const sp<AMessage> &msg) {
        ALOGW_IF(err != NO_ERROR, "failed to set dataspace: %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");