Merge "Make AwesomePlayer's reset process more verbose to track down ANRs (again)" into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
da6f929584
@@ -378,11 +378,14 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AwesomePlayer::reset() {
|
void AwesomePlayer::reset() {
|
||||||
|
LOGI("reset");
|
||||||
|
|
||||||
Mutex::Autolock autoLock(mLock);
|
Mutex::Autolock autoLock(mLock);
|
||||||
reset_l();
|
reset_l();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AwesomePlayer::reset_l() {
|
void AwesomePlayer::reset_l() {
|
||||||
|
LOGI("reset_l");
|
||||||
mDisplayWidth = 0;
|
mDisplayWidth = 0;
|
||||||
mDisplayHeight = 0;
|
mDisplayHeight = 0;
|
||||||
|
|
||||||
@@ -408,6 +411,10 @@ void AwesomePlayer::reset_l() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mFlags & PREPARING) {
|
||||||
|
LOGI("waiting until preparation is completes.");
|
||||||
|
}
|
||||||
|
|
||||||
while (mFlags & PREPARING) {
|
while (mFlags & PREPARING) {
|
||||||
mPreparedCondition.wait(mLock);
|
mPreparedCondition.wait(mLock);
|
||||||
}
|
}
|
||||||
@@ -431,6 +438,8 @@ void AwesomePlayer::reset_l() {
|
|||||||
}
|
}
|
||||||
mAudioSource.clear();
|
mAudioSource.clear();
|
||||||
|
|
||||||
|
LOGI("audio source cleared");
|
||||||
|
|
||||||
mTimeSource = NULL;
|
mTimeSource = NULL;
|
||||||
|
|
||||||
delete mAudioPlayer;
|
delete mAudioPlayer;
|
||||||
@@ -471,6 +480,8 @@ void AwesomePlayer::reset_l() {
|
|||||||
IPCThreadState::self()->flushCommands();
|
IPCThreadState::self()->flushCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGI("video source cleared");
|
||||||
|
|
||||||
mDurationUs = -1;
|
mDurationUs = -1;
|
||||||
mFlags = 0;
|
mFlags = 0;
|
||||||
mExtractorFlags = 0;
|
mExtractorFlags = 0;
|
||||||
@@ -487,6 +498,8 @@ void AwesomePlayer::reset_l() {
|
|||||||
mFileSource.clear();
|
mFileSource.clear();
|
||||||
|
|
||||||
mBitrate = -1;
|
mBitrate = -1;
|
||||||
|
|
||||||
|
LOGI("reset_l completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AwesomePlayer::notifyListener_l(int msg, int ext1, int ext2) {
|
void AwesomePlayer::notifyListener_l(int msg, int ext1, int ext2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user