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

Unified Diff: third_party/widevine/cdm/widevine_cdm.gyp

Issue 1043673002: Allow widevinecdmadapter to be built in Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build stub as widevinecdm Created 5 years, 9 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: 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..7bc75b24d4c5a65e63b2a3ef058ff137d6ad8484 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,13 @@
'widevine_cdm_version_h_file%':
'android/widevine_cdm_version.h',
}],
+ [ 'branding != "Chrome" and OS != "android" and enable_widevine == 1', {
+ # If enable_widevine==1 then create a dummy widevinecdm. On Win/Mac
+ # the component updater will get the latest version and use it.
+ # Other systems are not currently supported.
+ 'widevine_cdm_version_h_file%':
+ 'stub/widevine_cdm_version.h',
+ }],
],
},
'includes': [
@@ -86,12 +98,12 @@
'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',
'widevine_cdm_version_h',
- 'widevine_cdm_binaries',
+ 'widevinecdm',
'widevinecdmadapter_resources',
],
'sources': [
@@ -101,19 +113,19 @@
[ 'os_posix == 1 and OS != "mac"', {
'libraries': [
'-lrt',
- # Copied by widevine_cdm_binaries.
+ # Copied/created by widevinecdm.
'<(PRODUCT_DIR)/libwidevinecdm.so',
],
}],
[ 'OS == "win"', {
'libraries': [
- # Copied by widevine_cdm_binaries.
+ # Copied/created by widevinecdm.
'<(PRODUCT_DIR)/widevinecdm.dll.lib',
],
}],
[ 'OS == "mac"', {
'libraries': [
- # Copied by widevine_cdm_binaries.
+ # Copied/created by widevinecdm.
'<(PRODUCT_DIR)/libwidevinecdm.dylib',
],
}],
@@ -132,21 +144,48 @@
},
{
# GN version: //third_party/widevine/cdm:binaries
- 'target_name': 'widevine_cdm_binaries',
+ 'target_name': 'widevinecdm',
'type': 'none',
'conditions': [
- [ 'OS=="mac"', {
- 'xcode_settings': {
- 'COPY_PHASE_STRIP': 'NO',
- }
+ [ 'branding == "Chrome"', {
+ 'conditions': [
+ [ 'OS=="mac"', {
+ 'xcode_settings': {
+ 'COPY_PHASE_STRIP': 'NO',
+ }
+ }],
+ ],
+ '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 enable_widevine == 1', {
+ 'conditions': [
+ ['os_posix == 1 and OS != "mac"', {
+ 'type': 'loadable_module',
ddorwin 2015/04/03 23:43:39 I wonder if this is actually necessary in this cas
jrummell 2015/04/03 23:58:43 Done.
+ }],
+ ['OS == "mac" or OS == "win"', {
+ 'type': 'shared_library',
+ }],
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
+ },
+ }],
+ ],
+ 'defines': ['CDM_IMPLEMENTATION'],
+ 'dependencies': [
+ '<(DEPTH)/base/base.gyp:base',
+ ],
+ 'sources': [
+ '<(DEPTH)/media/cdm/stub/stub_cdm.cc',
+ '<(DEPTH)/media/cdm/stub/stub_cdm.h',
+ ],
}],
],
- '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',
« media/cdm/stub/stub_cdm.cc ('K') | « third_party/widevine/cdm/stub/widevine_cdm_version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698