Loading media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +19 −14 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ status_t NuPlayerDriver::start() { if (mStartupSeekTimeUs >= 0) { if (mStartupSeekTimeUs == 0) { notifySeekComplete(); notifySeekComplete_l(); } else { mPlayer->seekToAsync(mStartupSeekTimeUs); } Loading Loading @@ -320,7 +320,7 @@ status_t NuPlayerDriver::seekTo(int msec) { // pretend that the seek completed. It will actually happen when starting playback. // TODO: actually perform the seek here, so the player is ready to go at the new // location notifySeekComplete(); notifySeekComplete_l(); break; } Loading Loading @@ -525,9 +525,12 @@ void NuPlayerDriver::notifyPosition(int64_t positionUs) { } void NuPlayerDriver::notifySeekComplete() { bool wasSeeking = true; { Mutex::Autolock autoLock(mLock); notifySeekComplete_l(); } void NuPlayerDriver::notifySeekComplete_l() { bool wasSeeking = true; if (mState == STATE_STOPPED_AND_PREPARING) { wasSeeking = false; mState = STATE_STOPPED_AND_PREPARED; Loading @@ -540,8 +543,10 @@ void NuPlayerDriver::notifySeekComplete() { // no need to notify listener return; } } // note: notifyListener called with lock held mLock.unlock(); notifyListener(wasSeeking ? MEDIA_SEEK_COMPLETE : MEDIA_PREPARED); mLock.lock(); } void NuPlayerDriver::notifyFrameStats( Loading media/libmediaplayerservice/nuplayer/NuPlayerDriver.h +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ struct NuPlayerDriver : public MediaPlayerInterface { void notifyDuration(int64_t durationUs); void notifyPosition(int64_t positionUs); void notifySeekComplete(); void notifySeekComplete_l(); void notifyFrameStats(int64_t numFramesTotal, int64_t numFramesDropped); void notifyListener(int msg, int ext1 = 0, int ext2 = 0, const Parcel *in = NULL); void notifyFlagsChanged(uint32_t flags); Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +19 −14 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ status_t NuPlayerDriver::start() { if (mStartupSeekTimeUs >= 0) { if (mStartupSeekTimeUs == 0) { notifySeekComplete(); notifySeekComplete_l(); } else { mPlayer->seekToAsync(mStartupSeekTimeUs); } Loading Loading @@ -320,7 +320,7 @@ status_t NuPlayerDriver::seekTo(int msec) { // pretend that the seek completed. It will actually happen when starting playback. // TODO: actually perform the seek here, so the player is ready to go at the new // location notifySeekComplete(); notifySeekComplete_l(); break; } Loading Loading @@ -525,9 +525,12 @@ void NuPlayerDriver::notifyPosition(int64_t positionUs) { } void NuPlayerDriver::notifySeekComplete() { bool wasSeeking = true; { Mutex::Autolock autoLock(mLock); notifySeekComplete_l(); } void NuPlayerDriver::notifySeekComplete_l() { bool wasSeeking = true; if (mState == STATE_STOPPED_AND_PREPARING) { wasSeeking = false; mState = STATE_STOPPED_AND_PREPARED; Loading @@ -540,8 +543,10 @@ void NuPlayerDriver::notifySeekComplete() { // no need to notify listener return; } } // note: notifyListener called with lock held mLock.unlock(); notifyListener(wasSeeking ? MEDIA_SEEK_COMPLETE : MEDIA_PREPARED); mLock.lock(); } void NuPlayerDriver::notifyFrameStats( Loading
media/libmediaplayerservice/nuplayer/NuPlayerDriver.h +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ struct NuPlayerDriver : public MediaPlayerInterface { void notifyDuration(int64_t durationUs); void notifyPosition(int64_t positionUs); void notifySeekComplete(); void notifySeekComplete_l(); void notifyFrameStats(int64_t numFramesTotal, int64_t numFramesDropped); void notifyListener(int msg, int ext1 = 0, int ext2 = 0, const Parcel *in = NULL); void notifyFlagsChanged(uint32_t flags); Loading