Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -803,6 +803,14 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { err = UNKNOWN_ERROR; } mRenderer->queueEOS(audio, err); if (audio && mFlushingAudio != NONE) { mAudioDecoder.clear(); mFlushingAudio = SHUT_DOWN; } else if (!audio && mFlushingVideo != NONE){ mVideoDecoder.clear(); mFlushingVideo = SHUT_DOWN; } finishFlushIfPossible(); } else if (what == Decoder::kWhatDrainThisBuffer) { renderBuffer(audio, msg); } else { Loading media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -44,11 +44,11 @@ NuPlayer::Decoder::Decoder( // Every decoder has its own looper because MediaCodec operations // are blocking, but NuPlayer needs asynchronous operations. mDecoderLooper = new ALooper; mDecoderLooper->setName("NuPlayerDecoder"); mDecoderLooper->setName("NPDecoder"); mDecoderLooper->start(false, false, ANDROID_PRIORITY_AUDIO); mCodecLooper = new ALooper; mCodecLooper->setName("NuPlayerDecoder-MC"); mCodecLooper->setName("NPDecoder-CL"); mCodecLooper->start(false, false, ANDROID_PRIORITY_AUDIO); } Loading media/libstagefright/MediaCodec.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -716,7 +716,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findInt32("err", &err)); CHECK(msg->findInt32("actionCode", &actionCode)); ALOGE("Codec reported err %#x, actionCode %d", err, actionCode); ALOGE("Codec reported err %#x, actionCode %d, while in state %d", err, actionCode, mState); if (err == DEAD_OBJECT) { mFlags |= kFlagSawMediaServerDie; } Loading Loading @@ -767,8 +768,12 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { case FLUSHING: { if (actionCode == ACTION_CODE_FATAL) { setState(UNINITIALIZED); } else { setState( (mFlags & kFlagIsAsync) ? FLUSHED : STARTED); } break; } Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -803,6 +803,14 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { err = UNKNOWN_ERROR; } mRenderer->queueEOS(audio, err); if (audio && mFlushingAudio != NONE) { mAudioDecoder.clear(); mFlushingAudio = SHUT_DOWN; } else if (!audio && mFlushingVideo != NONE){ mVideoDecoder.clear(); mFlushingVideo = SHUT_DOWN; } finishFlushIfPossible(); } else if (what == Decoder::kWhatDrainThisBuffer) { renderBuffer(audio, msg); } else { Loading
media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -44,11 +44,11 @@ NuPlayer::Decoder::Decoder( // Every decoder has its own looper because MediaCodec operations // are blocking, but NuPlayer needs asynchronous operations. mDecoderLooper = new ALooper; mDecoderLooper->setName("NuPlayerDecoder"); mDecoderLooper->setName("NPDecoder"); mDecoderLooper->start(false, false, ANDROID_PRIORITY_AUDIO); mCodecLooper = new ALooper; mCodecLooper->setName("NuPlayerDecoder-MC"); mCodecLooper->setName("NPDecoder-CL"); mCodecLooper->start(false, false, ANDROID_PRIORITY_AUDIO); } Loading
media/libstagefright/MediaCodec.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -716,7 +716,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findInt32("err", &err)); CHECK(msg->findInt32("actionCode", &actionCode)); ALOGE("Codec reported err %#x, actionCode %d", err, actionCode); ALOGE("Codec reported err %#x, actionCode %d, while in state %d", err, actionCode, mState); if (err == DEAD_OBJECT) { mFlags |= kFlagSawMediaServerDie; } Loading Loading @@ -767,8 +768,12 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { case FLUSHING: { if (actionCode == ACTION_CODE_FATAL) { setState(UNINITIALIZED); } else { setState( (mFlags & kFlagIsAsync) ? FLUSHED : STARTED); } break; } Loading