summaryrefslogtreecommitdiffstats
path: root/media/crypto
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 23:36:31 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 23:36:31 +0000
commit326dff446c95d772d1f80f086ccff86b3ff8bf25 (patch)
tree61c0459fc2f20a842ccab20fd868ec1fb5c84dc3 /media/crypto
parent1fba73c14c6cadc0f04045e04187d734695aec65 (diff)
downloadchromium_src-326dff446c95d772d1f80f086ccff86b3ff8bf25.zip
chromium_src-326dff446c95d772d1f80f086ccff86b3ff8bf25.tar.gz
chromium_src-326dff446c95d772d1f80f086ccff86b3ff8bf25.tar.bz2
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
Diffstat (limited to 'media/crypto')
-rw-r--r--media/crypto/aes_decryptor.cc3
-rw-r--r--media/crypto/aes_decryptor.h3
2 files changed, 4 insertions, 2 deletions
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<DecoderBuffer>& encrypted,
const VideoDecodeCB& video_decode_cb) OVERRIDE;