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

Unified Diff: media/base/cdm_context.h

Issue 840473002: media: Support creation and SetCdm() for mojo based CDM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only; compiles but needs more polish... Created 5 years, 7 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 | « content/browser/frame_host/render_frame_host_impl.cc ('k') | media/base/cdm_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/cdm_context.h
diff --git a/media/base/cdm_context.h b/media/base/cdm_context.h
index a0861c4e5db41359f0e877c5ebce59008fde5c9d..61d37ea43b4362bfd37e8c6e96096820b7acdfaa 100644
--- a/media/base/cdm_context.h
+++ b/media/base/cdm_context.h
@@ -41,6 +41,26 @@ class MEDIA_EXPORT CdmContext {
DISALLOW_COPY_AND_ASSIGN(CdmContext);
};
+// An interface that provides the access to a CdmContext through |cdm_id|.
+// This is typically used when CDMs are hosted remotely.
+class MEDIA_EXPORT CdmContextProvider {
+ public:
+ virtual ~CdmContextProvider();
+
+ // Returns the CdmContext corresponding to |cdm_id|. Returns nullptr if no
+ // such CdmContext can be found.
+ // Note: |cdm_id| is irrelevant to GetCdmId() of the returned CdmContext.
+ // The former is used to locate the real CDM (the latter), which could just
+ // be a local CDM that doesn't support a CDM ID.
+ virtual CdmContext* GetCdmContext(int cdm_id) = 0;
+
+ protected:
+ CdmContextProvider();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CdmContextProvider);
+};
+
// Callback to notify that the CdmContext has been completely attached to
// the media pipeline. Parameter indicates whether the operation succeeded.
typedef base::Callback<void(bool)> CdmAttachedCB;
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | media/base/cdm_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698