Chromium Code Reviews| 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; |