From 326dff446c95d772d1f80f086ccff86b3ff8bf25 Mon Sep 17 00:00:00 2001 From: "xhwang@chromium.org" Date: Wed, 10 Oct 2012 23:36:31 +0000 Subject: Add decryptor requesting and kNoKey handling in DecryptingVideoDecoder (DVD). - These logic was previously implemented in ProxyDecryptor. Now add them into DVD so that the DVD can talk directly to other Decryptor implementations such as the PpapiDecryptor. - Since we have more states in DVD now, add more state enum to manage state transition. - Add RequestDecryptorNotificationCB for decryptor creation notification. - Add KeyAddedCB for notifying the DVD that new key has been added. BUG=141784 TEST=current unittests pass; added more unittests. Review URL: https://chromiumcodereview.appspot.com/11074010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161231 0039d316-1c4b-4281-b951-d872f2087c98 --- media/crypto/aes_decryptor.cc | 3 ++- media/crypto/aes_decryptor.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'media/crypto') diff --git a/media/crypto/aes_decryptor.cc b/media/crypto/aes_decryptor.cc index 5e41ea7..b4691a5 100644 --- a/media/crypto/aes_decryptor.cc +++ b/media/crypto/aes_decryptor.cc @@ -235,7 +235,8 @@ void AesDecryptor::CancelDecrypt() { } void AesDecryptor::InitializeVideoDecoder(const VideoDecoderConfig& config, - const DecoderInitCB& init_cb) { + const DecoderInitCB& init_cb, + const KeyAddedCB& key_added_cb) { // AesDecryptor does not support video decoding. Always return false here. init_cb.Run(false); } diff --git a/media/crypto/aes_decryptor.h b/media/crypto/aes_decryptor.h index 2df8613..b239570 100644 --- a/media/crypto/aes_decryptor.h +++ b/media/crypto/aes_decryptor.h @@ -52,7 +52,8 @@ class MEDIA_EXPORT AesDecryptor : public Decryptor { const DecryptCB& decrypt_cb) OVERRIDE; virtual void CancelDecrypt() OVERRIDE; virtual void InitializeVideoDecoder(const VideoDecoderConfig& config, - const DecoderInitCB& init_cb) OVERRIDE; + const DecoderInitCB& init_cb, + const KeyAddedCB& key_added_cb) OVERRIDE; virtual void DecryptAndDecodeVideo( const scoped_refptr& encrypted, const VideoDecodeCB& video_decode_cb) OVERRIDE; -- cgit v1.1