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

Unified Diff: webkit/media/crypto/ppapi/clear_key_cdm.cc

Issue 12212079: Update Cdm Wrapper and ClearKeyCdm to work with CDM interface version 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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: webkit/media/crypto/ppapi/clear_key_cdm.cc
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index 53af6fd1c7a31c9c2f0f7b68136369610bdb6fbc..8f06143d8ff0ecb03809e44278fef88dbcdbcfd9 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -125,13 +125,20 @@ void INITIALIZE_CDM_MODULE() {
void DeinitializeCdmModule() {
}
-cdm::ContentDecryptionModule* CreateCdmInstance(const char* key_system_arg,
- int key_system_size,
- cdm::Allocator* allocator,
- cdm::Host* host) {
+cdm::ContentDecryptionModule* CreateCdmInstance(
+ const char* key_system_arg,
+ int key_system_size,
+ cdm::Allocator* allocator,
+ cdm::HostFactory* host_factory) {
DVLOG(1) << "CreateCdmInstance()";
DCHECK_EQ(std::string(key_system_arg, key_system_size), kExternalClearKey);
- return new webkit_media::ClearKeyCdm(allocator, host);
+
+ void* host = host_factory->GetCdmHost(CDM_HOST_INTERFACE);
ddorwin 2013/02/07 23:50:21 Do you think it is worth putting this call and the
xhwang 2013/02/08 01:23:12 Done.
+ if (!host)
+ return NULL;
+
+ return new webkit_media::ClearKeyCdm(allocator,
+ reinterpret_cast<cdm::Host*>(host));
}
void DestroyCdmInstance(cdm::ContentDecryptionModule* instance) {
« webkit/media/crypto/ppapi/cdm_wrapper.cc ('K') | « webkit/media/crypto/ppapi/cdm_wrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698