| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'includes': [ | 6 'includes': [ |
| 7 'cdm_paths.gypi', |
| 7 'media_variables.gypi', | 8 'media_variables.gypi', |
| 8 ], | 9 ], |
| 9 'variables': { | 10 'variables': { |
| 10 # Set |use_fake_video_decoder| to 1 to ignore input frames in |clearkeycdm|, | 11 # Set |use_fake_video_decoder| to 1 to ignore input frames in |clearkeycdm|, |
| 11 # and produce video frames filled with a solid color instead. | 12 # and produce video frames filled with a solid color instead. |
| 12 'use_fake_video_decoder%': 0, | 13 'use_fake_video_decoder%': 0, |
| 13 # Set |use_libvpx_in_clear_key_cdm| to 1 to use libvpx for VP8 decoding in | 14 # Set |use_libvpx_in_clear_key_cdm| to 1 to use libvpx for VP8 decoding in |
| 14 # |clearkeycdm|. | 15 # |clearkeycdm|. |
| 15 'use_libvpx_in_clear_key_cdm%': 0, | 16 'use_libvpx_in_clear_key_cdm%': 0, |
| 16 }, | 17 }, |
| 17 'conditions': [ | 18 'conditions': [ |
| 18 ['enable_pepper_cdms==1', { | 19 ['enable_pepper_cdms==1', { |
| 19 'includes': [ | 20 'includes': [ |
| 20 '../build/util/version.gypi', | 21 '../build/util/version.gypi', |
| 21 ], | 22 ], |
| 22 'targets': [ | 23 'targets': [ |
| 23 { | 24 { |
| 24 # GN version: //media/cdm/ppapi:clearkeycdm | 25 'target_name': 'clearkeycdm_binary', |
| 25 'target_name': 'clearkeycdm', | 26 'product_name': 'clearkeycdm', |
| 26 'type': 'none', | 27 'type': 'none', |
| 27 # TODO(tomfinegan): Simplify this by unconditionally including all the | 28 # TODO(tomfinegan): Simplify this by unconditionally including all the |
| 28 # decoders, and changing clearkeycdm to select which decoder to use | 29 # decoders, and changing clearkeycdm to select which decoder to use |
| 29 # based on environment variables. | 30 # based on environment variables. |
| 30 'conditions': [ | 31 'conditions': [ |
| 31 ['use_fake_video_decoder == 1' , { | 32 ['use_fake_video_decoder == 1' , { |
| 32 'defines': ['CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER'], | 33 'defines': ['CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER'], |
| 33 'sources': [ | 34 'sources': [ |
| 34 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc', | 35 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc', |
| 35 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h', | 36 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h', |
| (...skipping 26 matching lines...) Expand all Loading... |
| 62 ], | 63 ], |
| 63 }], | 64 }], |
| 64 ['os_posix == 1 and OS != "mac"', { | 65 ['os_posix == 1 and OS != "mac"', { |
| 65 'type': 'loadable_module', # Must be in PRODUCT_DIR for ASAN bot. | 66 'type': 'loadable_module', # Must be in PRODUCT_DIR for ASAN bot. |
| 66 }], | 67 }], |
| 67 ['OS == "mac" or OS == "win"', { | 68 ['OS == "mac" or OS == "win"', { |
| 68 'type': 'shared_library', | 69 'type': 'shared_library', |
| 69 }], | 70 }], |
| 70 ['OS == "mac"', { | 71 ['OS == "mac"', { |
| 71 'xcode_settings': { | 72 'xcode_settings': { |
| 72 'DYLIB_INSTALL_NAME_BASE': '@loader_path', | 73 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
| 73 }, | 74 }, |
| 75 }, { |
| 76 # Put Clear Key CDM in the correct path directly except |
| 77 # for mac. On mac strip_save_dsym doesn't work with product_dir |
| 78 # so we rely on "clearkeycdm" target to copy it over. |
| 79 # See http://crbug.com/611990 |
| 80 'product_dir': '<(PRODUCT_DIR)/<(clearkey_cdm_path)', |
| 74 }] | 81 }] |
| 75 ], | 82 ], |
| 76 'defines': ['CDM_IMPLEMENTATION'], | 83 'defines': ['CDM_IMPLEMENTATION'], |
| 77 'dependencies': [ | 84 'dependencies': [ |
| 78 'media', | 85 'media', |
| 79 '../url/url.gyp:url_lib', | 86 '../url/url.gyp:url_lib', |
| 80 # Include the following for media::AudioBus. | 87 # Include the following for media::AudioBus. |
| 81 'shared_memory_support', | 88 'shared_memory_support', |
| 82 '<(DEPTH)/base/base.gyp:base', | 89 '<(DEPTH)/base/base.gyp:base', |
| 83 ], | 90 ], |
| 84 'sources': [ | 91 'sources': [ |
| 85 'cdm/ppapi/cdm_file_io_test.cc', | 92 'cdm/ppapi/cdm_file_io_test.cc', |
| 86 'cdm/ppapi/cdm_file_io_test.h', | 93 'cdm/ppapi/cdm_file_io_test.h', |
| 87 'cdm/ppapi/external_clear_key/cdm_video_decoder.cc', | 94 'cdm/ppapi/external_clear_key/cdm_video_decoder.cc', |
| 88 'cdm/ppapi/external_clear_key/cdm_video_decoder.h', | 95 'cdm/ppapi/external_clear_key/cdm_video_decoder.h', |
| 89 'cdm/ppapi/external_clear_key/clear_key_cdm.cc', | 96 'cdm/ppapi/external_clear_key/clear_key_cdm.cc', |
| 90 'cdm/ppapi/external_clear_key/clear_key_cdm.h', | 97 'cdm/ppapi/external_clear_key/clear_key_cdm.h', |
| 91 'cdm/ppapi/external_clear_key/clear_key_cdm_common.h', | 98 'cdm/ppapi/external_clear_key/clear_key_cdm_common.h', |
| 92 ], | 99 ], |
| 93 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 100 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 94 'msvs_disabled_warnings': [ 4267, ], | 101 'msvs_disabled_warnings': [ 4267, ], |
| 95 }, | 102 }, |
| 96 { | 103 { |
| 104 # GN version: //media/cdm/ppapi:clearkeycdm |
| 105 # On Mac this copies the clearkeycdm binary to <(clearkey_cdm_path). |
| 106 # On other platforms the binary is already in <(clearkey_cdm_path). |
| 107 # See "clearkeycdm_binary" above. |
| 108 'target_name': 'clearkeycdm', |
| 109 'type': 'none', |
| 110 'dependencies': [ |
| 111 'clearkeycdm_binary', |
| 112 ], |
| 113 'conditions': [ |
| 114 ['OS == "mac"', { |
| 115 'copies': [{ |
| 116 'destination': '<(PRODUCT_DIR)/<(clearkey_cdm_path)', |
| 117 'files': [ '<(PRODUCT_DIR)/libclearkeycdm.dylib' ], |
| 118 }], |
| 119 }], |
| 120 ], |
| 121 }, |
| 122 { |
| 97 # GN version: //media/cdm/ppapi:clearkeycdmadapter_resources | 123 # GN version: //media/cdm/ppapi:clearkeycdmadapter_resources |
| 98 'target_name': 'clearkeycdmadapter_resources', | 124 'target_name': 'clearkeycdmadapter_resources', |
| 99 'type': 'none', | 125 'type': 'none', |
| 100 'variables': { | 126 'variables': { |
| 101 'output_dir': '.', | 127 'output_dir': '.', |
| 102 'branding_path': '../chrome/app/theme/<(branding_path_component)/BRA
NDING', | 128 'branding_path': '../chrome/app/theme/<(branding_path_component)/BRA
NDING', |
| 103 'template_input_path': '../chrome/app/chrome_version.rc.version', | 129 'template_input_path': '../chrome/app/chrome_version.rc.version', |
| 104 'extra_variable_files_arguments': | 130 'extra_variable_files_arguments': |
| 105 [ '-f', 'cdm/ppapi/external_clear_key/BRANDING' ], | 131 [ '-f', 'cdm/ppapi/external_clear_key/BRANDING' ], |
| 106 'extra_variable_files': [ 'cdm/ppapi/external_clear_key/BRANDING' ], | 132 'extra_variable_files': [ 'cdm/ppapi/external_clear_key/BRANDING' ], |
| 107 }, | 133 }, |
| 108 'sources': [ | 134 'sources': [ |
| 109 'clearkeycdmadapter.ver', | 135 'clearkeycdmadapter.ver', |
| 110 ], | 136 ], |
| 111 'includes': [ | 137 'includes': [ |
| 112 '../chrome/version_resource_rules.gypi', | 138 '../chrome/version_resource_rules.gypi', |
| 113 ], | 139 ], |
| 114 }, | 140 }, |
| 115 { | 141 { |
| 116 # GN version: //media/cdm/ppapi:clearkeycdmadapter | 142 'target_name': 'clearkeycdmadapter_binary', |
| 117 'target_name': 'clearkeycdmadapter', | 143 'product_name': 'clearkeycdmadapter', |
| 118 'type': 'none', | 144 'type': 'none', |
| 119 # Check whether the plugin's origin URL is valid. | 145 # Check whether the plugin's origin URL is valid. |
| 120 'defines': ['CHECK_DOCUMENT_URL'], | 146 'defines': ['CHECK_DOCUMENT_URL'], |
| 121 'dependencies': [ | 147 'dependencies': [ |
| 122 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', | 148 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', |
| 123 'media_cdm_adapter.gyp:cdmadapter', | 149 'media_cdm_adapter.gyp:cdmadapter', |
| 124 'clearkeycdm', | 150 'clearkeycdm', |
| 125 'clearkeycdmadapter_resources', | 151 'clearkeycdmadapter_resources', |
| 126 ], | 152 ], |
| 127 'sources': [ | 153 'sources': [ |
| 128 '<(SHARED_INTERMEDIATE_DIR)/clearkeycdmadapter_version.rc', | 154 '<(SHARED_INTERMEDIATE_DIR)/clearkeycdmadapter_version.rc', |
| 129 ], | 155 ], |
| 130 'conditions': [ | 156 'conditions': [ |
| 131 ['os_posix == 1 and OS != "mac"', { | 157 ['os_posix == 1 and OS != "mac"', { |
| 132 # Because clearkeycdm has type 'loadable_module' (see comments), | 158 # Because clearkeycdm has type 'loadable_module' (see comments), |
| 133 # we must explicitly specify this dependency. | 159 # we must explicitly specify this dependency. |
| 134 'libraries': [ | 160 'libraries': [ |
| 135 '-lrt', | 161 '-lrt', |
| 136 # Built by clearkeycdm. | 162 # Built by clearkeycdm. |
| 137 '<(PRODUCT_DIR)/libclearkeycdm.so', | 163 '<(PRODUCT_DIR)/<(clearkey_cdm_path)/libclearkeycdm.so', |
| 138 ], | 164 ], |
| 139 }], | 165 }], |
| 166 ['OS == "mac"', { |
| 167 'xcode_settings': { |
| 168 'LD_RUNPATH_SEARCH_PATHS' : [ '@loader_path/.' ], |
| 169 }, |
| 170 }, { |
| 171 # Put Clear Key CDM adapter to the correct path directly except |
| 172 # for mac. On mac strip_save_dsym doesn't work with product_dir |
| 173 # so we rely on "clearkeycdmadapter" target to copy it over. |
| 174 # See http://crbug.com/611990 |
| 175 'product_dir': '<(PRODUCT_DIR)/<(clearkey_cdm_path)', |
| 176 }] |
| 140 ], | 177 ], |
| 141 }, | 178 }, |
| 142 ], | 179 { |
| 180 # GN version: //media/cdm/ppapi:clearkeycdmadapter |
| 181 # On Mac this copies the clearkeycdmadapter binary to |
| 182 # <(clearkey_cdm_path). On all other platforms the binary is already |
| 183 # in <(clearkey_cdm_path). See "clearkeycdmadapter_binary" above. |
| 184 'target_name': 'clearkeycdmadapter', |
| 185 'type': 'none', |
| 186 'dependencies': [ |
| 187 'clearkeycdmadapter_binary', |
| 188 ], |
| 189 'conditions': [ |
| 190 ['OS == "mac"', { |
| 191 'copies': [{ |
| 192 'destination': '<(PRODUCT_DIR)/<(clearkey_cdm_path)', |
| 193 'files': [ '<(PRODUCT_DIR)/clearkeycdmadapter.plugin' ], |
| 194 }], |
| 195 }], |
| 196 ], |
| 197 }], |
| 143 }], | 198 }], |
| 144 ], | 199 ], |
| 145 } | 200 } |
| OLD | NEW |