diff options
author | Gloria Wang <gwang@google.com> | 2010-11-02 14:02:59 -0700 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2010-11-02 14:02:59 -0700 |
commit | 606649635ecb5a7f1378f2538a25fee64214ff42 (patch) | |
tree | a5309fe2c66eeb7ae5ed6a7a10fd01ab73cd29e1 /media/libstagefright/AwesomePlayer.cpp | |
parent | 2726a0ff895ecc0eac3ea5dbc04f407b008cc7f0 (diff) | |
parent | 55426ce7eded04c9993149edd86f861cfccb4d19 (diff) | |
download | frameworks_av-606649635ecb5a7f1378f2538a25fee64214ff42.zip frameworks_av-606649635ecb5a7f1378f2538a25fee64214ff42.tar.gz frameworks_av-606649635ecb5a7f1378f2538a25fee64214ff42.tar.bz2 |
resolved conflicts for merge of c1c45a4d to gingerbread-plus-aosp
Change-Id: I5411eaa0426cf208c6db3570f707d1b6b4baf455
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 6eeab05..e0bcdc3 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -301,14 +301,9 @@ status_t AwesomePlayer::setDataSource_l( } dataSource->getDrmInfo(&mDecryptHandle, &mDrmManagerClient); - if (mDecryptHandle != NULL) { - if (RightsStatus::RIGHTS_VALID == mDecryptHandle->status) { - if (DecryptApiType::CONTAINER_BASED == mDecryptHandle->decryptApiType) { - mDrmManagerClient->consumeRights(mDecryptHandle, Action::PLAY, true); - } - } else { - notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE); - } + if (mDecryptHandle != NULL + && RightsStatus::RIGHTS_VALID != mDecryptHandle->status) { + notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE); } return setDataSource_l(extractor); @@ -376,11 +371,6 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) { } mExtractorFlags = extractor->flags(); - if (mDecryptHandle != NULL) { - if (DecryptApiType::ELEMENTARY_STREAM_BASED == mDecryptHandle->decryptApiType) { - mDrmManagerClient->consumeRights(mDecryptHandle, Action::PLAY, true); - } - } return OK; } @@ -394,8 +384,6 @@ void AwesomePlayer::reset_l() { if (mDecryptHandle != NULL) { mDrmManagerClient->setPlaybackStatus(mDecryptHandle, Playback::STOP, 0); - mDrmManagerClient->consumeRights(mDecryptHandle, - Action::PLAY, false); mDecryptHandle = NULL; mDrmManagerClient = NULL; } @@ -1607,14 +1595,9 @@ status_t AwesomePlayer::finishSetDataSource_l() { } dataSource->getDrmInfo(&mDecryptHandle, &mDrmManagerClient); - if (mDecryptHandle != NULL) { - if (RightsStatus::RIGHTS_VALID == mDecryptHandle->status) { - if (DecryptApiType::CONTAINER_BASED == mDecryptHandle->decryptApiType) { - mDrmManagerClient->consumeRights(mDecryptHandle, Action::PLAY, true); - } - } else { - notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE); - } + if (mDecryptHandle != NULL + && RightsStatus::RIGHTS_VALID != mDecryptHandle->status) { + notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE); } return setDataSource_l(extractor); |