| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 { | |
| 6 'includes': [ | |
| 7 'cdm_paths.gypi', | |
| 8 'media_variables.gypi', | |
| 9 ], | |
| 10 'variables': { | |
| 11 # Set |use_fake_video_decoder| to 1 to ignore input frames in |clearkeycdm|, | |
| 12 # and produce video frames filled with a solid color instead. | |
| 13 'use_fake_video_decoder%': 0, | |
| 14 # Set |use_libvpx_in_clear_key_cdm| to 1 to use libvpx for VP8 decoding in | |
| 15 # |clearkeycdm|. | |
| 16 'use_libvpx_in_clear_key_cdm%': 0, | |
| 17 }, | |
| 18 'conditions': [ | |
| 19 ['enable_pepper_cdms==1', { | |
| 20 'includes': [ | |
| 21 '../build/util/version.gypi', | |
| 22 ], | |
| 23 'targets': [ | |
| 24 { | |
| 25 'target_name': 'clearkeycdm_binary', | |
| 26 'product_name': 'clearkeycdm', | |
| 27 'type': 'none', | |
| 28 # TODO(tomfinegan): Simplify this by unconditionally including all the | |
| 29 # decoders, and changing clearkeycdm to select which decoder to use | |
| 30 # based on environment variables. | |
| 31 'conditions': [ | |
| 32 ['use_fake_video_decoder == 1' , { | |
| 33 'defines': ['CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER'], | |
| 34 'sources': [ | |
| 35 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc', | |
| 36 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h', | |
| 37 ], | |
| 38 }], | |
| 39 ['media_use_ffmpeg == 1' , { | |
| 40 'defines': ['CLEAR_KEY_CDM_USE_FFMPEG_DECODER'], | |
| 41 'dependencies': [ | |
| 42 '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg', | |
| 43 ], | |
| 44 'sources': [ | |
| 45 'cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc', | |
| 46 'cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h', | |
| 47 ], | |
| 48 }], | |
| 49 ['media_use_ffmpeg == 1 and use_fake_video_decoder == 0' , { | |
| 50 'sources': [ | |
| 51 'cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc', | |
| 52 'cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h', | |
| 53 ], | |
| 54 }], | |
| 55 ['use_libvpx_in_clear_key_cdm == 1 and use_fake_video_decoder == 0'
, { | |
| 56 'defines': ['CLEAR_KEY_CDM_USE_LIBVPX_DECODER'], | |
| 57 'dependencies': [ | |
| 58 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx', | |
| 59 ], | |
| 60 'sources': [ | |
| 61 'cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.cc', | |
| 62 'cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h', | |
| 63 ], | |
| 64 }], | |
| 65 ['os_posix == 1 and OS != "mac"', { | |
| 66 'type': 'loadable_module', # Must be in PRODUCT_DIR for ASAN bot. | |
| 67 }], | |
| 68 ['OS == "mac" or OS == "win"', { | |
| 69 'type': 'shared_library', | |
| 70 }], | |
| 71 ['OS == "mac"', { | |
| 72 'xcode_settings': { | |
| 73 'DYLIB_INSTALL_NAME_BASE': '@rpath', | |
| 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)', | |
| 81 }] | |
| 82 ], | |
| 83 'defines': ['CDM_IMPLEMENTATION'], | |
| 84 'dependencies': [ | |
| 85 'media', | |
| 86 '../url/url.gyp:url_lib', | |
| 87 # Include the following for media::AudioBus. | |
| 88 'shared_memory_support', | |
| 89 '<(DEPTH)/base/base.gyp:base', | |
| 90 ], | |
| 91 'sources': [ | |
| 92 'cdm/ppapi/cdm_file_io_test.cc', | |
| 93 'cdm/ppapi/cdm_file_io_test.h', | |
| 94 'cdm/ppapi/external_clear_key/cdm_video_decoder.cc', | |
| 95 'cdm/ppapi/external_clear_key/cdm_video_decoder.h', | |
| 96 'cdm/ppapi/external_clear_key/clear_key_cdm.cc', | |
| 97 'cdm/ppapi/external_clear_key/clear_key_cdm.h', | |
| 98 'cdm/ppapi/external_clear_key/clear_key_cdm_common.h', | |
| 99 ], | |
| 100 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | |
| 101 'msvs_disabled_warnings': [ 4267, ], | |
| 102 }, | |
| 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 { | |
| 123 # GN version: //media/cdm/ppapi:clearkeycdmadapter_resources | |
| 124 'target_name': 'clearkeycdmadapter_resources', | |
| 125 'type': 'none', | |
| 126 'variables': { | |
| 127 'output_dir': '.', | |
| 128 'branding_path': '../chrome/app/theme/<(branding_path_component)/BRA
NDING', | |
| 129 'template_input_path': '../chrome/app/chrome_version.rc.version', | |
| 130 'extra_variable_files_arguments': | |
| 131 [ '-f', 'cdm/ppapi/external_clear_key/BRANDING' ], | |
| 132 'extra_variable_files': [ 'cdm/ppapi/external_clear_key/BRANDING' ], | |
| 133 }, | |
| 134 'sources': [ | |
| 135 'clearkeycdmadapter.ver', | |
| 136 ], | |
| 137 'includes': [ | |
| 138 '../chrome/version_resource_rules.gypi', | |
| 139 ], | |
| 140 }, | |
| 141 { | |
| 142 'target_name': 'clearkeycdmadapter_binary', | |
| 143 'product_name': 'clearkeycdmadapter', | |
| 144 'type': 'none', | |
| 145 # Check whether the plugin's origin URL is valid. | |
| 146 'defines': ['CHECK_DOCUMENT_URL'], | |
| 147 'dependencies': [ | |
| 148 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp', | |
| 149 'media_cdm_adapter.gyp:cdmadapter', | |
| 150 'clearkeycdm', | |
| 151 'clearkeycdmadapter_resources', | |
| 152 ], | |
| 153 'sources': [ | |
| 154 '<(SHARED_INTERMEDIATE_DIR)/clearkeycdmadapter_version.rc', | |
| 155 ], | |
| 156 'conditions': [ | |
| 157 ['os_posix == 1 and OS != "mac"', { | |
| 158 # Because clearkeycdm has type 'loadable_module' (see comments), | |
| 159 # we must explicitly specify this dependency. | |
| 160 'libraries': [ | |
| 161 '-lrt', | |
| 162 # Built by clearkeycdm. | |
| 163 '<(PRODUCT_DIR)/<(clearkey_cdm_path)/libclearkeycdm.so', | |
| 164 ], | |
| 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 }] | |
| 177 ], | |
| 178 }, | |
| 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 }], | |
| 198 }], | |
| 199 ], | |
| 200 } | |
| OLD | NEW |