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

Commit e7c83d4a authored by Andreas Huber's avatar Andreas Huber
Browse files

Make AwesomePlayer's reset process more verbose to track down ANRs (yet again)

Change-Id: Ie1d853c31ad75ec5b12303c1131c9a74eb8cfc9f
parent 23a8a459
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -378,11 +378,14 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
}

void AwesomePlayer::reset() {
    LOGI("reset");

    Mutex::Autolock autoLock(mLock);
    reset_l();
}

void AwesomePlayer::reset_l() {
    LOGI("reset_l");
    mDisplayWidth = 0;
    mDisplayHeight = 0;

@@ -408,6 +411,10 @@ void AwesomePlayer::reset_l() {
        }
    }

    if (mFlags & PREPARING) {
        LOGI("waiting until preparation is completes.");
    }

    while (mFlags & PREPARING) {
        mPreparedCondition.wait(mLock);
    }
@@ -431,6 +438,8 @@ void AwesomePlayer::reset_l() {
    }
    mAudioSource.clear();

    LOGI("audio source cleared");

    mTimeSource = NULL;

    delete mAudioPlayer;
@@ -471,6 +480,8 @@ void AwesomePlayer::reset_l() {
        IPCThreadState::self()->flushCommands();
    }

    LOGI("video source cleared");

    mDurationUs = -1;
    mFlags = 0;
    mExtractorFlags = 0;
@@ -487,6 +498,8 @@ void AwesomePlayer::reset_l() {
    mFileSource.clear();

    mBitrate = -1;

    LOGI("reset_l completed");
}

void AwesomePlayer::notifyListener_l(int msg, int ext1, int ext2) {
+1 −1
Original line number Diff line number Diff line
@@ -3269,7 +3269,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);