diff options
author | Gloria Wang <gwang@google.com> | 2010-11-22 21:26:13 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-22 21:26:13 -0800 |
commit | e81e8153c85fa0b0aebae686f6ba51ed2c3a2d11 (patch) | |
tree | a017cf53f00999690df527f76a6e0ba16ff926c0 /media/libstagefright/AwesomePlayer.cpp | |
parent | f798e438c3997fd3fb39538bf3e958cfdc7a477c (diff) | |
parent | c533edc9c70dd9434e2e496dc0d52f534472c7e0 (diff) | |
download | frameworks_av-e81e8153c85fa0b0aebae686f6ba51ed2c3a2d11.zip frameworks_av-e81e8153c85fa0b0aebae686f6ba51ed2c3a2d11.tar.gz frameworks_av-e81e8153c85fa0b0aebae686f6ba51ed2c3a2d11.tar.bz2 |
am 4da48ec8: Merge "Notify the playback status to DRM agents before the playback starts"
* commit '4da48ec88338af2df6f9abba850fb4c65918bb82':
Notify the playback status to DRM agents before the playback starts
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index e65c943..0bc4062 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -762,6 +762,13 @@ status_t AwesomePlayer::play_l() { bool deferredAudioSeek = false; + if (mDecryptHandle != NULL) { + int64_t position; + getPosition(&position); + mDrmManagerClient->setPlaybackStatus(mDecryptHandle, + Playback::START, position / 1000); + } + if (mAudioSource != NULL) { if (mAudioPlayer == NULL) { if (mAudioSink != NULL) { @@ -779,6 +786,11 @@ status_t AwesomePlayer::play_l() { mFlags &= ~(PLAYING | FIRST_FRAME); + if (mDecryptHandle != NULL) { + mDrmManagerClient->setPlaybackStatus(mDecryptHandle, + Playback::STOP, 0); + } + return err; } @@ -815,13 +827,6 @@ status_t AwesomePlayer::play_l() { seekTo_l(0); } - if (mDecryptHandle != NULL) { - int64_t position; - getPosition(&position); - mDrmManagerClient->setPlaybackStatus(mDecryptHandle, - Playback::START, position / 1000); - } - return OK; } |