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

Unified Diff: media/mojo/clients/mojo_cdm_factory.cc

Issue 2494983002: media: Supports Clear Key key system for mojo CDM/Renderer combo (Closed)
Patch Set: fix comments Created 4 years, 1 month 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/browser/media/encrypted_media_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_cdm_factory.cc
diff --git a/media/mojo/clients/mojo_cdm_factory.cc b/media/mojo/clients/mojo_cdm_factory.cc
index 3837b0f57d238d3b1c0c3b595bf3e17cd2b928ab..7b2da3c8c942f1b4e4752b6760fc719d2d0f2627 100644
--- a/media/mojo/clients/mojo_cdm_factory.cc
+++ b/media/mojo/clients/mojo_cdm_factory.cc
@@ -41,6 +41,12 @@ void MojoCdmFactory::Create(
return;
}
+// When MojoRenderer is used, the real Renderer is running in a remote process,
+// which cannot use an AesDecryptor running locally. In this case, always
+// create the MojoCdm, giving the remote CDM a chance to handle |key_system|.
+// Note: We should not run AesDecryptor in the browser process except for
+// testing. See http://crbug.com/441957
+#if !defined(ENABLE_MOJO_RENDERER)
yucliu1 2016/11/11 21:44:38 Can we have mojo cdm without mojo renderer?
xhwang 2016/11/11 21:45:54 Yes, MojoCdm can work with the existing local Rend
if (CanUseAesDecryptor(key_system)) {
scoped_refptr<MediaKeys> cdm(
new AesDecryptor(security_origin, session_message_cb, session_closed_cb,
yucliu1 2016/11/12 00:26:24 I remember the AesDecryptor::GetCdmId returns kInv
xhwang 2016/11/12 00:30:01 These are all remote decoders, which will not work
@@ -49,6 +55,7 @@ void MojoCdmFactory::Create(
FROM_HERE, base::Bind(cdm_created_cb, cdm, ""));
return;
}
+#endif
mojom::ContentDecryptionModulePtr cdm_ptr;
service_manager::GetInterface<mojom::ContentDecryptionModule>(
« no previous file with comments | « content/browser/media/encrypted_media_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698