Add some logging to track down where ANR happens during MediaPlayer._release().
o add a log message in AwesomePlayer::reset before acquiring the lock Change-Id: I9f228f615f99c03c394e9d0dd78c855c0b9fcfbb related-to-bug: 4409547
This commit is contained in:
@ -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;
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user