diff options
author | Gloria Wang <gwang@google.com> | 2010-10-29 14:50:17 -0700 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2010-10-29 16:09:48 -0700 |
commit | a89082944308805b0def7de87c67e370e74b8789 (patch) | |
tree | 05fdcd38a3ca77638c3785cc6a84c7ba9bf6b366 /media/libstagefright/AwesomePlayer.cpp | |
parent | c8ca26ed63edcf2731c4773b8ce3141930cc7245 (diff) | |
download | frameworks_av-a89082944308805b0def7de87c67e370e74b8789.zip frameworks_av-a89082944308805b0def7de87c67e370e74b8789.tar.gz frameworks_av-a89082944308805b0def7de87c67e370e74b8789.tar.bz2 |
- register DRM sniffer only when drmserver is up
- notify DRM agents the status after seeking
Change-Id: Id77977fc7548970559dc8974461b0bd1d2aa9514
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index cf04e92..60a41bf 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1192,6 +1192,13 @@ void AwesomePlayer::finishSeekIfNecessary(int64_t videoTimeUs) { mFlags |= FIRST_FRAME; mSeeking = false; mSeekNotificationSent = false; + + if (mDecryptHandle != NULL) { + mDrmManagerClient->setPlaybackStatus(mDecryptHandle, + Playback::PAUSE, 0); + mDrmManagerClient->setPlaybackStatus(mDecryptHandle, + Playback::START, videoTimeUs / 1000); + } } void AwesomePlayer::onVideoEvent() { @@ -1295,13 +1302,6 @@ void AwesomePlayer::onVideoEvent() { TimeSource *ts = (mFlags & AUDIO_AT_EOS) ? &mSystemTimeSource : mTimeSource; - if (mDecryptHandle != NULL) { - mDrmManagerClient->setPlaybackStatus(mDecryptHandle, - Playback::PAUSE, 0); - mDrmManagerClient->setPlaybackStatus(mDecryptHandle, - Playback::START, timeUs / 1000); - } - if (mFlags & FIRST_FRAME) { mFlags &= ~FIRST_FRAME; |