diff options
author | Ed Heyl <ed@google.com> | 2012-07-29 16:47:58 -0700 |
---|---|---|
committer | Ed Heyl <ed@google.com> | 2012-07-29 16:47:58 -0700 |
commit | 9fbe94294ce2053d102ff5de89846a0c5015fb58 (patch) | |
tree | 7ba08233afeb658bdd59e1e0b12e96638ee796a4 /media | |
parent | 3beb3ff4af08ea02da87e6548e0544d2ba47daf1 (diff) | |
parent | 5d246efa220a7c7b22e490576c488b3853c664dd (diff) | |
download | frameworks_av-9fbe94294ce2053d102ff5de89846a0c5015fb58.zip frameworks_av-9fbe94294ce2053d102ff5de89846a0c5015fb58.tar.gz frameworks_av-9fbe94294ce2053d102ff5de89846a0c5015fb58.tar.bz2 |
Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev
Conflicts:
services/audioflinger/AudioFlinger.cpp
Change-Id: If27e4ff35de1e182394cc149e1557a49f0f7c95b
Diffstat (limited to 'media')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 7 | ||||
-rw-r--r-- | media/libstagefright/ACodec.cpp | 3 | ||||
-rwxr-xr-x | media/libstagefright/OMXCodec.cpp | 13 | ||||
-rw-r--r-- | media/libstagefright/omx/OMX.cpp | 17 |
4 files changed, 27 insertions, 13 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index 8f45491..daf60f6 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -258,7 +258,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { ALOGV("scanning sources haveAudio=%d, haveVideo=%d", mAudioDecoder != NULL, mVideoDecoder != NULL); - instantiateDecoder(false, &mVideoDecoder); + 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; } diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index b4894e9..f96a429 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -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, diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 8fbcb8a..2f5e9a4 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -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,8 +2048,14 @@ int64_t OMXCodec::getDecodingTimeUs() { void OMXCodec::on_message(const omx_message &msg) { if (mState == ERROR) { - ALOGW("Dropping OMX message - we're in ERROR state."); - return; + /* + * 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) { diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index 681e321..29bc733 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -252,13 +252,16 @@ status_t OMX::allocateNode( status_t OMX::freeNode(node_id node) { OMXNodeInstance *instance = findInstance(node); - ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder()); - if (index < 0) { - // This could conceivably happen if the observer dies at roughly the - // same time that a client attempts to free the node explicitly. - return OK; + { + 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 + // same time that a client attempts to free the node explicitly. + return OK; + } + mLiveNodes.removeItemsAt(index); } - 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); } |