summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/base/decryptor.h69
-rw-r--r--media/base/decryptor_client.h (renamed from media/crypto/decryptor_client.h)10
-rw-r--r--media/base/mock_filters.h4
-rw-r--r--media/crypto/aes_decryptor.cc6
-rw-r--r--media/crypto/aes_decryptor.h69
-rw-r--r--media/crypto/aes_decryptor_unittest.cc2
-rw-r--r--media/filters/ffmpeg_video_decoder.cc3
-rw-r--r--media/filters/ffmpeg_video_decoder.h6
-rw-r--r--media/filters/ffmpeg_video_decoder_unittest.cc3
-rw-r--r--media/filters/pipeline_integration_test.cc10
-rw-r--r--media/media.gyp3
-rw-r--r--webkit/media/filter_helpers.cc6
-rw-r--r--webkit/media/filter_helpers.h6
-rw-r--r--webkit/media/webmediaplayer_impl.cc2
-rw-r--r--webkit/media/webmediaplayer_impl.h7
-rw-r--r--webkit/media/webmediaplayer_proxy.cc4
-rw-r--r--webkit/media/webmediaplayer_proxy.h6
17 files changed, 130 insertions, 86 deletions
diff --git a/media/base/decryptor.h b/media/base/decryptor.h
new file mode 100644
index 0000000..924f3ac
--- /dev/null
+++ b/media/base/decryptor.h
@@ -0,0 +1,69 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_DECRYPTOR_H_
+#define MEDIA_BASE_DECRYPTOR_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+class DecoderBuffer;
+
+// Performs key operations and decrypts encrypted buffer.
+// All public methods other than Decrypt() will be called on the renderer
+// thread. Therefore, these calls should be fast and nonblocking, with key
+// events fired asynchronously. Decrypt() will be called on the (video/audio)
+// decoder thread synchronously.
+class MEDIA_EXPORT Decryptor {
+ public:
+ enum KeyError {
+ kUnknownError = 1,
+ kClientError,
+ kServiceError,
+ kOutputError,
+ kHardwareChangeError,
+ kDomainError
+ };
+
+ Decryptor() {}
+ virtual ~Decryptor() {}
+
+ // Generates a key request for the |key_system| with |init_data| provided.
+ virtual void GenerateKeyRequest(const std::string& key_system,
+ const uint8* init_data,
+ int init_data_length) = 0;
+
+ // Adds a |key| to the |key_system|. The |key| is not limited to a decryption
+ // key. It can be any data that the key system accepts, such as a license.
+ // If multiple calls of this function set different keys for the same
+ // key ID, the older key will be replaced by the newer key.
+ 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) = 0;
+
+ // Cancels the key request specified by |session_id|.
+ virtual void CancelKeyRequest(const std::string& key_system,
+ const std::string& session_id) = 0;
+
+ // Decrypts the |input| buffer, which should not be NULL.
+ // Returns a DecoderBuffer with the decrypted data if decryption succeeded.
+ // Returns NULL if decryption failed.
+ virtual scoped_refptr<DecoderBuffer> Decrypt(
+ const scoped_refptr<DecoderBuffer>& input) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Decryptor);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_DECRYPTOR_H_
diff --git a/media/crypto/decryptor_client.h b/media/base/decryptor_client.h
index c15a2f0..9db50ce 100644
--- a/media/crypto/decryptor_client.h
+++ b/media/base/decryptor_client.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MEDIA_CRYPTO_DECRYPTOR_CLIENT_H_
-#define MEDIA_CRYPTO_DECRYPTOR_CLIENT_H_
+#ifndef MEDIA_BASE_DECRYPTOR_CLIENT_H_
+#define MEDIA_BASE_DECRYPTOR_CLIENT_H_
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "media/crypto/aes_decryptor.h"
+#include "media/base/decryptor.h"
namespace media {
@@ -24,7 +24,7 @@ class DecryptorClient {
// system-dependent. For clear key system, the |system_code| is always zero.
virtual void KeyError(const std::string& key_system,
const std::string& session_id,
- AesDecryptor::KeyError error_code,
+ Decryptor::KeyError error_code,
int system_code) = 0;
// Signals that a key message has been generated.
@@ -47,4 +47,4 @@ class DecryptorClient {
} // namespace media
-#endif // MEDIA_CRYPTO_DECRYPTOR_CLIENT_H_
+#endif // MEDIA_BASE_DECRYPTOR_CLIENT_H_
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
index cf8fa28..e3d50ff 100644
--- a/media/base/mock_filters.h
+++ b/media/base/mock_filters.h
@@ -18,6 +18,7 @@
#include "media/base/audio_decoder.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/audio_renderer.h"
+#include "media/base/decryptor_client.h"
#include "media/base/demuxer.h"
#include "media/base/filters.h"
#include "media/base/filter_collection.h"
@@ -26,7 +27,6 @@
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
#include "media/base/video_renderer.h"
-#include "media/crypto/decryptor_client.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace media {
@@ -217,7 +217,7 @@ class MockDecryptorClient : public DecryptorClient {
MOCK_METHOD2(KeyAdded, void(const std::string&, const std::string&));
MOCK_METHOD4(KeyError, void(const std::string&, const std::string&,
- AesDecryptor::KeyError, int));
+ Decryptor::KeyError, int));
// TODO(xhwang): This is a workaround of the issue that move-only parameters
// are not supported in mocked methods. Remove this when the issue is fixed
// (http://code.google.com/p/googletest/issues/detail?id=395) or when we use
diff --git a/media/crypto/aes_decryptor.cc b/media/crypto/aes_decryptor.cc
index 49275fb..129bc33 100644
--- a/media/crypto/aes_decryptor.cc
+++ b/media/crypto/aes_decryptor.cc
@@ -12,7 +12,7 @@
#include "crypto/symmetric_key.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decrypt_config.h"
-#include "media/crypto/decryptor_client.h"
+#include "media/base/decryptor_client.h"
namespace media {
@@ -89,7 +89,7 @@ void AesDecryptor::AddKey(const std::string& key_system,
const int kSupportedKeyLength = 16; // 128-bit key.
if (key_length != kSupportedKeyLength) {
DVLOG(1) << "Invalid key length: " << key_length;
- client_->KeyError(key_system, session_id, kUnknownError, 0);
+ client_->KeyError(key_system, session_id, Decryptor::kUnknownError, 0);
return;
}
@@ -110,7 +110,7 @@ void AesDecryptor::AddKey(const std::string& key_system,
crypto::SymmetricKey::AES, key_string);
if (!symmetric_key) {
DVLOG(1) << "Could not import key.";
- client_->KeyError(key_system, session_id, kUnknownError, 0);
+ client_->KeyError(key_system, session_id, Decryptor::kUnknownError, 0);
return;
}
diff --git a/media/crypto/aes_decryptor.h b/media/crypto/aes_decryptor.h
index 3471c53..7201052 100644
--- a/media/crypto/aes_decryptor.h
+++ b/media/crypto/aes_decryptor.h
@@ -11,6 +11,7 @@
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
+#include "media/base/decryptor.h"
#include "media/base/media_export.h"
namespace crypto {
@@ -19,58 +20,30 @@ class SymmetricKey;
namespace media {
-class DecoderBuffer;
class DecryptorClient;
-// Decrypts AES encrypted buffer into unencrypted buffer.
-// All public methods other than Decrypt() will be called on the renderer
-// thread. Therefore, these calls should be fast and nonblocking, with key
-// events fired asynchronously. Decrypt() will be called on the (video/audio)
-// decoder thread synchronously.
-class MEDIA_EXPORT AesDecryptor {
+// Decryptor implementation that decrypts AES-encrypted buffer.
+class MEDIA_EXPORT AesDecryptor : public Decryptor {
public:
- enum KeyError {
- kUnknownError = 1,
- kClientError,
- kServiceError,
- kOutputError,
- kHardwareChangeError,
- kDomainError
- };
-
// The AesDecryptor does not take ownership of the |client|. The |client|
// must be valid throughout the lifetime of the AesDecryptor.
explicit AesDecryptor(DecryptorClient* client);
- ~AesDecryptor();
-
- // Generates a key request. The result of this call will be reported via the
- // client's KeyMessage() or KeyError() methods.
- void GenerateKeyRequest(const std::string& key_system,
- const uint8* init_data,
- int init_data_length);
-
- // Adds a |key| to the key system. The key is not limited to a decryption key.
- // It can be any data that the key system accepts, such as a license.
- // If multiple calls of this function set different keys for the same
- // |key_id|, the older key will be replaced by the newer key.
- // The result of this call will be reported via the client's KeyAdded(),
- // KeyMessage() or KeyError() methods.
- 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);
-
- // Cancels the key request specified by |session_id|.
- void CancelKeyRequest(const std::string& key_system,
- const std::string& session_id);
-
- // Decrypts the |input| buffer, which should not be NULL.
- // Returns a DecoderBuffer with the decrypted data if decryption succeeded.
- // Returns NULL if decryption failed.
- scoped_refptr<DecoderBuffer> Decrypt(
- const scoped_refptr<DecoderBuffer>& input);
+ virtual ~AesDecryptor();
+
+ // Decryptor implementation.
+ virtual void GenerateKeyRequest(const std::string& key_system,
+ 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 scoped_refptr<DecoderBuffer> Decrypt(
+ const scoped_refptr<DecoderBuffer>& input) OVERRIDE;
private:
// KeyMap owns the crypto::SymmetricKey* and must delete them when they are
@@ -83,13 +56,13 @@ class MEDIA_EXPORT AesDecryptor {
KeyMap key_map_; // Protected by the |key_map_lock_|.
base::Lock key_map_lock_; // Protects the |key_map_|.
- DecryptorClient* client_;
-
// Make session ID unique per renderer by making it static.
// TODO(xhwang): Make session ID more strictly defined if needed:
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=16739#c0
static uint32 next_session_id_;
+ DecryptorClient* const client_;
+
DISALLOW_COPY_AND_ASSIGN(AesDecryptor);
};
diff --git a/media/crypto/aes_decryptor_unittest.cc b/media/crypto/aes_decryptor_unittest.cc
index 69cca61..814bd6c 100644
--- a/media/crypto/aes_decryptor_unittest.cc
+++ b/media/crypto/aes_decryptor_unittest.cc
@@ -75,7 +75,7 @@ class AesDecryptorTest : public testing::Test {
void AddKeyAndExpectToFail(const uint8 (&key_id)[KeyIdSize],
const uint8 (&key)[KeySize]) {
EXPECT_CALL(client_, KeyError(kClearKeySystem, session_id_string_,
- AesDecryptor::kUnknownError, 0));
+ Decryptor::kUnknownError, 0));
decryptor_.AddKey(kClearKeySystem, key, KeySize, key_id, KeyIdSize,
session_id_string_);
}
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index c8e512b..1902fd8 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -10,6 +10,7 @@
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "media/base/decoder_buffer.h"
+#include "media/base/decryptor.h"
#include "media/base/demuxer_stream.h"
#include "media/base/limits.h"
#include "media/base/media_switches.h"
@@ -177,7 +178,7 @@ const gfx::Size& FFmpegVideoDecoder::natural_size() {
return natural_size_;
}
-void FFmpegVideoDecoder::set_decryptor(AesDecryptor* decryptor) {
+void FFmpegVideoDecoder::set_decryptor(Decryptor* decryptor) {
DCHECK_EQ(state_, kUninitialized);
decryptor_ = decryptor;
}
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index 3c4d39a..f493792 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -10,7 +10,6 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "media/base/video_decoder.h"
-#include "media/crypto/aes_decryptor.h"
class MessageLoop;
@@ -20,6 +19,7 @@ struct AVFrame;
namespace media {
class DecoderBuffer;
+class Decryptor;
class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
public:
@@ -36,7 +36,7 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// Must be called prior to initialization if decrypted buffers will be
// encountered.
- void set_decryptor(AesDecryptor* decryptor);
+ void set_decryptor(Decryptor* decryptor);
protected:
virtual ~FFmpegVideoDecoder();
@@ -102,7 +102,7 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// Pointer to the demuxer stream that will feed us compressed buffers.
scoped_refptr<DemuxerStream> demuxer_stream_;
- AesDecryptor* decryptor_;
+ Decryptor* decryptor_;
DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
};
diff --git a/media/filters/ffmpeg_video_decoder_unittest.cc b/media/filters/ffmpeg_video_decoder_unittest.cc
index a787384..26f7f8b 100644
--- a/media/filters/ffmpeg_video_decoder_unittest.cc
+++ b/media/filters/ffmpeg_video_decoder_unittest.cc
@@ -17,6 +17,7 @@
#include "media/base/test_data_util.h"
#include "media/base/video_decoder.h"
#include "media/base/video_frame.h"
+#include "media/crypto/aes_decryptor.h"
#include "media/ffmpeg/ffmpeg_common.h"
#include "media/filters/ffmpeg_decoder_unittest.h"
#include "media/filters/ffmpeg_glue.h"
@@ -210,7 +211,7 @@ class FFmpegVideoDecoderTest : public testing::Test {
scoped_refptr<VideoFrame>));
MessageLoop message_loop_;
- scoped_ptr<AesDecryptor> decryptor_;
+ scoped_ptr<Decryptor> decryptor_;
scoped_refptr<FFmpegVideoDecoder> decoder_;
scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_;
MockStatisticsCB statistics_cb_;
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index c0a5b67..6817505 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -6,10 +6,10 @@
#include "base/bind.h"
#include "media/base/decoder_buffer.h"
+#include "media/base/decryptor_client.h"
#include "media/base/mock_filters.h"
#include "media/base/test_data_util.h"
#include "media/crypto/aes_decryptor.h"
-#include "media/crypto/decryptor_client.h"
#include "media/filters/chunk_demuxer_client.h"
namespace media {
@@ -112,9 +112,9 @@ class MockMediaSource : public ChunkDemuxerClient {
DecryptorClient* decryptor_client_;
};
-class MockDecryptorClientImpl : public DecryptorClient {
+class FakeDecryptorClient : public DecryptorClient {
public:
- MockDecryptorClientImpl() : decryptor_(this) {}
+ FakeDecryptorClient() : decryptor_(this) {}
AesDecryptor* decryptor() {
return &decryptor_;
@@ -196,7 +196,7 @@ class PipelineIntegrationTest
void StartPipelineWithEncryptedMedia(
MockMediaSource* source,
- MockDecryptorClientImpl* encrypted_media) {
+ FakeDecryptorClient* encrypted_media) {
pipeline_->Start(
CreateFilterCollection(source),
base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)),
@@ -265,7 +265,7 @@ TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) {
TEST_F(PipelineIntegrationTest, EncryptedPlayback) {
MockMediaSource source("bear-320x240-encrypted.webm", 219726, true, true);
- MockDecryptorClientImpl encrypted_media;
+ FakeDecryptorClient encrypted_media;
StartPipelineWithEncryptedMedia(&source, &encrypted_media);
source.EndOfStream();
diff --git a/media/media.gyp b/media/media.gyp
index 498006e..0d60e6b 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -148,6 +148,8 @@
'base/decoder_buffer.h',
'base/decrypt_config.cc',
'base/decrypt_config.h',
+ 'base/decryptor.h',
+ 'base/decryptor_client.h',
'base/demuxer.cc',
'base/demuxer.h',
'base/demuxer_stream.cc',
@@ -196,7 +198,6 @@
'base/video_util.h',
'crypto/aes_decryptor.cc',
'crypto/aes_decryptor.h',
- 'crypto/decryptor_client.h',
'ffmpeg/ffmpeg_common.cc',
'ffmpeg/ffmpeg_common.h',
'ffmpeg/file_protocol.cc',
diff --git a/webkit/media/filter_helpers.cc b/webkit/media/filter_helpers.cc
index 075ea09..9eaef4b 100644
--- a/webkit/media/filter_helpers.cc
+++ b/webkit/media/filter_helpers.cc
@@ -21,7 +21,7 @@ namespace webkit_media {
static void AddDefaultDecodersToCollection(
media::MessageLoopFactory* message_loop_factory,
media::FilterCollection* filter_collection,
- media::AesDecryptor* decryptor,
+ media::Decryptor* decryptor,
scoped_refptr<media::FFmpegVideoDecoder>* ffmpeg_video_decoder) {
filter_collection->AddAudioDecoder(new media::FFmpegAudioDecoder(
base::Bind(&media::MessageLoopFactory::GetMessageLoop,
@@ -69,7 +69,7 @@ bool BuildMediaSourceCollection(
media::ChunkDemuxerClient* client,
media::MessageLoopFactory* message_loop_factory,
media::FilterCollection* filter_collection,
- media::AesDecryptor* decryptor,
+ media::Decryptor* decryptor,
scoped_refptr<media::FFmpegVideoDecoder>* video_decoder) {
if (media_source_url.isEmpty() || url != media_source_url)
return false;
@@ -85,7 +85,7 @@ void BuildDefaultCollection(
const scoped_refptr<media::DataSource>& data_source,
media::MessageLoopFactory* message_loop_factory,
media::FilterCollection* filter_collection,
- media::AesDecryptor* decryptor,
+ media::Decryptor* decryptor,
scoped_refptr<media::FFmpegVideoDecoder>* video_decoder) {
filter_collection->SetDemuxer(new media::FFmpegDemuxer(
message_loop_factory->GetMessageLoop("PipelineThread"),
diff --git a/webkit/media/filter_helpers.h b/webkit/media/filter_helpers.h
index 00e86c6..b28063c 100644
--- a/webkit/media/filter_helpers.h
+++ b/webkit/media/filter_helpers.h
@@ -9,7 +9,7 @@
#include "base/memory/ref_counted.h"
namespace media {
-class AesDecryptor;
+class Decryptor;
class ChunkDemuxerClient;
class DataSource;
class FFmpegVideoDecoder;
@@ -44,7 +44,7 @@ bool BuildMediaSourceCollection(
media::ChunkDemuxerClient* client,
media::MessageLoopFactory* message_loop_factory,
media::FilterCollection* filter_collection,
- media::AesDecryptor* decryptor,
+ media::Decryptor* decryptor,
scoped_refptr<media::FFmpegVideoDecoder>* video_decoder);
// Builds the required filters for handling regular URLs and adds them to
@@ -53,7 +53,7 @@ void BuildDefaultCollection(
const scoped_refptr<media::DataSource>& data_source,
media::MessageLoopFactory* message_loop_factory,
media::FilterCollection* filter_collection,
- media::AesDecryptor* decryptor,
+ media::Decryptor* decryptor,
scoped_refptr<media::FFmpegVideoDecoder>* video_decoder);
} // webkit_media
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 588801c..891398f 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -893,7 +893,7 @@ void WebMediaPlayerImpl::OnNeedKey(const std::string& key_system,
void WebMediaPlayerImpl::OnKeyError(const std::string& key_system,
const std::string& session_id,
- media::AesDecryptor::KeyError error_code,
+ media::Decryptor::KeyError error_code,
int system_code) {
DCHECK_EQ(main_loop_, MessageLoop::current());
diff --git a/webkit/media/webmediaplayer_impl.h b/webkit/media/webmediaplayer_impl.h
index 30d15f0..c19e006 100644
--- a/webkit/media/webmediaplayer_impl.h
+++ b/webkit/media/webmediaplayer_impl.h
@@ -56,10 +56,10 @@
#include "base/message_loop.h"
#include "googleurl/src/gurl.h"
#include "media/base/audio_renderer_sink.h"
+#include "media/base/decryptor.h"
#include "media/base/filters.h"
#include "media/base/message_loop_factory.h"
#include "media/base/pipeline.h"
-#include "media/crypto/aes_decryptor.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvider.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
@@ -73,7 +73,6 @@ class WebFrame;
}
namespace media {
-class AesDecryptor;
class MediaLog;
}
@@ -232,7 +231,7 @@ class WebMediaPlayerImpl
void OnKeyAdded(const std::string& key_system, const std::string& session_id);
void OnKeyError(const std::string& key_system,
const std::string& session_id,
- media::AesDecryptor::KeyError error_code,
+ media::Decryptor::KeyError error_code,
int system_code);
void OnKeyMessage(const std::string& key_system,
const std::string& session_id,
@@ -294,7 +293,7 @@ class WebMediaPlayerImpl
bool started_;
// The decryptor that manages decryption keys and decrypts encrypted frames.
- scoped_ptr<media::AesDecryptor> decryptor_;
+ scoped_ptr<media::Decryptor> decryptor_;
scoped_ptr<media::MessageLoopFactory> message_loop_factory_;
diff --git a/webkit/media/webmediaplayer_proxy.cc b/webkit/media/webmediaplayer_proxy.cc
index 461f67e..8b2adc1 100644
--- a/webkit/media/webmediaplayer_proxy.cc
+++ b/webkit/media/webmediaplayer_proxy.cc
@@ -245,7 +245,7 @@ void WebMediaPlayerProxy::KeyAdded(const std::string& key_system,
void WebMediaPlayerProxy::KeyError(const std::string& key_system,
const std::string& session_id,
- media::AesDecryptor::KeyError error_code,
+ media::Decryptor::KeyError error_code,
int system_code) {
render_loop_->PostTask(FROM_HERE, base::Bind(
&WebMediaPlayerProxy::KeyErrorTask, this, key_system, session_id,
@@ -280,7 +280,7 @@ void WebMediaPlayerProxy::KeyAddedTask(const std::string& key_system,
void WebMediaPlayerProxy::KeyErrorTask(const std::string& key_system,
const std::string& session_id,
- media::AesDecryptor::KeyError error_code,
+ media::Decryptor::KeyError error_code,
int system_code) {
DCHECK(render_loop_->BelongsToCurrentThread());
if (webmediaplayer_)
diff --git a/webkit/media/webmediaplayer_proxy.h b/webkit/media/webmediaplayer_proxy.h
index 2416388..0fe84f1 100644
--- a/webkit/media/webmediaplayer_proxy.h
+++ b/webkit/media/webmediaplayer_proxy.h
@@ -11,8 +11,8 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
+#include "media/base/decryptor_client.h"
#include "media/base/pipeline.h"
-#include "media/crypto/decryptor_client.h"
#include "media/filters/chunk_demuxer.h"
#include "media/filters/chunk_demuxer_client.h"
#include "media/filters/ffmpeg_video_decoder.h"
@@ -112,7 +112,7 @@ class WebMediaPlayerProxy
const std::string& session_id) OVERRIDE;
virtual void KeyError(const std::string& key_system,
const std::string& session_id,
- media::AesDecryptor::KeyError error_code,
+ media::Decryptor::KeyError error_code,
int system_code) OVERRIDE;
virtual void KeyMessage(const std::string& key_system,
const std::string& session_id,
@@ -157,7 +157,7 @@ class WebMediaPlayerProxy
// Notify |webmediaplayer_| that a key error occurred.
void KeyErrorTask(const std::string& key_system,
const std::string& session_id,
- media::AesDecryptor::KeyError error_code,
+ media::Decryptor::KeyError error_code,
int system_code);
// Notify |webmediaplayer_| that a key message has been generated.