Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Unified Diff: media/crypto/aes_decryptor.cc

Issue 11144036: Update Decryptor interface to support audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove leftover unretained Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/crypto/aes_decryptor.cc
diff --git a/media/crypto/aes_decryptor.cc b/media/crypto/aes_decryptor.cc
index 7034fdeecf3583d9e4261748a7663af190dcda11..b971d4c4a20489fbb4edd796f602121bd207466c 100644
--- a/media/crypto/aes_decryptor.cc
+++ b/media/crypto/aes_decryptor.cc
@@ -11,6 +11,7 @@
#include "base/string_number_conversions.h"
#include "crypto/encryptor.h"
#include "crypto/symmetric_key.h"
+#include "media/base/audio_decoder_config.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decrypt_config.h"
#include "media/base/decryptor_client.h"
@@ -198,7 +199,8 @@ void AesDecryptor::CancelKeyRequest(const std::string& key_system,
const std::string& session_id) {
}
-void AesDecryptor::Decrypt(const scoped_refptr<DecoderBuffer>& encrypted,
+void AesDecryptor::Decrypt(StreamType stream_type,
+ const scoped_refptr<DecoderBuffer>& encrypted,
const DecryptCB& decrypt_cb) {
CHECK(encrypted->GetDecryptConfig());
const std::string& key_id = encrypted->GetDecryptConfig()->key_id();
@@ -231,7 +233,15 @@ void AesDecryptor::Decrypt(const scoped_refptr<DecoderBuffer>& encrypted,
decrypt_cb.Run(kSuccess, decrypted);
}
-void AesDecryptor::CancelDecrypt() {
+void AesDecryptor::CancelDecrypt(StreamType stream_type) {
+ // Decrypt() calls the DecryptCB synchronously so there's nothing to cancel.
+}
+
+void AesDecryptor::InitializeAudioDecoder(scoped_ptr<AudioDecoderConfig> config,
+ const DecoderInitCB& init_cb,
+ const KeyAddedCB& key_added_cb) {
+ // AesDecryptor does not support audio decoding.
+ init_cb.Run(false);
}
void AesDecryptor::InitializeVideoDecoder(scoped_ptr<VideoDecoderConfig> config,
@@ -241,18 +251,24 @@ void AesDecryptor::InitializeVideoDecoder(scoped_ptr<VideoDecoderConfig> config,
init_cb.Run(false);
}
+void AesDecryptor::DecryptAndDecodeAudio(
+ const scoped_refptr<DecoderBuffer>& encrypted,
+ const AudioDecodeCB& audio_decode_cb) {
+ NOTREACHED() << "AesDecryptor does not support audio decoding";
+}
+
void AesDecryptor::DecryptAndDecodeVideo(
const scoped_refptr<DecoderBuffer>& encrypted,
const VideoDecodeCB& video_decode_cb) {
NOTREACHED() << "AesDecryptor does not support video decoding";
}
-void AesDecryptor::CancelDecryptAndDecodeVideo() {
- NOTREACHED() << "AesDecryptor does not support video decoding";
+void AesDecryptor::ResetDecoder(StreamType stream_type) {
+ NOTREACHED() << "AesDecryptor does not support audio/video decoding";
}
-void AesDecryptor::StopVideoDecoder() {
- NOTREACHED() << "AesDecryptor does not support video decoding";
+void AesDecryptor::DeinitializeDecoder(StreamType stream_type) {
+ NOTREACHED() << "AesDecryptor does not support audio/video decoding";
}
void AesDecryptor::SetKey(const std::string& key_id,
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698