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

Unified Diff: media/mojo/services/mojo_cdm.h

Issue 840473002: media: Support creation and SetCdm() for mojo based CDM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only; compiles but needs more polish... 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
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm.h
diff --git a/media/mojo/services/mojo_cdm.h b/media/mojo/services/mojo_cdm.h
index 68667dab6ccfa3b4c1150c98e972e4667d176431..8ffc0eff0a55823f5c9dc161707af9f9312da937 100644
--- a/media/mojo/services/mojo_cdm.h
+++ b/media/mojo/services/mojo_cdm.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "media/base/cdm_context.h"
#include "media/base/media_keys.h"
#include "media/mojo/interfaces/content_decryption_module.mojom.h"
#include "media/mojo/services/mojo_type_trait.h"
@@ -22,11 +23,14 @@ namespace media {
// A MediaKeys that proxies to a mojo::ContentDecryptionModule. That
// mojo::ContentDecryptionModule proxies back to the MojoCdm via the
// mojo::ContentDecryptionModuleClient interface.
-class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient {
+class MojoCdm : public MediaKeys,
+ public CdmContext,
+ public mojo::ContentDecryptionModuleClient {
public:
// |media_renderer_provider| is a ServiceProvider from a connected
// Application that is hosting a mojo::MediaRenderer.
MojoCdm(mojo::ContentDecryptionModulePtr remote_cdm,
+ int32_t cdm_id,
const SessionMessageCB& session_message_cb,
const SessionClosedCB& session_closed_cb,
const LegacySessionErrorCB& legacy_session_error_cb,
@@ -54,6 +58,10 @@ class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient {
scoped_ptr<SimpleCdmPromise> promise) final;
CdmContext* GetCdmContext() final;
+ // CdmContext implementation.
+ media::Decryptor* GetDecryptor() final;
+ int GetCdmId() const final;
+
private:
// mojo::ContentDecryptionModuleClient implementation.
void OnSessionMessage(const mojo::String& session_id,
@@ -89,6 +97,8 @@ class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient {
mojo::ContentDecryptionModulePtr remote_cdm_;
mojo::Binding<ContentDecryptionModuleClient> binding_;
+ const int32_t cdm_id_;
+
// Callbacks for firing session events.
SessionMessageCB session_message_cb_;
SessionClosedCB session_closed_cb_;
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698