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