Implement disable-app-list-dismiss-on-blur for ChromeOS.
[chromium-blink-merge.git] / media / media_cdm.gypi
blob0c2510bfd3d72a6b0b2a1972a0210ac9846eb35d
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.
6   'variables': {
7     'conditions': [
8       ['OS == "android"', {
9         # Android doesn't use ffmpeg.
10         'use_ffmpeg%': 0,
11       }, {  # 'OS != "android"'
12         'use_ffmpeg%': 1,
13       }],
14     ],
15     # Set |use_fake_video_decoder| to 1 to ignore input frames in |clearkeycdm|,
16     # and produce video frames filled with a solid color instead.
17     'use_fake_video_decoder%': 0,
18     # Set |use_libvpx| to 1 to use libvpx for VP8 decoding in |clearkeycdm|.
19     'use_libvpx%': 0,
20   },
21   'conditions': [
22     ['enable_pepper_cdms==1', {
23         'includes': [
24           '../build/util/version.gypi',
25         ],
26         'targets': [
27         {
28           'target_name': 'clearkeycdm',
29           'type': 'none',
30           # TODO(tomfinegan): Simplify this by unconditionally including all the
31           # decoders, and changing clearkeycdm to select which decoder to use
32           # based on environment variables.
33           'conditions': [
34             ['use_fake_video_decoder == 1' , {
35               'defines': ['CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER'],
36               'sources': [
37                 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.cc',
38                 'cdm/ppapi/external_clear_key/fake_cdm_video_decoder.h',
39               ],
40             }],
41             ['use_ffmpeg == 1'  , {
42               'defines': ['CLEAR_KEY_CDM_USE_FFMPEG_DECODER'],
43               'dependencies': [
44                 '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
45               ],
46               'sources': [
47                 'cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc',
48                 'cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h',
49               ],
50             }],
51             ['use_ffmpeg == 1 and use_fake_video_decoder == 0'  , {
52               'sources': [
53                 'cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc',
54                 'cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h',
55               ],
56             }],
57             ['use_libvpx == 1 and use_fake_video_decoder == 0' , {
58               'defines': ['CLEAR_KEY_CDM_USE_LIBVPX_DECODER'],
59               'dependencies': [
60                 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
61               ],
62               'sources': [
63                 'cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.cc',
64                 'cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h',
65               ],
66             }],
67             ['os_posix == 1 and OS != "mac" and enable_pepper_cdms==1', {
68               'type': 'loadable_module',  # Must be in PRODUCT_DIR for ASAN bot.
69             }],
70             ['(OS == "mac" or OS == "win") and enable_pepper_cdms==1', {
71               'type': 'shared_library',
72             }],
73             ['OS == "mac"', {
74               'xcode_settings': {
75                 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
76               },
77             }]
78           ],
79           'defines': ['CDM_IMPLEMENTATION'],
80           'dependencies': [
81             'media',
82             '../url/url.gyp:url_lib',
83             # Include the following for media::AudioBus.
84             'shared_memory_support',
85             '<(DEPTH)/base/base.gyp:base',
86           ],
87           'sources': [
88             'cdm/ppapi/cdm_file_io_test.cc',
89             'cdm/ppapi/cdm_file_io_test.h',
90             'cdm/ppapi/external_clear_key/cdm_video_decoder.cc',
91             'cdm/ppapi/external_clear_key/cdm_video_decoder.h',
92             'cdm/ppapi/external_clear_key/clear_key_cdm.cc',
93             'cdm/ppapi/external_clear_key/clear_key_cdm.h',
94             'cdm/ppapi/external_clear_key/clear_key_cdm_common.h',
95           ],
96           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
97           'msvs_disabled_warnings': [ 4267, ],
98         },
99         {
100           'target_name': 'clearkeycdmadapter_resources',
101           'type': 'none',
102           'conditions': [
103             ['branding == "Chrome"', {
104               'variables': {
105                 'branding_path': '../chrome/app/theme/google_chrome/BRANDING',
106               },
107             }, { # else branding!="Chrome"
108               'variables': {
109                 'branding_path': '../chrome/app/theme/chromium/BRANDING',
110               },
111             }],
112           ],
113           'variables': {
114             'output_dir': '.',
115             'template_input_path': '../chrome/app/chrome_version.rc.version',
116             'extra_variable_files_arguments':
117               [ '-f', 'cdm/ppapi/external_clear_key/BRANDING' ],
118             'extra_variable_files': [ 'cdm/ppapi/external_clear_key/BRANDING' ],
119           },
120           'sources': [
121             'clearkeycdmadapter.ver',
122           ],
123           'includes': [
124             '../chrome/version_resource_rules.gypi',
125           ],
126         },
127         {
128           'target_name': 'clearkeycdmadapter',
129           'type': 'none',
130           # Check whether the plugin's origin URL is valid.
131           'defines': ['CHECK_DOCUMENT_URL'],
132           'dependencies': [
133             '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
134             'media_cdm_adapter.gyp:cdmadapter',
135             'clearkeycdm',
136             'clearkeycdmadapter_resources',
137           ],
138           'sources': [
139             '<(SHARED_INTERMEDIATE_DIR)/clearkeycdmadapter_version.rc',
140           ],
141           'conditions': [
142             ['os_posix == 1 and OS != "mac" and enable_pepper_cdms==1', {
143               # Because clearkeycdm has type 'loadable_module' (see comments),
144               # we must explicitly specify this dependency.
145               'libraries': [
146                 # Built by clearkeycdm.
147                 '<(PRODUCT_DIR)/libclearkeycdm.so',
148               ],
149             }],
150           ],
151         },
152       ],
153     }],
154   ],