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

Unified Diff: media/base/cdm_context.h

Issue 835683002: media: Always define |cdm_id| in CdmContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed 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
« no previous file with comments | « content/renderer/media/crypto/proxy_media_keys.cc ('k') | media/cdm/aes_decryptor.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 2a3e8cd25ded665e6daf630152924b1f2b8a7d4d..a0861c4e5db41359f0e877c5ebce59008fde5c9d 100644
--- a/media/base/cdm_context.h
+++ b/media/base/cdm_context.h
@@ -17,22 +17,22 @@ class Decryptor;
// content decryption module (CDM) to decrypt (and decode) encrypted buffers.
class MEDIA_EXPORT CdmContext {
public:
-#if defined(ENABLE_BROWSER_CDMS)
+ // Indicates an invalid CDM ID. See GetCdmId() for details.
static const int kInvalidCdmId = 0;
-#endif
virtual ~CdmContext();
- // Gets the Decryptor object associated with the CDM. Returns NULL if no
- // Decryptor object is associated. The returned object is only guaranteed
- // to be valid during the CDM's lifetime.
+ // Gets the Decryptor object associated with the CDM. Returns NULL if the CDM
+ // does not support a Decryptor. The returned object is only guaranteed to be
+ // valid during the CDM's lifetime.
virtual Decryptor* GetDecryptor() = 0;
-#if defined(ENABLE_BROWSER_CDMS)
- // Returns the CDM ID associated with |this|. May be kInvalidCdmId if no CDM
- // ID is associated.
+ // Returns an ID associated with the CDM, which can be used to locate the real
+ // CDM instance. This is useful when the CDM is hosted remotely, e.g. in a
+ // different process.
+ // Returns kInvalidCdmId if the CDM cannot be used remotely. In this case,
+ // GetDecryptor() should return a non-null Decryptor.
virtual int GetCdmId() const = 0;
-#endif
protected:
CdmContext();
« no previous file with comments | « content/renderer/media/crypto/proxy_media_keys.cc ('k') | media/cdm/aes_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698