diff options
author | Gloria Wang <gwang@google.com> | 2010-11-01 15:53:16 -0700 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2010-11-05 10:33:58 -0700 |
commit | b371426ce4cf2fa6d8c3d1903b61322feb165d35 (patch) | |
tree | ce2c36b33cf39e393b68d5feba1cb03d7ef0ed53 /media/libstagefright/AwesomePlayer.cpp | |
parent | a935bc4696e4060c362b0f6913cc220331667a35 (diff) | |
download | frameworks_av-b371426ce4cf2fa6d8c3d1903b61322feb165d35.zip frameworks_av-b371426ce4cf2fa6d8c3d1903b61322feb165d35.tar.gz frameworks_av-b371426ce4cf2fa6d8c3d1903b61322feb165d35.tar.bz2 |
Add support for WV DRM
Change-Id: I0408c5e0a488f112a84337b21b0cd4613a4da461
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index ca90c0c..4e1969b 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -416,6 +416,7 @@ void AwesomePlayer::reset_l() { if (mDecryptHandle != NULL) { mDrmManagerClient->setPlaybackStatus(mDecryptHandle, Playback::STOP, 0); + mDrmManagerClient->closeDecryptSession(mDecryptHandle); mDecryptHandle = NULL; mDrmManagerClient = NULL; } @@ -1667,9 +1668,15 @@ status_t AwesomePlayer::finishSetDataSource_l() { } dataSource->getDrmInfo(&mDecryptHandle, &mDrmManagerClient); - if (mDecryptHandle != NULL - && RightsStatus::RIGHTS_VALID != mDecryptHandle->status) { - notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE); + if (mDecryptHandle != NULL) { + if (RightsStatus::RIGHTS_VALID == mDecryptHandle->status) { + if (DecryptApiType::WV_BASED == mDecryptHandle->decryptApiType) { + LOGD("Setting mCachedSource to NULL for WVM\n"); + mCachedSource.clear(); + } + } else { + notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE); + } } return setDataSource_l(extractor); |