summaryrefslogtreecommitdiffstats
path: root/media/cdm
diff options
context:
space:
mode:
authordalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-21 21:26:07 +0000
committerdalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-21 21:26:07 +0000
commit0f6882eaf9b392c9a8a8aa398d0076283a1c469c (patch)
treec171f1d0e998569111839dc2aa08d62e31825460 /media/cdm
parentec04eb93a65a4700ded87f1fc6e27924ba65f302 (diff)
downloadchromium_src-0f6882eaf9b392c9a8a8aa398d0076283a1c469c.zip
chromium_src-0f6882eaf9b392c9a8a8aa398d0076283a1c469c.tar.gz
chromium_src-0f6882eaf9b392c9a8a8aa398d0076283a1c469c.tar.bz2
Plumb PlatformVerification and AudioFramesImpl (Attempt II)
Mostly just a rebase of https://codereview.chromium.org/23546014 on top of xhwang@'s CdmAdapter changes. Also restores AudioFrames changes which seem to have been inadvertently dropped from https://codereview.chromium.org/27774002/ BUG=270296 TEST=encrypted media browsertests. Review URL: https://codereview.chromium.org/30163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cdm')
-rw-r--r--media/cdm/ppapi/cdm_adapter.cc161
-rw-r--r--media/cdm/ppapi/cdm_adapter.h41
-rw-r--r--media/cdm/ppapi/cdm_helpers.h18
-rw-r--r--media/cdm/ppapi/cdm_wrapper.h97
-rw-r--r--media/cdm/ppapi/clear_key_cdm.cc9
-rw-r--r--media/cdm/ppapi/clear_key_cdm.h4
-rw-r--r--media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc2
-rw-r--r--media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h2
8 files changed, 263 insertions, 71 deletions
diff --git a/media/cdm/ppapi/cdm_adapter.cc b/media/cdm/ppapi/cdm_adapter.cc
index 7fcd5f0..6814a5e 100644
--- a/media/cdm/ppapi/cdm_adapter.cc
+++ b/media/cdm/ppapi/cdm_adapter.cc
@@ -4,27 +4,7 @@
#include "media/cdm/ppapi/cdm_adapter.h"
-#include <cstring>
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "media/cdm/ppapi/api/content_decryption_module.h"
#include "media/cdm/ppapi/cdm_helpers.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/private/pp_content_decryptor.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/core.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/logging.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/pass_ref.h"
-#include "ppapi/cpp/resource.h"
-#include "ppapi/cpp/var.h"
-#include "ppapi/cpp/var_array_buffer.h"
-#include "ppapi/utility/completion_callback_factory.h"
#if defined(CHECK_DOCUMENT_URL)
#include "ppapi/cpp/dev/url_util_dev.h"
@@ -207,6 +187,14 @@ namespace media {
CdmAdapter::CdmAdapter(PP_Instance instance, pp::Module* module)
: pp::Instance(instance),
pp::ContentDecryptor_Private(this),
+#if defined(OS_CHROMEOS)
+ output_protection_(this),
+ platform_verification_(this),
+ challenge_in_progress_(false),
+ output_link_mask_(0),
+ output_protection_mask_(0),
+ query_output_protection_in_progress_(false),
+#endif
allocator_(this),
cdm_(NULL) {
callback_factory_.Initialize(this);
@@ -520,7 +508,7 @@ void CdmAdapter::SendKeyError(const char* session_id,
}
void CdmAdapter::GetPrivateData(int32_t* instance,
- cdm::Host::GetPrivateInterface* get_interface) {
+ GetPrivateInterface* get_interface) {
*instance = pp_instance();
*get_interface = pp::Module::Get()->get_browser_interface();
}
@@ -737,15 +725,138 @@ bool CdmAdapter::IsValidVideoFrame(const LinkedVideoFrame& video_frame) {
return true;
}
+void CdmAdapter::SendPlatformChallenge(
+ const char* service_id, int32_t service_id_length,
+ const char* challenge, int32_t challenge_length) {
+#if defined(OS_CHROMEOS)
+ PP_DCHECK(!challenge_in_progress_);
+
+ // Ensure member variables set by the callback are in a clean state.
+ signed_data_output_ = pp::Var();
+ signed_data_signature_output_ = pp::Var();
+ platform_key_certificate_output_ = pp::Var();
+
+ pp::VarArrayBuffer challenge_var(challenge_length);
+ uint8_t* var_data = static_cast<uint8_t*>(challenge_var.Map());
+ memcpy(var_data, challenge, challenge_length);
+
+ std::string service_id_str(service_id, service_id_length);
+ int32_t result = platform_verification_.ChallengePlatform(
+ pp::Var(service_id_str), challenge_var, &signed_data_output_,
+ &signed_data_signature_output_, &platform_key_certificate_output_,
+ callback_factory_.NewCallback(&CdmAdapter::SendPlatformChallengeDone));
+ challenge_var.Unmap();
+ if (result == PP_OK_COMPLETIONPENDING) {
+ challenge_in_progress_ = true;
+ return;
+ }
+
+ // Fall through on error and issue an empty OnPlatformChallengeResponse().
+ PP_DCHECK(result != PP_OK);
+#endif
+
+ cdm::PlatformChallengeResponse response = {};
+ cdm_->OnPlatformChallengeResponse(response);
+}
+
+void CdmAdapter::EnableOutputProtection(uint32_t desired_protection_mask) {
+#if defined(OS_CHROMEOS)
+ output_protection_.EnableProtection(
+ desired_protection_mask, callback_factory_.NewCallback(
+ &CdmAdapter::EnableProtectionDone));
+
+ // Errors are ignored since clients must call QueryOutputProtectionStatus() to
+ // inspect the protection status on a regular basis.
+ // TODO(dalecurtis): It'd be nice to log a message or non-fatal error here...
+#endif
+}
+
+void CdmAdapter::QueryOutputProtectionStatus() {
+#if defined(OS_CHROMEOS)
+ PP_DCHECK(!query_output_protection_in_progress_);
+
+ output_link_mask_ = output_protection_mask_ = 0;
+ const int32_t result = output_protection_.QueryStatus(
+ &output_link_mask_,
+ &output_protection_mask_,
+ callback_factory_.NewCallback(
+ &CdmAdapter::QueryOutputProtectionStatusDone));
+ if (result == PP_OK_COMPLETIONPENDING) {
+ query_output_protection_in_progress_ = true;
+ return;
+ }
+
+ // Fall through on error and issue an empty OnQueryOutputProtectionStatus().
+ PP_DCHECK(result != PP_OK);
+#endif
+
+ cdm_->OnQueryOutputProtectionStatus(0, 0);
+}
+
+#if defined(OS_CHROMEOS)
+void CdmAdapter::SendPlatformChallengeDone(int32_t result) {
+ challenge_in_progress_ = false;
+
+ if (result != PP_OK) {
+ cdm::PlatformChallengeResponse response = {};
+ cdm_->OnPlatformChallengeResponse(response);
+ return;
+ }
+
+ pp::VarArrayBuffer signed_data_var(signed_data_output_);
+ pp::VarArrayBuffer signed_data_signature_var(signed_data_signature_output_);
+ std::string platform_key_certificate_string =
+ platform_key_certificate_output_.AsString();
+
+ cdm::PlatformChallengeResponse response = {
+ static_cast<uint8_t*>(signed_data_var.Map()),
+ static_cast<int32_t>(signed_data_var.ByteLength()),
+
+ static_cast<uint8_t*>(signed_data_signature_var.Map()),
+ static_cast<int32_t>(signed_data_signature_var.ByteLength()),
+
+ reinterpret_cast<const uint8_t*>(platform_key_certificate_string.c_str()),
+ static_cast<int32_t>(platform_key_certificate_string.length())
+ };
+ cdm_->OnPlatformChallengeResponse(response);
+
+ signed_data_var.Unmap();
+ signed_data_signature_var.Unmap();
+}
+
+void CdmAdapter::EnableProtectionDone(int32_t result) {
+ // Does nothing since clients must call QueryOutputProtectionStatus() to
+ // inspect the protection status on a regular basis.
+ // TODO(dalecurtis): It'd be nice to log a message or non-fatal error here...
+}
+
+void CdmAdapter::QueryOutputProtectionStatusDone(int32_t result) {
+ PP_DCHECK(query_output_protection_in_progress_);
+ query_output_protection_in_progress_ = false;
+
+ // Return a protection status of none on error.
+ if (result != PP_OK)
+ output_link_mask_ = output_protection_mask_ = 0;
+
+ cdm_->OnQueryOutputProtectionStatus(output_link_mask_,
+ output_protection_mask_);
+}
+#endif
+
void* GetCdmHost(int host_interface_version, void* user_data) {
if (!host_interface_version || !user_data)
return NULL;
- if (host_interface_version != cdm::kHostInterfaceVersion)
- return NULL;
-
CdmAdapter* cdm_adapter = static_cast<CdmAdapter*>(user_data);
- return static_cast<cdm::Host*>(cdm_adapter);
+ switch (host_interface_version) {
+ case cdm::kHostInterfaceVersion_1:
+ return static_cast<cdm::Host_1*>(cdm_adapter);
+ case cdm::kHostInterfaceVersion_2:
+ return static_cast<cdm::Host_2*>(cdm_adapter);
+ default:
+ PP_NOTREACHED();
+ return NULL;
+ }
}
// This object is the global object representing this plugin library as long
diff --git a/media/cdm/ppapi/cdm_adapter.h b/media/cdm/ppapi/cdm_adapter.h
index bf180d1..d2edefb 100644
--- a/media/cdm/ppapi/cdm_adapter.h
+++ b/media/cdm/ppapi/cdm_adapter.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "build/build_config.h"
#include "media/cdm/ppapi/api/content_decryption_module.h"
#include "media/cdm/ppapi/cdm_helpers.h"
#include "media/cdm/ppapi/cdm_wrapper.h"
@@ -22,6 +23,11 @@
#include "ppapi/cpp/var_array_buffer.h"
#include "ppapi/utility/completion_callback_factory.h"
+#if defined(OS_CHROMEOS)
+#include "ppapi/cpp/private/output_protection_private.h"
+#include "ppapi/cpp/private/platform_verification.h"
+#endif
+
namespace media {
// GetCdmHostFunc implementation.
@@ -31,7 +37,8 @@ void* GetCdmHost(int host_interface_version, void* user_data);
// Content Decryption Module (CDM).
class CdmAdapter : public pp::Instance,
public pp::ContentDecryptor_Private,
- public cdm::Host {
+ public cdm::Host_1,
+ public cdm::Host_2 {
public:
CdmAdapter(PP_Instance instance, pp::Module* module);
virtual ~CdmAdapter();
@@ -44,6 +51,7 @@ class CdmAdapter : public pp::Instance,
// PPP_ContentDecryptor_Private implementation.
// Note: Results of calls to these methods must be reported through the
// PPB_ContentDecryptor_Private interface.
+ // TODO(jrummell): |can_challenge_platform| should be removed.
virtual void Initialize(const std::string& key_system,
bool can_challenge_platform) OVERRIDE;
virtual void GenerateKeyRequest(const std::string& type,
@@ -85,6 +93,14 @@ class CdmAdapter : public pp::Instance,
virtual void GetPrivateData(int32_t* instance,
GetPrivateInterface* get_interface) OVERRIDE;
+ // cdm::Host_2 implementation.
+ virtual void SendPlatformChallenge(
+ const char* service_id, int32_t service_id_length,
+ const char* challenge, int32_t challenge_length) OVERRIDE;
+ virtual void EnableOutputProtection(
+ uint32_t desired_protection_mask) OVERRIDE;
+ virtual void QueryOutputProtectionStatus() OVERRIDE;
+
private:
struct SessionInfo {
SessionInfo(const std::string& key_system_in,
@@ -153,6 +169,29 @@ class CdmAdapter : public pp::Instance,
bool IsValidVideoFrame(const LinkedVideoFrame& video_frame);
+
+#if defined(OS_CHROMEOS)
+ void SendPlatformChallengeDone(int32_t result);
+ void EnableProtectionDone(int32_t result);
+ void QueryOutputProtectionStatusDone(int32_t result);
+
+ pp::OutputProtection_Private output_protection_;
+ pp::PlatformVerification platform_verification_;
+
+ // Since PPAPI doesn't provide handlers for CompletionCallbacks with more than
+ // one output we need to manage our own. These values are only read by
+ // SendPlatformChallengeDone().
+ pp::Var signed_data_output_;
+ pp::Var signed_data_signature_output_;
+ pp::Var platform_key_certificate_output_;
+ bool challenge_in_progress_;
+
+ // Same as above, these are only read by QueryOutputProtectionStatusDone().
+ uint32_t output_link_mask_;
+ uint32_t output_protection_mask_;
+ bool query_output_protection_in_progress_;
+#endif
+
PpbBufferAllocator allocator_;
pp::CompletionCallbackFactory<CdmAdapter> callback_factory_;
linked_ptr<CdmWrapper> cdm_;
diff --git a/media/cdm/ppapi/cdm_helpers.h b/media/cdm/ppapi/cdm_helpers.h
index c0f2b95..67ebf86c 100644
--- a/media/cdm/ppapi/cdm_helpers.h
+++ b/media/cdm/ppapi/cdm_helpers.h
@@ -191,9 +191,10 @@ class VideoFrameImpl : public cdm::VideoFrame {
DISALLOW_COPY_AND_ASSIGN(VideoFrameImpl);
};
-class AudioFramesImpl : public cdm::AudioFrames {
+class AudioFramesImpl : public cdm::AudioFrames_1,
+ public cdm::AudioFrames_2 {
public:
- AudioFramesImpl() : buffer_(NULL) {}
+ AudioFramesImpl() : buffer_(NULL), format_(cdm::kUnknownAudioFormat) {}
virtual ~AudioFramesImpl() {
if (buffer_)
buffer_->Destroy();
@@ -206,9 +207,22 @@ class AudioFramesImpl : public cdm::AudioFrames {
virtual cdm::Buffer* FrameBuffer() OVERRIDE {
return buffer_;
}
+ virtual void SetFormat(cdm::AudioFormat format) OVERRIDE {
+ format_ = format;
+ }
+ virtual cdm::AudioFormat Format() const OVERRIDE {
+ return format_;
+ }
+
+ cdm::Buffer* PassFrameBuffer() {
+ PpbBuffer* temp_buffer = buffer_;
+ buffer_ = NULL;
+ return temp_buffer;
+ }
private:
PpbBuffer* buffer_;
+ cdm::AudioFormat format_;
DISALLOW_COPY_AND_ASSIGN(AudioFramesImpl);
};
diff --git a/media/cdm/ppapi/cdm_wrapper.h b/media/cdm/ppapi/cdm_wrapper.h
index 016292e..e660c25 100644
--- a/media/cdm/ppapi/cdm_wrapper.h
+++ b/media/cdm/ppapi/cdm_wrapper.h
@@ -64,6 +64,11 @@ class CdmWrapper {
virtual cdm::Status DecryptAndDecodeSamples(
const cdm::InputBuffer& encrypted_buffer,
cdm::AudioFrames* audio_frames) = 0;
+ virtual void OnPlatformChallengeResponse(
+ const cdm::PlatformChallengeResponse& response) = 0;
+ virtual void OnQueryOutputProtectionStatus(
+ uint32_t link_mask,
+ uint32_t output_protection_mask) = 0;
protected:
CdmWrapper() {};
@@ -75,21 +80,20 @@ class CdmWrapper {
// Template class that does the CdmWrapper -> CdmInterface conversion. Default
// implementations are provided. Any methods that need special treatment should
// be specialized.
-// TODO(xhwang): Remove CdmInterfaceVersion template parameter after we roll
-// CDM.h DEPS.
-template <class CdmInterface, int CdmInterfaceVersion>
+template <class CdmInterface>
class CdmWrapperImpl : public CdmWrapper {
public:
static CdmWrapper* Create(const char* key_system,
int key_system_size,
GetCdmHostFunc get_cdm_host_func,
void* user_data) {
- void* cdm_instance = ::CreateCdmInstance(CdmInterfaceVersion,
- key_system, key_system_size, get_cdm_host_func, user_data);
+ void* cdm_instance = ::CreateCdmInstance(
+ CdmInterface::kVersion, key_system, key_system_size, get_cdm_host_func,
+ user_data);
if (!cdm_instance)
return NULL;
- return new CdmWrapperImpl<CdmInterface, CdmInterfaceVersion>(
+ return new CdmWrapperImpl<CdmInterface>(
static_cast<CdmInterface*>(cdm_instance));
}
@@ -158,6 +162,17 @@ class CdmWrapperImpl : public CdmWrapper {
return cdm_->DecryptAndDecodeSamples(encrypted_buffer, audio_frames);
}
+ virtual void OnPlatformChallengeResponse(
+ const cdm::PlatformChallengeResponse& response) OVERRIDE {
+ cdm_->OnPlatformChallengeResponse(response);
+ }
+
+ virtual void OnQueryOutputProtectionStatus(
+ uint32_t link_mask,
+ uint32_t output_protection_mask) OVERRIDE {
+ cdm_->OnQueryOutputProtectionStatus(link_mask, output_protection_mask);
+ }
+
private:
CdmWrapperImpl(CdmInterface* cdm) : cdm_(cdm) {
PP_DCHECK(cdm_);
@@ -168,44 +183,58 @@ class CdmWrapperImpl : public CdmWrapper {
DISALLOW_COPY_AND_ASSIGN(CdmWrapperImpl);
};
-// Specializations for old ContentDecryptionModule interfaces.
-// For example:
-
-// template <> cdm::Status CdmAdapterImpl<cdm::ContentDecryptionModule_1>::
-// DecryptAndDecodeSamples(const cdm::InputBuffer& encrypted_buffer,
-// cdm::AudioFrames* audio_frames) {
-// AudioFramesImpl audio_frames_1;
-// cdm::Status status =
-// cdm_->DecryptAndDecodeSamples(encrypted_buffer, &audio_frames_1);
-// if (status != cdm::kSuccess)
-// return status;
-//
-// audio_frames->SetFrameBuffer(audio_frames_1.PassFrameBuffer());
-// audio_frames->SetFormat(cdm::kAudioFormatS16);
-// return cdm::kSuccess;
-// }
+// Specializations for ContentDecryptionModule_1.
+
+template <> void CdmWrapperImpl<cdm::ContentDecryptionModule_1>::
+ OnPlatformChallengeResponse(
+ const cdm::PlatformChallengeResponse& response) {
+ PP_NOTREACHED();
+}
+
+template <> void CdmWrapperImpl<cdm::ContentDecryptionModule_1>::
+ OnQueryOutputProtectionStatus(uint32_t link_mask,
+ uint32_t output_protection_mask) {
+ PP_NOTREACHED();
+}
+
+template <> cdm::Status CdmWrapperImpl<cdm::ContentDecryptionModule_1>::
+ DecryptAndDecodeSamples(const cdm::InputBuffer& encrypted_buffer,
+ cdm::AudioFrames* audio_frames) {
+ AudioFramesImpl audio_frames_1;
+ cdm::Status status =
+ cdm_->DecryptAndDecodeSamples(encrypted_buffer, &audio_frames_1);
+ if (status != cdm::kSuccess)
+ return status;
+
+ audio_frames->SetFrameBuffer(audio_frames_1.PassFrameBuffer());
+ audio_frames->SetFormat(cdm::kAudioFormatS16);
+ return cdm::kSuccess;
+}
CdmWrapper* CdmWrapper::Create(const char* key_system,
int key_system_size,
GetCdmHostFunc get_cdm_host_func,
void* user_data) {
// Try to create the CDM using the latest CDM interface version.
- CdmWrapper* cdm_wrapper =
- CdmWrapperImpl<cdm::ContentDecryptionModule, cdm::kCdmInterfaceVersion>::
- Create(key_system, key_system_size, get_cdm_host_func, user_data);
+ CdmWrapper* cdm_adapter =
+ CdmWrapperImpl<cdm::ContentDecryptionModule>::Create(
+ key_system, key_system_size, get_cdm_host_func, user_data);
+ if (cdm_adapter)
+ return cdm_adapter;
// Try to see if the CDM supports older version(s) of CDM interface(s).
- // For example:
- //
- // if (cdm_wrapper)
- // return cdm_wrapper;
- //
- // cdm_wrapper = CdmWrapperImpl<cdm::ContentDecryptionModule_1>::Create(
- // key_system, key_system_size, get_cdm_host_func, user_data);
-
- return cdm_wrapper;
+ cdm_adapter = CdmWrapperImpl<cdm::ContentDecryptionModule_1>::Create(
+ key_system, key_system_size, get_cdm_host_func, user_data);
+ return cdm_adapter;
}
+// When updating the CdmAdapter, ensure you've updated the CdmWrapper to contain
+// stub implementations for new or modified methods which the older CDM
+// interface does not have.
+COMPILE_ASSERT(cdm::ContentDecryptionModule_2::kVersion ==
+ cdm::ContentDecryptionModule::kVersion,
+ ensure_cdm_wrapper_templates_have_old_version_support);
+
} // namespace media
#endif // MEDIA_CDM_PPAPI_CDM_WRAPPER_H_
diff --git a/media/cdm/ppapi/clear_key_cdm.cc b/media/cdm/ppapi/clear_key_cdm.cc
index 9ec0bd4..d732500 100644
--- a/media/cdm/ppapi/clear_key_cdm.cc
+++ b/media/cdm/ppapi/clear_key_cdm.cc
@@ -136,16 +136,15 @@ void* CreateCdmInstance(
return NULL;
}
- if (cdm_interface_version != cdm::kCdmInterfaceVersion)
+ if (cdm_interface_version != cdm::ContentDecryptionModule_1::kVersion)
return NULL;
cdm::Host* host = static_cast<cdm::Host*>(
- get_cdm_host_func(cdm::kHostInterfaceVersion, user_data));
+ get_cdm_host_func(cdm::ContentDecryptionModule_1::kVersion, user_data));
if (!host)
return NULL;
- return static_cast<cdm::ContentDecryptionModule*>(
- new media::ClearKeyCdm(host));
+ return new media::ClearKeyCdm(host);
}
const char* GetCdmVersion() {
@@ -418,7 +417,7 @@ cdm::Status ClearKeyCdm::DecryptAndDecodeFrame(
cdm::Status ClearKeyCdm::DecryptAndDecodeSamples(
const cdm::InputBuffer& encrypted_buffer,
- cdm::AudioFrames* audio_frames) {
+ cdm::AudioFrames_1* audio_frames) {
DVLOG(1) << "DecryptAndDecodeSamples()";
scoped_refptr<media::DecoderBuffer> buffer;
diff --git a/media/cdm/ppapi/clear_key_cdm.h b/media/cdm/ppapi/clear_key_cdm.h
index 67637eb..c77e4b4 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 cdm::ContentDecryptionModule {
+class ClearKeyCdm : public cdm::ContentDecryptionModule_1 {
public:
explicit ClearKeyCdm(cdm::Host* host);
virtual ~ClearKeyCdm();
@@ -56,7 +56,7 @@ class ClearKeyCdm : public cdm::ContentDecryptionModule {
cdm::VideoFrame* video_frame) OVERRIDE;
virtual cdm::Status DecryptAndDecodeSamples(
const cdm::InputBuffer& encrypted_buffer,
- cdm::AudioFrames* audio_frames) OVERRIDE;
+ cdm::AudioFrames_1* audio_frames) OVERRIDE;
virtual void Destroy() OVERRIDE;
private:
diff --git a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc
index 1e66736..3e2ca65 100644
--- a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc
+++ b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc
@@ -190,7 +190,7 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
const uint8_t* compressed_buffer,
int32_t compressed_buffer_size,
int64_t input_timestamp,
- cdm::AudioFrames* decoded_frames) {
+ cdm::AudioFrames_1* decoded_frames) {
DVLOG(1) << "DecodeBuffer()";
const bool is_end_of_stream = !compressed_buffer;
base::TimeDelta timestamp =
diff --git a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h
index 50fe4d4..35a01df 100644
--- a/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h
+++ b/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.h
@@ -49,7 +49,7 @@ class FFmpegCdmAudioDecoder {
cdm::Status DecodeBuffer(const uint8_t* compressed_buffer,
int32_t compressed_buffer_size,
int64_t timestamp,
- cdm::AudioFrames* decoded_frames);
+ cdm::AudioFrames_1* decoded_frames);
private:
void ResetTimestampState();