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

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: Fix TODO. Created 5 years, 9 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
Index: media/base/cdm_context.h
diff --git a/media/base/cdm_context.h b/media/base/cdm_context.h
index b3e6a0b0ea0b270b9e436da9f5f22a2264ad5fd8..1263d66cd33b79b85030042cbba3a9e058273d49 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.
ddorwin 2015/05/15 19:10:07 This is hard to understand. Perhaps they are not n
xhwang 2015/06/01 21:21:24 Updated comment with more restrictions.
+ // 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;

Powered by Google App Engine
This is Rietveld 408576698