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

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: comments addressed 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
Index: media/base/cdm_context.h
diff --git a/media/base/cdm_context.h b/media/base/cdm_context.h
index 82e088d1200813a25e5008432461442db54324e0..4ad703aa2756c6941b1e52093e2427c2dd6e785a 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,13 @@ 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. The returned object is only guaranteed to
ddorwin 2016/03/22 17:20:12 nit: Should we add something like "(i.e. platform-
xhwang 2016/03/22 17:35:10 Done.
+ // 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 identify a CDM remotely, in which case
ddorwin 2016/03/22 17:20:12 nit: I'm not sure what "identify... remotely" mean
xhwang 2016/03/22 17:35:10 Done.
+ // this CDM serves as a proxy to the remote CDM. Returns kInvalidCdmId when
+ // remote CDM is not supported (e.g. this CDM is a concrete CDM).
ddorwin 2016/03/22 17:20:12 nit: I'm not sure what a "concrete CDM" is. Perhap
xhwang 2016/03/22 17:35:10 Done. Used "local" in comparison to "remote".
virtual int GetCdmId() const = 0;
protected:

Powered by Google App Engine
This is Rietveld 408576698