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

Commit 8bdac969 authored by Ed Heyl's avatar Ed Heyl Committed by Android Git Automerger
Browse files

am 9fbe9429: Merge remote-tracking branch \'goog/jb-dev-mako\' into jb-mr1-dev

* commit '9fbe9429':
  NuPlayer: Prevents creation of Video Decoder when we use Music Player
  Synchronize access to OMX class member variables
  Merge from jb-dev for "sample video corruption in MediaCodec mode." DO NOT MERGE
  libstagefright: dynamically load libstagefright_chromium_http
  Process EBD and FBD messages in ERROR state
  Add vendor specific output color format
parents d14639c3 9fbe9429
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -258,7 +258,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
            ALOGV("scanning sources haveAudio=%d, haveVideo=%d",
                 mAudioDecoder != NULL, mVideoDecoder != NULL);

            if (mNativeWindow != NULL) {
                instantiateDecoder(false, &mVideoDecoder);
            }

            if (mAudioSink != NULL) {
                instantiateDecoder(true, &mAudioDecoder);
@@ -279,7 +281,8 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                break;
            }

            if (mAudioDecoder == NULL || mVideoDecoder == NULL) {
            if (mAudioDecoder == NULL && mAudioSink != NULL ||
                mVideoDecoder == NULL && mNativeWindow != NULL) {
                msg->post(100000ll);
                mScanSourcesPending = true;
            }
+2 −1
Original line number Diff line number Diff line
@@ -1358,7 +1358,8 @@ status_t ACodec::setSupportedOutputFormat() {
           || format.eColorFormat == OMX_COLOR_FormatYUV420SemiPlanar
           || format.eColorFormat == OMX_COLOR_FormatCbYCrY
           || format.eColorFormat == OMX_TI_COLOR_FormatYUV420PackedSemiPlanar
           || format.eColorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar);
           || format.eColorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar
           || format.eColorFormat == OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka);

    return mOMX->setParameter(
            mNode, OMX_IndexParamVideoPortFormat,
+10 −3
Original line number Diff line number Diff line
@@ -1217,7 +1217,8 @@ status_t OMXCodec::setVideoOutputFormat(
               || format.eColorFormat == OMX_COLOR_FormatYUV420SemiPlanar
               || format.eColorFormat == OMX_COLOR_FormatCbYCrY
               || format.eColorFormat == OMX_TI_COLOR_FormatYUV420PackedSemiPlanar
               || format.eColorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar);
               || format.eColorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar
               || format.eColorFormat == OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka);

        err = mOMX->setParameter(
                mNode, OMX_IndexParamVideoPortFormat,
@@ -2047,9 +2048,15 @@ int64_t OMXCodec::getDecodingTimeUs() {

void OMXCodec::on_message(const omx_message &msg) {
    if (mState == ERROR) {
        ALOGW("Dropping OMX message - we're in ERROR state.");
        /*
         * only drop EVENT messages, EBD and FBD are still
         * processed for bookkeeping purposes
         */
        if (msg.type == omx_message::EVENT) {
            ALOGW("Dropping OMX EVENT message - we're in ERROR state.");
            return;
        }
    }

    switch (msg.type) {
        case omx_message::EVENT:
+10 −7
Original line number Diff line number Diff line
@@ -252,6 +252,8 @@ status_t OMX::allocateNode(
status_t OMX::freeNode(node_id node) {
    OMXNodeInstance *instance = findInstance(node);

    {
        Mutex::Autolock autoLock(mLock);
        ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
        if (index < 0) {
            // This could conceivably happen if the observer dies at roughly the
@@ -259,6 +261,7 @@ status_t OMX::freeNode(node_id node) {
            return OK;
        }
        mLiveNodes.removeItemsAt(index);
    }

    instance->observer()->asBinder()->unlinkToDeath(this);

@@ -266,7 +269,7 @@ status_t OMX::freeNode(node_id node) {

    {
        Mutex::Autolock autoLock(mLock);
        index = mDispatchers.indexOfKey(node);
        ssize_t index = mDispatchers.indexOfKey(node);
        CHECK(index >= 0);
        mDispatchers.removeItemsAt(index);
    }