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

Unified Diff: media/base/cdm_context.h

Issue 1808983002: media: Add MediaDrmBridgeCdmContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 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
« no previous file with comments | « media/base/android/media_drm_bridge_cdm_context.cc ('k') | media/base/media_keys.h » ('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 82e088d1200813a25e5008432461442db54324e0..d41281ec53dcfef71a4334da3bcd909da3ced13c 100644
--- a/media/base/cdm_context.h
+++ b/media/base/cdm_context.h
@@ -13,9 +13,9 @@ namespace media {
class Decryptor;
-// An interface representing the context that a media pipeline needs from a
+// An interface representing the context that a media player needs from a
// content decryption module (CDM) to decrypt (and decode) encrypted buffers.
-// Only used for implementing SetCdm().
+// This is used to pass the CDM to the media player (e.g. SetCdm()).
class MEDIA_EXPORT CdmContext {
public:
// Indicates an invalid CDM ID. See GetCdmId() for details.
@@ -24,15 +24,14 @@ class MEDIA_EXPORT CdmContext {
virtual ~CdmContext();
// Gets the Decryptor object associated with the CDM. Returns nullptr if the
- // CDM does not support a Decryptor. Must not return nullptr if GetCdmId()
- // returns kInvalidCdmId. The returned object is only guaranteed to be valid
- // during the CDM's lifetime.
+ // CDM does not support a Decryptor (i.e. platform-based CDMs where decryption
+ // occurs implicitly along with decoding). The returned object is only
+ // guaranteed to be valid during the CDM's lifetime.
virtual Decryptor* GetDecryptor() = 0;
- // Returns an ID that identifies a CDM, or kInvalidCdmId. The interpretation
- // is implementation-specific; current implementations use the ID to locate a
- // remote CDM in a different process. The return value will not be
- // kInvalidCdmId if GetDecryptor() returns nullptr.
+ // Returns an ID that can be used to find a remote CDM, in which case this CDM
+ // serves as a proxy to the remote one. Returns kInvalidCdmId when remote CDM
+ // is not supported (e.g. this CDM is a local CDM).
virtual int GetCdmId() const = 0;
protected:
« no previous file with comments | « media/base/android/media_drm_bridge_cdm_context.cc ('k') | media/base/media_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698