summaryrefslogtreecommitdiffstats
path: root/webkit/media
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 07:51:15 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 07:51:15 +0000
commit1f2155cb43a884398c27d1c5a3ece1adc1c88a36 (patch)
treea8a0a46fe47a6e07dd484bebdab45a5acfd75b9d /webkit/media
parent10807a7da2e42e09f5bd20068a916b6220bd88d7 (diff)
downloadchromium_src-1f2155cb43a884398c27d1c5a3ece1adc1c88a36.zip
chromium_src-1f2155cb43a884398c27d1c5a3ece1adc1c88a36.tar.gz
chromium_src-1f2155cb43a884398c27d1c5a3ece1adc1c88a36.tar.bz2
Encrypted Media: ProxyDecryptor is not a Decryptor.
Now ProxyDecryptor does not do any real decryption and does not need to implement decryption related methods. Review URL: https://codereview.chromium.org/11588002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r--webkit/media/crypto/proxy_decryptor.cc54
-rw-r--r--webkit/media/crypto/proxy_decryptor.h48
2 files changed, 10 insertions, 92 deletions
diff --git a/webkit/media/crypto/proxy_decryptor.cc b/webkit/media/crypto/proxy_decryptor.cc
index 39e7f56..f6f9685 100644
--- a/webkit/media/crypto/proxy_decryptor.cc
+++ b/webkit/media/crypto/proxy_decryptor.cc
@@ -4,15 +4,9 @@
#include "webkit/media/crypto/proxy_decryptor.h"
-#include "base/bind.h"
#include "base/callback_helpers.h"
-#include "base/location.h"
#include "base/logging.h"
-#include "media/base/audio_decoder_config.h"
-#include "media/base/decoder_buffer.h"
#include "media/base/decryptor_client.h"
-#include "media/base/video_decoder_config.h"
-#include "media/base/video_frame.h"
#include "media/crypto/aes_decryptor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
@@ -135,54 +129,6 @@ void ProxyDecryptor::CancelKeyRequest(const std::string& key_system,
decryptor_->CancelKeyRequest(key_system, session_id);
}
-void ProxyDecryptor::RegisterKeyAddedCB(StreamType stream_type,
- const KeyAddedCB& key_added_cb) {
- NOTREACHED() << "KeyAddedCB should not be registered with ProxyDecryptor.";
-}
-
-void ProxyDecryptor::Decrypt(
- StreamType stream_type,
- const scoped_refptr<media::DecoderBuffer>& encrypted,
- const DecryptCB& decrypt_cb) {
- NOTREACHED() << "ProxyDecryptor does not support decryption";
-}
-
-void ProxyDecryptor::CancelDecrypt(StreamType stream_type) {
- NOTREACHED() << "ProxyDecryptor does not support decryption";
-}
-
-void ProxyDecryptor::InitializeAudioDecoder(
- scoped_ptr<media::AudioDecoderConfig> config,
- const DecoderInitCB& init_cb) {
- NOTREACHED() << "ProxyDecryptor does not support audio decoding";
-}
-
-void ProxyDecryptor::InitializeVideoDecoder(
- scoped_ptr<media::VideoDecoderConfig> config,
- const DecoderInitCB& init_cb) {
- NOTREACHED() << "ProxyDecryptor does not support video decoding";
-}
-
-void ProxyDecryptor::DecryptAndDecodeAudio(
- const scoped_refptr<media::DecoderBuffer>& encrypted,
- const AudioDecodeCB& audio_decode_cb) {
- NOTREACHED() << "ProxyDecryptor does not support audio decoding";
-}
-
-void ProxyDecryptor::DecryptAndDecodeVideo(
- const scoped_refptr<media::DecoderBuffer>& encrypted,
- const VideoDecodeCB& video_decode_cb) {
- NOTREACHED() << "ProxyDecryptor does not support video decoding";
-}
-
-void ProxyDecryptor::ResetDecoder(StreamType stream_type) {
- NOTREACHED() << "ProxyDecryptor does not support audio/video decoding";
-}
-
-void ProxyDecryptor::DeinitializeDecoder(StreamType stream_type) {
- NOTREACHED() << "ProxyDecryptor does not support audio/video decoding";
-}
-
scoped_ptr<media::Decryptor> ProxyDecryptor::CreatePpapiDecryptor(
const std::string& key_system) {
DCHECK(client_);
diff --git a/webkit/media/crypto/proxy_decryptor.h b/webkit/media/crypto/proxy_decryptor.h
index cad3a12..c68f093 100644
--- a/webkit/media/crypto/proxy_decryptor.h
+++ b/webkit/media/crypto/proxy_decryptor.h
@@ -11,10 +11,6 @@
#include "base/synchronization/lock.h"
#include "media/base/decryptor.h"
-namespace base {
-class MessageLoopProxy;
-}
-
namespace media {
class DecryptorClient;
}
@@ -30,7 +26,7 @@ namespace webkit_media {
// forwards decryptor calls to it.
// TODO(xhwang): Currently we don't support run-time switching among decryptor
// objects. Fix this when needed.
-class ProxyDecryptor : public media::Decryptor {
+class ProxyDecryptor {
public:
ProxyDecryptor(media::DecryptorClient* decryptor_client,
WebKit::WebMediaPlayerClient* web_media_player_client,
@@ -43,39 +39,15 @@ class ProxyDecryptor : public media::Decryptor {
// NULL immediately and reset.
void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb);
- // media::Decryptor implementation.
- virtual bool GenerateKeyRequest(const std::string& key_system,
- const std::string& type,
- const uint8* init_data,
- int init_data_length) OVERRIDE;
- virtual void AddKey(const std::string& key_system,
- const uint8* key,
- int key_length,
- const uint8* init_data,
- int init_data_length,
- const std::string& session_id) OVERRIDE;
- virtual void CancelKeyRequest(const std::string& key_system,
- const std::string& session_id) OVERRIDE;
- virtual void RegisterKeyAddedCB(StreamType stream_type,
- const KeyAddedCB& key_added_cb) OVERRIDE;
- virtual void Decrypt(StreamType stream_type,
- const scoped_refptr<media::DecoderBuffer>& encrypted,
- const DecryptCB& decrypt_cb) OVERRIDE;
- virtual void CancelDecrypt(StreamType stream_type) OVERRIDE;
- virtual void InitializeAudioDecoder(
- scoped_ptr<media::AudioDecoderConfig> config,
- const DecoderInitCB& init_cb) OVERRIDE;
- virtual void InitializeVideoDecoder(
- scoped_ptr<media::VideoDecoderConfig> config,
- const DecoderInitCB& init_cb) OVERRIDE;
- virtual void DecryptAndDecodeAudio(
- const scoped_refptr<media::DecoderBuffer>& encrypted,
- const AudioDecodeCB& audio_decode_cb) OVERRIDE;
- virtual void DecryptAndDecodeVideo(
- const scoped_refptr<media::DecoderBuffer>& encrypted,
- const VideoDecodeCB& video_decode_cb) OVERRIDE;
- virtual void ResetDecoder(StreamType stream_type) OVERRIDE;
- virtual void DeinitializeDecoder(StreamType stream_type) OVERRIDE;
+ bool GenerateKeyRequest(const std::string& key_system,
+ const std::string& type,
+ const uint8* init_data, int init_data_length);
+ void AddKey(const std::string& key_system,
+ const uint8* key, int key_length,
+ const uint8* init_data, int init_data_length,
+ const std::string& session_id);
+ void CancelKeyRequest(const std::string& key_system,
+ const std::string& session_id);
private:
// Helper functions to create decryptors to handle the given |key_system|.