Chromium Code Reviews| Index: media/cdm/cdm_adapter.h |
| diff --git a/media/cdm/cdm_adapter.h b/media/cdm/cdm_adapter.h |
| index 091d77595bd77f09baa946b357555d399cce7f4d..28bf1a1fce1eab59dbbbe17b47a810d9f9547d17 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,14 @@ 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. |
|
xhwang
2016/02/12 08:45:29
Also used to create VideoFrame?
jrummell
2016/02/12 23:14:20
Done.
|
| + // 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 +147,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 +208,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. |