Index: media/cdm/cdm_adapter.h |
diff --git a/media/cdm/cdm_adapter.h b/media/cdm/cdm_adapter.h |
index 091d77595bd77f09baa946b357555d399cce7f4d..cb08f4a155d62ad63d7e75579be789c323f4e77d 100644 |
--- a/media/cdm/cdm_adapter.h |
+++ b/media/cdm/cdm_adapter.h |
@@ -31,6 +31,7 @@ |
namespace media { |
class AudioFramesImpl; |
+class CdmAllocator; |
class CdmWrapper; |
class MEDIA_EXPORT CdmAdapter : public MediaKeys, |
@@ -40,12 +41,15 @@ class MEDIA_EXPORT CdmAdapter : public MediaKeys, |
NON_EXPORTED_BASE(public cdm::Host_8) { |
public: |
// Create the CDM using |cdm_path| and initialize it using |key_system| and |
- // |cdm_config|. Callbacks will be used for events generated by the CDM. |
- // |cdm_created_cb| will be called when the CDM is loaded and initialized. |
+ // |cdm_config|. |allocator| is to be used whenever the CDM needs memory |
+ // and to create VideoFrames. Callbacks will be used for events generated |
+ // by the CDM. |cdm_created_cb| will be called when the CDM is loaded and |
+ // initialized. |
static void Create( |
const std::string& key_system, |
const base::FilePath& cdm_path, |
const CdmConfig& cdm_config, |
+ scoped_ptr<CdmAllocator> allocator, |
const SessionMessageCB& session_message_cb, |
const SessionClosedCB& session_closed_cb, |
const LegacySessionErrorCB& legacy_session_error_cb, |
@@ -144,6 +148,7 @@ class MEDIA_EXPORT CdmAdapter : public MediaKeys, |
private: |
CdmAdapter(const std::string& key_system, |
const CdmConfig& cdm_config, |
+ scoped_ptr<CdmAllocator> allocator, |
const SessionMessageCB& session_message_cb, |
const SessionClosedCB& session_closed_cb, |
const LegacySessionErrorCB& legacy_session_error_cb, |
@@ -204,6 +209,8 @@ class MEDIA_EXPORT CdmAdapter : public MediaKeys, |
int audio_samples_per_second_; |
ChannelLayout audio_channel_layout_; |
+ scoped_ptr<CdmAllocator> allocator_; |
+ |
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
// NOTE: Weak pointers must be invalidated before all other member variables. |