diff options
| author | Gloria Wang <gwang@google.com> | 2010-11-03 10:59:23 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-03 10:59:23 -0700 |
| commit | 8f7a0275f22e86c4436df1a64664865c24072c49 (patch) | |
| tree | 8c33b78bfe7f9e2e52cf9f53079ae2d21e61daf7 /media | |
| parent | a7bd8857383bb20d9a5589cd60752a842230131f (diff) | |
| parent | cf393faaa871333496a63c13196fdbc0f2bd9118 (diff) | |
| download | frameworks_base-8f7a0275f22e86c4436df1a64664865c24072c49.zip frameworks_base-8f7a0275f22e86c4436df1a64664865c24072c49.tar.gz frameworks_base-8f7a0275f22e86c4436df1a64664865c24072c49.tar.bz2 | |
am cf393faa: Merge "resolved conflicts for merge of c1c45a4d to gingerbread-plus-aosp" into gingerbread-plus-aosp
* commit 'cf393faaa871333496a63c13196fdbc0f2bd9118':
- Move the business rule management down to DRM agents. - Do not register DRM sniffer because drmserver is not enabled.
Diffstat (limited to 'media')
| -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 6954e36..ca90c0c 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -333,14 +333,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); @@ -408,11 +403,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; } @@ -426,8 +416,6 @@ void AwesomePlayer::reset_l() { if (mDecryptHandle != NULL) { mDrmManagerClient->setPlaybackStatus(mDecryptHandle, Playback::STOP, 0); - mDrmManagerClient->consumeRights(mDecryptHandle, - Action::PLAY, false); mDecryptHandle = NULL; mDrmManagerClient = NULL; } @@ -1679,14 +1667,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); |
