Index: third_party/widevine/cdm/widevine_cdm.gyp |
diff --git a/third_party/widevine/cdm/widevine_cdm.gyp b/third_party/widevine/cdm/widevine_cdm.gyp |
index eacbdb3a7414ae817f80fa49c35b5e6160107517..36be0e0ad7fd73bfc5db84a07748053f939db0bf 100644 |
--- a/third_party/widevine/cdm/widevine_cdm.gyp |
+++ b/third_party/widevine/cdm/widevine_cdm.gyp |
@@ -4,6 +4,11 @@ |
{ |
'variables': { |
+ # Allow widevinecdmadapter to be built in Chromium. |
+ 'variables': { |
+ 'enable_widevine%': 0, |
+ }, |
+ 'enable_widevine%': '<(enable_widevine)', |
'widevine_cdm_version_h_file%': 'widevine_cdm_version.h', |
'widevine_cdm_binary_files%': [], |
'conditions': [ |
@@ -44,6 +49,41 @@ |
'widevine_cdm_version_h_file%': |
'android/widevine_cdm_version.h', |
}], |
+ [ 'branding != "Chrome" and OS != "android" and enable_widevine==1', { |
+ # If enable_widevine==1 then use stub_cdm to create the adapter for |
+ # Widevine. On Win/Mac the component updater will get the latest version |
+ # and use it. Other systems are not currently supported, but will build. |
+ 'widevine_cdm_version_h_file%': |
+ 'stub/widevine_cdm_version.h', |
+ 'conditions': [ |
+ [ 'os_posix == 1 and OS != "mac"', { |
+ 'stub_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/libstubcdm.so', |
ddorwin
2015/04/03 19:53:02
On Linux, at least, we cannot just rename the file
jrummell
2015/04/03 23:26:22
Done.
|
+ ], |
+ 'widevine_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/libwidevinecdm.so', |
+ ], |
+ }], |
+ [ 'OS == "mac"', { |
+ 'stub_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/libstubcdm.dylib', |
+ ], |
+ 'widevine_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/libwidevinecdm.dylib', |
+ ], |
+ }], |
+ [ 'OS == "win"', { |
+ 'stub_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/stubcdm.dll', |
+ '<(PRODUCT_DIR)/stubcdm.dll.lib', |
+ ], |
+ 'widevine_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/widevinecdm.dll', |
+ '<(PRODUCT_DIR)/widevinecdm.dll.lib', |
+ ], |
+ }], |
+ ], |
+ }], |
], |
}, |
'includes': [ |
@@ -86,7 +126,7 @@ |
'target_name': 'widevinecdmadapter', |
'type': 'none', |
'conditions': [ |
- [ 'branding == "Chrome" and enable_pepper_cdms==1', { |
+ [ '(branding == "Chrome" or enable_widevine==1) and enable_pepper_cdms==1', { |
'dependencies': [ |
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', |
'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter', |
@@ -140,13 +180,33 @@ |
'COPY_PHASE_STRIP': 'NO', |
} |
}], |
+ [ 'branding == "Chrome"', { |
+ 'copies': [{ |
+ # TODO(ddorwin): Do we need a sub-directory? We either need a |
+ # sub-directory or to rename manifest.json before we can copy it. |
+ 'destination': '<(PRODUCT_DIR)', |
+ 'files': [ '<@(widevine_cdm_binary_files)' ], |
+ }], |
+ }], |
+ [ 'branding != "Chrome" and OS != "android" and enable_widevine==1', { |
+ 'dependencies': [ |
+ '<(DEPTH)/media/media.gyp:stubcdm', |
ddorwin
2015/04/03 02:06:56
Regarding your build failure, perhaps this is some
jrummell
2015/04/03 23:26:22
I think linking is pulling the original name out o
|
+ ], |
+ 'actions': [{ |
+ 'action_name': 'copy_with_rename', |
+ 'inputs': [ |
+ 'copy_with_rename.py', |
+ '<@(stub_cdm_binary_files)', |
+ ], |
+ 'outputs': [ |
+ '<@(widevine_cdm_binary_files)', |
+ ], |
+ 'action': ['python', 'copy_with_rename.py', |
+ '<@(stub_cdm_binary_files)', |
+ '<@(widevine_cdm_binary_files)'], |
+ }], |
+ }], |
], |
- 'copies': [{ |
- # TODO(ddorwin): Do we need a sub-directory? We either need a |
- # sub-directory or to rename manifest.json before we can copy it. |
- 'destination': '<(PRODUCT_DIR)', |
- 'files': [ '<@(widevine_cdm_binary_files)' ], |
- }], |
}, |
{ |
'target_name': 'widevine_test_license_server', |