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..f987eabe81cede825ddbf4af6fa5e5b35a71e731 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. |
+ 'enable_widevine%': 0, |
ddorwin
2015/04/01 23:27:32
In common.gypi, this is after the nested block and
jrummell
2015/04/02 23:47:55
Done.
|
+ 'variables': { |
+ 'enable_widevine%': 0, |
+ }, |
'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', |
ddorwin
2015/04/01 23:27:32
Widevine-specific file should not be in common cod
jrummell
2015/04/02 23:47:55
See previous comment in widevine_cdm_version.h.
ddorwin
2015/04/03 18:30:56
Ignore this too. This is relative to widevine/cdm.
|
+ 'conditions': [ |
+ [ 'os_posix == 1 and OS != "mac"', { |
+ 'stub_cdm_binary_files%': [ |
+ '<(PRODUCT_DIR)/libstubcdm.so', |
+ ], |
+ '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', |
@@ -119,6 +159,11 @@ |
}], |
], |
}], |
+ [ 'branding != "Chrome" and enable_widevine==1 and enable_pepper_cdms==1', { |
+ 'dependencies': [ |
+ '<(DEPTH)/media/media.gyp:stubcdm', |
xhwang
2015/04/02 18:51:52
hmm, why not depend on widevine_cdm_binaries?
And
jrummell
2015/04/02 23:47:55
Removed, since the widevine_cdm_binaries depends o
|
+ ], |
+ }], |
], |
}, |
{ |
@@ -140,13 +185,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', { |
ddorwin
2015/04/01 23:27:32
remove the android check here too?
jrummell
2015/04/02 23:47:55
For Android there are no stub files, so this will
ddorwin
2015/04/03 02:06:56
Oh, do we evaluate these rules even if there is no
|
+ 'dependencies': [ |
+ '<(DEPTH)/media/media.gyp:stubcdm', |
+ ], |
+ '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', |