Loading include/media/mediaplayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ enum media_event_type { MEDIA_STARTED = 6, MEDIA_PAUSED = 7, MEDIA_STOPPED = 8, MEDIA_SKIPPED = 9, MEDIA_TIMED_TEXT = 99, MEDIA_ERROR = 100, MEDIA_INFO = 200, Loading media/libstagefright/AwesomePlayer.cpp +17 −3 Original line number Diff line number Diff line Loading @@ -1413,8 +1413,10 @@ status_t AwesomePlayer::seekTo_l(int64_t timeUs) { mSeekTimeUs = timeUs; modifyFlags((AT_EOS | AUDIO_AT_EOS | VIDEO_AT_EOS), CLEAR); if (mFlags & PLAYING) { notifyListener_l(MEDIA_PAUSED); mMediaRenderingStartGeneration = ++mStartGeneration; } seekAudioIfNecessary_l(); Loading Loading @@ -1659,6 +1661,16 @@ void AwesomePlayer::finishSeekIfNecessary(int64_t videoTimeUs) { return; } // If we paused, then seeked, then resumed, it is possible that we have // signaled SEEK_COMPLETE at a copmletely different media time than where // we are now resuming. Signal new position to media time provider. // Cannot signal another SEEK_COMPLETE, as existing clients may not expect // multiple SEEK_COMPLETE responses to a single seek() request. if (mSeekNotificationSent && abs(mSeekTimeUs - videoTimeUs) > 10000) { // notify if we are resuming more than 10ms away from desired seek time notifyListener_l(MEDIA_SKIPPED); } if (mAudioPlayer != NULL) { ALOGV("seeking audio to %lld us (%.2f secs).", videoTimeUs, videoTimeUs / 1E6); Loading Loading @@ -1930,8 +1942,10 @@ void AwesomePlayer::onVideoEvent() { notifyListener_l(MEDIA_INFO, MEDIA_INFO_RENDERING_START); } if (mFlags & PLAYING) { notifyIfMediaStarted_l(); } } mVideoBuffer->release(); mVideoBuffer = NULL; Loading Loading
include/media/mediaplayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ enum media_event_type { MEDIA_STARTED = 6, MEDIA_PAUSED = 7, MEDIA_STOPPED = 8, MEDIA_SKIPPED = 9, MEDIA_TIMED_TEXT = 99, MEDIA_ERROR = 100, MEDIA_INFO = 200, Loading
media/libstagefright/AwesomePlayer.cpp +17 −3 Original line number Diff line number Diff line Loading @@ -1413,8 +1413,10 @@ status_t AwesomePlayer::seekTo_l(int64_t timeUs) { mSeekTimeUs = timeUs; modifyFlags((AT_EOS | AUDIO_AT_EOS | VIDEO_AT_EOS), CLEAR); if (mFlags & PLAYING) { notifyListener_l(MEDIA_PAUSED); mMediaRenderingStartGeneration = ++mStartGeneration; } seekAudioIfNecessary_l(); Loading Loading @@ -1659,6 +1661,16 @@ void AwesomePlayer::finishSeekIfNecessary(int64_t videoTimeUs) { return; } // If we paused, then seeked, then resumed, it is possible that we have // signaled SEEK_COMPLETE at a copmletely different media time than where // we are now resuming. Signal new position to media time provider. // Cannot signal another SEEK_COMPLETE, as existing clients may not expect // multiple SEEK_COMPLETE responses to a single seek() request. if (mSeekNotificationSent && abs(mSeekTimeUs - videoTimeUs) > 10000) { // notify if we are resuming more than 10ms away from desired seek time notifyListener_l(MEDIA_SKIPPED); } if (mAudioPlayer != NULL) { ALOGV("seeking audio to %lld us (%.2f secs).", videoTimeUs, videoTimeUs / 1E6); Loading Loading @@ -1930,8 +1942,10 @@ void AwesomePlayer::onVideoEvent() { notifyListener_l(MEDIA_INFO, MEDIA_INFO_RENDERING_START); } if (mFlags & PLAYING) { notifyIfMediaStarted_l(); } } mVideoBuffer->release(); mVideoBuffer = NULL; Loading