Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +6 −7 Original line number Diff line number Diff line Loading @@ -1376,16 +1376,15 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) { sp<NuPlayerDriver> driver = mDriver.promote(); if (driver != NULL) { driver->notifyPrepareCompleted(err); } // notify duration first, so that it's definitely set when // the app received the "prepare complete" callback. int64_t durationUs; if (mDriver != NULL && mSource->getDuration(&durationUs) == OK) { sp<NuPlayerDriver> driver = mDriver.promote(); if (driver != NULL) { if (mSource->getDuration(&durationUs) == OK) { driver->notifyDuration(durationUs); } driver->notifyPrepareCompleted(err); } break; } Loading media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,10 @@ status_t NuPlayerDriver::seekTo(int msec) { case STATE_PREPARED: { mStartupSeekTimeUs = seekTimeUs; // 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(); break; } Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +6 −7 Original line number Diff line number Diff line Loading @@ -1376,16 +1376,15 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) { sp<NuPlayerDriver> driver = mDriver.promote(); if (driver != NULL) { driver->notifyPrepareCompleted(err); } // notify duration first, so that it's definitely set when // the app received the "prepare complete" callback. int64_t durationUs; if (mDriver != NULL && mSource->getDuration(&durationUs) == OK) { sp<NuPlayerDriver> driver = mDriver.promote(); if (driver != NULL) { if (mSource->getDuration(&durationUs) == OK) { driver->notifyDuration(durationUs); } driver->notifyPrepareCompleted(err); } break; } Loading
media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,10 @@ status_t NuPlayerDriver::seekTo(int msec) { case STATE_PREPARED: { mStartupSeekTimeUs = seekTimeUs; // 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(); break; } Loading