Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1594)

Unified Diff: media/cdm/cdm_adapter.h

Issue 1673383002: Add allocator interface for use by cdm_adapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add MEDIA_CDM_EXPORT for Windows Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/cdm_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698