summaryrefslogtreecommitdiffstats
path: root/media/cdm/ppapi
diff options
context:
space:
mode:
authorjrummell@chromium.org <jrummell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 06:35:33 +0000
committerjrummell@chromium.org <jrummell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 06:35:33 +0000
commit9dd12ff9410038bf3f267fb2926d54c9d24a3fc3 (patch)
tree5dab463d054d1341eddc07e46098e544252019d2 /media/cdm/ppapi
parentcb801cdd765bf1717eabf0fcbe95bf70543403c4 (diff)
downloadchromium_src-9dd12ff9410038bf3f267fb2926d54c9d24a3fc3.zip
chromium_src-9dd12ff9410038bf3f267fb2926d54c9d24a3fc3.tar.gz
chromium_src-9dd12ff9410038bf3f267fb2926d54c9d24a3fc3.tar.bz2
Rename ClearKey types
As pointed out in a previous CL, CdmHost is too generic. Renaming CdmHost to ClearKeyCdmHost and CdmInterface to ClearKeyCdmInterface to better match their use. BUG= Review URL: https://codereview.chromium.org/62493003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cdm/ppapi')
-rw-r--r--media/cdm/ppapi/cdm_video_decoder.cc2
-rw-r--r--media/cdm/ppapi/cdm_video_decoder.h2
-rw-r--r--media/cdm/ppapi/clear_key_cdm.cc8
-rw-r--r--media/cdm/ppapi/clear_key_cdm.h4
-rw-r--r--media/cdm/ppapi/clear_key_cdm_common.h4
-rw-r--r--media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc6
-rw-r--r--media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h4
-rw-r--r--media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc4
-rw-r--r--media/cdm/ppapi/ffmpeg_cdm_video_decoder.h4
9 files changed, 19 insertions, 19 deletions
diff --git a/media/cdm/ppapi/cdm_video_decoder.cc b/media/cdm/ppapi/cdm_video_decoder.cc
index f41af3d..0477c0a 100644
--- a/media/cdm/ppapi/cdm_video_decoder.cc
+++ b/media/cdm/ppapi/cdm_video_decoder.cc
@@ -21,7 +21,7 @@
namespace media {
scoped_ptr<CdmVideoDecoder> CreateVideoDecoder(
- CdmHost* host, const cdm::VideoDecoderConfig& config) {
+ ClearKeyCdmHost* host, const cdm::VideoDecoderConfig& config) {
scoped_ptr<CdmVideoDecoder> video_decoder;
#if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
video_decoder.reset(new FakeCdmVideoDecoder(host));
diff --git a/media/cdm/ppapi/cdm_video_decoder.h b/media/cdm/ppapi/cdm_video_decoder.h
index 3f3b439..3eefb63 100644
--- a/media/cdm/ppapi/cdm_video_decoder.h
+++ b/media/cdm/ppapi/cdm_video_decoder.h
@@ -37,7 +37,7 @@ class CdmVideoDecoder {
// |config.codec|. Returns a scoped_ptr containing a non-null initialized
// CdmVideoDecoder* upon success.
scoped_ptr<CdmVideoDecoder> CreateVideoDecoder(
- CdmHost* host, const cdm::VideoDecoderConfig& config);
+ ClearKeyCdmHost* host, const cdm::VideoDecoderConfig& config);
} // namespace media
diff --git a/media/cdm/ppapi/clear_key_cdm.cc b/media/cdm/ppapi/clear_key_cdm.cc
index c037aae..2829cf4 100644
--- a/media/cdm/ppapi/clear_key_cdm.cc
+++ b/media/cdm/ppapi/clear_key_cdm.cc
@@ -136,11 +136,11 @@ void* CreateCdmInstance(
return NULL;
}
- if (cdm_interface_version != media::CdmInterface::kVersion)
+ if (cdm_interface_version != media::ClearKeyCdmInterface::kVersion)
return NULL;
- media::CdmHost* host = static_cast<media::CdmHost*>(
- get_cdm_host_func(media::CdmHost::kVersion, user_data));
+ media::ClearKeyCdmHost* host = static_cast<media::ClearKeyCdmHost*>(
+ get_cdm_host_func(media::ClearKeyCdmHost::kVersion, user_data));
if (!host)
return NULL;
@@ -185,7 +185,7 @@ void ClearKeyCdm::Client::KeyMessage(const std::string& session_id,
default_url_ = default_url;
}
-ClearKeyCdm::ClearKeyCdm(CdmHost* host)
+ClearKeyCdm::ClearKeyCdm(ClearKeyCdmHost* host)
: decryptor_(base::Bind(&Client::KeyAdded, base::Unretained(&client_)),
base::Bind(&Client::KeyError, base::Unretained(&client_)),
base::Bind(&Client::KeyMessage, base::Unretained(&client_))),
diff --git a/media/cdm/ppapi/clear_key_cdm.h b/media/cdm/ppapi/clear_key_cdm.h
index 84a8655..1da325d 100644
--- a/media/cdm/ppapi/clear_key_cdm.h
+++ b/media/cdm/ppapi/clear_key_cdm.h
@@ -28,7 +28,7 @@ class DecoderBuffer;
class FFmpegCdmAudioDecoder;
// Clear key implementation of the cdm::ContentDecryptionModule interface.
-class ClearKeyCdm : public CdmInterface {
+class ClearKeyCdm : public ClearKeyCdmInterface {
public:
explicit ClearKeyCdm(Host* host);
virtual ~ClearKeyCdm();
@@ -139,7 +139,7 @@ class ClearKeyCdm : public CdmInterface {
// simultaneously.
base::Lock client_lock_;
- CdmHost* host_;
+ ClearKeyCdmHost* host_;
std::string heartbeat_session_id_;
std::string next_heartbeat_message_;
diff --git a/media/cdm/ppapi/clear_key_cdm_common.h b/media/cdm/ppapi/clear_key_cdm_common.h
index 01804ac..d6ed59b 100644
--- a/media/cdm/ppapi/clear_key_cdm_common.h
+++ b/media/cdm/ppapi/clear_key_cdm_common.h
@@ -10,8 +10,8 @@
namespace media {
// Aliases for the version of the interfaces that this CDM implements.
-typedef cdm::ContentDecryptionModule CdmInterface;
-typedef CdmInterface::Host CdmHost;
+typedef cdm::ContentDecryptionModule ClearKeyCdmInterface;
+typedef ClearKeyCdmInterface::Host ClearKeyCdmHost;
} // namespace media
diff --git a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc
index 5bc52a8..b682379 100644
--- a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc
+++ b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc
@@ -130,7 +130,7 @@ static void CopySamples(cdm::AudioFormat cdm_format,
}
}
-FFmpegCdmAudioDecoder::FFmpegCdmAudioDecoder(CdmHost* host)
+FFmpegCdmAudioDecoder::FFmpegCdmAudioDecoder(ClearKeyCdmHost* host)
: is_initialized_(false),
host_(host),
samples_per_second_(0),
@@ -354,7 +354,7 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
const uint32_t buffer_size = decoded_audio_size + sizeof(int64) * 2;
decoded_frames->SetFrameBuffer(host_->Allocate(buffer_size));
if (!decoded_frames->FrameBuffer()) {
- LOG(ERROR) << "DecodeBuffer() CdmHost::Allocate failed.";
+ LOG(ERROR) << "DecodeBuffer() ClearKeyCdmHost::Allocate failed.";
return cdm::kDecodeError;
}
decoded_frames->FrameBuffer()->SetSize(buffer_size);
@@ -392,7 +392,7 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
decoded_frames->SetFrameBuffer(
host_->Allocate(serialized_audio_frames_.size()));
if (!decoded_frames->FrameBuffer()) {
- LOG(ERROR) << "DecodeBuffer() CdmHost::Allocate failed.";
+ LOG(ERROR) << "DecodeBuffer() ClearKeyCdmHost::Allocate failed.";
return cdm::kDecodeError;
}
memcpy(decoded_frames->FrameBuffer()->Data(),
diff --git a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h
index c06d347..81362d4 100644
--- a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h
+++ b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h
@@ -30,7 +30,7 @@ namespace media {
// http://crbug.com/169203
class FFmpegCdmAudioDecoder {
public:
- explicit FFmpegCdmAudioDecoder(CdmHost* host);
+ explicit FFmpegCdmAudioDecoder(ClearKeyCdmHost* host);
~FFmpegCdmAudioDecoder();
bool Initialize(const cdm::AudioDecoderConfig& config);
void Deinitialize();
@@ -61,7 +61,7 @@ class FFmpegCdmAudioDecoder {
bool is_initialized_;
- CdmHost* const host_;
+ ClearKeyCdmHost* const host_;
// FFmpeg structures owned by this object.
scoped_ptr_malloc<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
diff --git a/media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc b/media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc
index 66c5fb0..615a4c3 100644
--- a/media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc
+++ b/media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc
@@ -128,7 +128,7 @@ static void CopyPlane(const uint8_t* source,
}
}
-FFmpegCdmVideoDecoder::FFmpegCdmVideoDecoder(CdmHost* host)
+FFmpegCdmVideoDecoder::FFmpegCdmVideoDecoder(ClearKeyCdmHost* host)
: is_initialized_(false),
host_(host) {
}
@@ -275,7 +275,7 @@ bool FFmpegCdmVideoDecoder::CopyAvFrameTo(cdm::VideoFrame* cdm_video_frame) {
DCHECK(!cdm_video_frame->FrameBuffer());
cdm_video_frame->SetFrameBuffer(host_->Allocate(space_required));
if (!cdm_video_frame->FrameBuffer()) {
- LOG(ERROR) << "CopyAvFrameTo() CdmHost::Allocate failed.";
+ LOG(ERROR) << "CopyAvFrameTo() ClearKeyCdmHost::Allocate failed.";
return false;
}
cdm_video_frame->FrameBuffer()->SetSize(space_required);
diff --git a/media/cdm/ppapi/ffmpeg_cdm_video_decoder.h b/media/cdm/ppapi/ffmpeg_cdm_video_decoder.h
index f65e9a0..9ce87e6 100644
--- a/media/cdm/ppapi/ffmpeg_cdm_video_decoder.h
+++ b/media/cdm/ppapi/ffmpeg_cdm_video_decoder.h
@@ -21,7 +21,7 @@ class ScopedPtrAVFreeFrame;
class FFmpegCdmVideoDecoder : public CdmVideoDecoder {
public:
- explicit FFmpegCdmVideoDecoder(CdmHost* host);
+ explicit FFmpegCdmVideoDecoder(ClearKeyCdmHost* host);
virtual ~FFmpegCdmVideoDecoder();
// CdmVideoDecoder implementation.
@@ -52,7 +52,7 @@ class FFmpegCdmVideoDecoder : public CdmVideoDecoder {
bool is_initialized_;
- CdmHost* const host_;
+ ClearKeyCdmHost* const host_;
DISALLOW_COPY_AND_ASSIGN(FFmpegCdmVideoDecoder);
};