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

Unified Diff: media/base/cdm_context.h

Issue 1165633004: media: Add MojoCdmServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address related comments in https://codereview.chromium.org/840473002/#ps160001 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
Index: media/base/cdm_context.h
diff --git a/media/base/cdm_context.h b/media/base/cdm_context.h
index a0861c4e5db41359f0e877c5ebce59008fde5c9d..356e276acf364227a50f27b08a5fa0ee1f1cbdc7 100644
--- a/media/base/cdm_context.h
+++ b/media/base/cdm_context.h
@@ -41,6 +41,27 @@ class MEDIA_EXPORT CdmContext {
DISALLOW_COPY_AND_ASSIGN(CdmContext);
};
+// An interface that provides the access to a CdmContext through |cdm_id|.
sandersd (OOO until July 31) 2015/06/04 22:53:07 An interface for looking up CdmContext objects by
xhwang 2015/06/05 18:14:51 Done.
+// This is typically used when CDMs are hosted remotely.
sandersd (OOO until July 31) 2015/06/04 22:53:07 This is confusing because a CdmContextProvider onl
xhwang 2015/06/05 18:14:52 Done.
+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 not necessarily the same as GetCdmId() of the returned
+ // CdmContext. The former is used to locate the real CDM, which typically
+ // is a local CDM and cannot be used remotely. So GetCdmId() on the returned
+ // CdmContext should return kInvalidCdmId.
sandersd (OOO until July 31) 2015/06/04 22:53:07 I would say: Note: Calling GetCdmId() on the retu
xhwang 2015/06/05 18:14:52 Done.
+ 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