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

Commit 003f6d61 authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am a5293d1c: Add some logging to track down where ANR happens during MediaPlayer._release().

* commit 'a5293d1ca4459293f4993ea39c09ea703a022844':
  Add some logging to track down where ANR happens during MediaPlayer._release().
parents ff2e0968 37b2d62d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -400,6 +400,7 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
}

void AwesomePlayer::reset() {
    LOGI("reset");
    Mutex::Autolock autoLock(mLock);
    reset_l();
}
@@ -413,8 +414,10 @@ void AwesomePlayer::reset_l() {
                    Playback::STOP, 0);
            mDecryptHandle = NULL;
            mDrmManagerClient = NULL;
            LOGI("DRM manager client stopped");
    }


    if (mFlags & PLAYING) {
        uint32_t params = IMediaPlayerService::kBatteryDataTrackDecoder;
        if ((mAudioSource != NULL) && (mAudioSource != mAudioTrack)) {
@@ -447,6 +450,7 @@ void AwesomePlayer::reset_l() {
        mPreparedCondition.wait(mLock);
    }

    LOGI("cancel player events");
    cancelPlayerEvents();

    mWVMExtractor.clear();
@@ -496,6 +500,7 @@ void AwesomePlayer::reset_l() {
            usleep(1000);
        }
        IPCThreadState::self()->flushCommands();
        LOGI("video decoder shutdown completed");
    }

    mDurationUs = -1;
+2 −1
Original line number Diff line number Diff line
@@ -3339,7 +3339,7 @@ status_t OMXCodec::start(MetaData *meta) {
}

status_t OMXCodec::stop() {
    CODEC_LOGV("stop mState=%d", mState);
    CODEC_LOGI("stop mState=%d", mState);

    Mutex::Autolock autoLock(mLock);

@@ -3401,6 +3401,7 @@ status_t OMXCodec::stop() {
        mLeftOverBuffer = NULL;
    }

    CODEC_LOGI("stopping video source");
    mSource->stop();

    CODEC_LOGI("stopped in state %d", mState);