OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 import("//build/config/features.gni") | 8 import("//build/config/features.gni") |
9 import("//build/config/linux/pkg_config.gni") | 9 import("//build/config/linux/pkg_config.gni") |
10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 defines += [ "DISABLE_FFMPEG_VIDEO_DECODERS" ] | 84 defines += [ "DISABLE_FFMPEG_VIDEO_DECODERS" ] |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 source_set("cdm_api") { | 88 source_set("cdm_api") { |
89 sources = [ | 89 sources = [ |
90 "cdm/api/content_decryption_module.h", | 90 "cdm/api/content_decryption_module.h", |
91 ] | 91 ] |
92 } | 92 } |
93 | 93 |
94 # TODO(jrummell): This should be in media/filters/BUILD.gn (which doesn't | |
95 # currently exist). http://crbug.com/613033 | |
96 source_set("filters_common") { | |
97 sources = [ | |
98 "filters/file_data_source.h", | |
99 ] | |
100 if (media_use_ffmpeg) { | |
101 sources += [ | |
102 "filters/blocking_url_protocol.h", | |
103 "filters/ffmpeg_glue.h", | |
104 ] | |
105 } | |
106 } | |
107 | |
108 # TODO(jrummell): Each subdirectory should have it's own BUILD.gn, and then | 94 # TODO(jrummell): Each subdirectory should have it's own BUILD.gn, and then |
109 # this component can depend on them. http://crbug.com/613033 | 95 # this component can depend on them. http://crbug.com/613033 |
110 component("media") { | 96 component("media") { |
111 sources = [ | 97 sources = [ |
112 "cdm/aes_decryptor.cc", | |
113 "cdm/aes_decryptor.h", | |
114 "cdm/cdm_adapter.cc", | |
115 "cdm/cdm_adapter.h", | |
116 "cdm/cdm_allocator.cc", | |
117 "cdm/cdm_allocator.h", | |
118 "cdm/cdm_file_io.cc", | |
119 "cdm/cdm_file_io.h", | |
120 "cdm/cdm_helpers.cc", | |
121 "cdm/cdm_helpers.h", | |
122 "cdm/cdm_wrapper.h", | |
123 "cdm/default_cdm_factory.cc", | |
124 "cdm/default_cdm_factory.h", | |
125 "cdm/json_web_key.cc", | |
126 "cdm/json_web_key.h", | |
127 "cdm/player_tracker_impl.cc", | |
128 "cdm/player_tracker_impl.h", | |
129 "cdm/supported_cdm_versions.cc", | |
130 "cdm/supported_cdm_versions.h", | |
131 "device_monitors/device_monitor_mac.h", | 98 "device_monitors/device_monitor_mac.h", |
132 "device_monitors/device_monitor_mac.mm", | 99 "device_monitors/device_monitor_mac.mm", |
133 "device_monitors/system_message_window_win.cc", | 100 "device_monitors/system_message_window_win.cc", |
134 "device_monitors/system_message_window_win.h", | 101 "device_monitors/system_message_window_win.h", |
135 "filters/audio_clock.cc", | |
136 "filters/audio_clock.h", | |
137 "filters/audio_renderer_algorithm.cc", | |
138 "filters/audio_renderer_algorithm.h", | |
139 "filters/audio_timestamp_validator.cc", | |
140 "filters/audio_timestamp_validator.h", | |
141 "filters/chunk_demuxer.cc", | |
142 "filters/chunk_demuxer.h", | |
143 "filters/context_3d.h", | |
144 "filters/decoder_selector.cc", | |
145 "filters/decoder_selector.h", | |
146 "filters/decoder_stream.cc", | |
147 "filters/decoder_stream.h", | |
148 "filters/decoder_stream_traits.cc", | |
149 "filters/decoder_stream_traits.h", | |
150 "filters/decrypting_audio_decoder.cc", | |
151 "filters/decrypting_audio_decoder.h", | |
152 "filters/decrypting_demuxer_stream.cc", | |
153 "filters/decrypting_demuxer_stream.h", | |
154 "filters/decrypting_video_decoder.cc", | |
155 "filters/decrypting_video_decoder.h", | |
156 "filters/file_data_source.cc", | |
157 "filters/frame_processor.cc", | |
158 "filters/frame_processor.h", | |
159 "filters/gpu_video_decoder.cc", | |
160 "filters/gpu_video_decoder.h", | |
161 "filters/h264_bit_reader.cc", | |
162 "filters/h264_bit_reader.h", | |
163 "filters/h264_parser.cc", | |
164 "filters/h264_parser.h", | |
165 "filters/ivf_parser.cc", | |
166 "filters/ivf_parser.h", | |
167 "filters/jpeg_parser.cc", | |
168 "filters/jpeg_parser.h", | |
169 "filters/memory_data_source.cc", | |
170 "filters/memory_data_source.h", | |
171 "filters/opus_constants.cc", | |
172 "filters/opus_constants.h", | |
173 "filters/pipeline_controller.cc", | |
174 "filters/pipeline_controller.h", | |
175 "filters/source_buffer_range.cc", | |
176 "filters/source_buffer_range.h", | |
177 "filters/source_buffer_state.cc", | |
178 "filters/source_buffer_state.h", | |
179 "filters/source_buffer_stream.cc", | |
180 "filters/source_buffer_stream.h", | |
181 "filters/stream_parser_factory.cc", | |
182 "filters/stream_parser_factory.h", | |
183 "filters/video_cadence_estimator.cc", | |
184 "filters/video_cadence_estimator.h", | |
185 "filters/video_renderer_algorithm.cc", | |
186 "filters/video_renderer_algorithm.h", | |
187 "filters/vp8_bool_decoder.cc", | |
188 "filters/vp8_bool_decoder.h", | |
189 "filters/vp8_parser.cc", | |
190 "filters/vp8_parser.h", | |
191 "filters/vp9_bool_decoder.cc", | |
192 "filters/vp9_bool_decoder.h", | |
193 "filters/vp9_compressed_header_parser.cc", | |
194 "filters/vp9_compressed_header_parser.h", | |
195 "filters/vp9_parser.cc", | |
196 "filters/vp9_parser.h", | |
197 "filters/vp9_raw_bits_reader.cc", | |
198 "filters/vp9_raw_bits_reader.h", | |
199 "filters/vp9_uncompressed_header_parser.cc", | |
200 "filters/vp9_uncompressed_header_parser.h", | |
201 "filters/webvtt_util.h", | |
202 "filters/wsola_internals.cc", | |
203 "filters/wsola_internals.h", | |
204 "muxers/webm_muxer.cc", | |
205 "muxers/webm_muxer.h", | |
206 "renderers/audio_renderer_impl.cc", | 102 "renderers/audio_renderer_impl.cc", |
207 "renderers/audio_renderer_impl.h", | 103 "renderers/audio_renderer_impl.h", |
208 "renderers/default_renderer_factory.cc", | 104 "renderers/default_renderer_factory.cc", |
209 "renderers/default_renderer_factory.h", | 105 "renderers/default_renderer_factory.h", |
210 "renderers/gpu_video_accelerator_factories.h", | 106 "renderers/gpu_video_accelerator_factories.h", |
211 "renderers/renderer_impl.cc", | 107 "renderers/renderer_impl.cc", |
212 "renderers/renderer_impl.h", | 108 "renderers/renderer_impl.h", |
213 "renderers/skcanvas_video_renderer.cc", | 109 "renderers/skcanvas_video_renderer.cc", |
214 "renderers/skcanvas_video_renderer.h", | 110 "renderers/skcanvas_video_renderer.h", |
215 "renderers/video_overlay_factory.cc", | 111 "renderers/video_overlay_factory.cc", |
216 "renderers/video_overlay_factory.h", | 112 "renderers/video_overlay_factory.h", |
217 "renderers/video_renderer_impl.cc", | 113 "renderers/video_renderer_impl.cc", |
218 "renderers/video_renderer_impl.h", | 114 "renderers/video_renderer_impl.h", |
219 "video/fake_video_encode_accelerator.cc", | |
220 "video/fake_video_encode_accelerator.h", | |
221 "video/gpu_memory_buffer_video_frame_pool.cc", | |
222 "video/gpu_memory_buffer_video_frame_pool.h", | |
223 "video/h264_poc.cc", | |
224 "video/h264_poc.h", | |
225 "video/half_float_maker.cc", | |
226 "video/half_float_maker.h", | |
227 "video/jpeg_decode_accelerator.cc", | |
228 "video/jpeg_decode_accelerator.h", | |
229 "video/picture.cc", | |
230 "video/picture.h", | |
231 "video/video_decode_accelerator.cc", | |
232 "video/video_decode_accelerator.h", | |
233 "video/video_encode_accelerator.cc", | |
234 "video/video_encode_accelerator.h", | |
235 ] | 115 ] |
236 | 116 |
237 configs += [ | 117 configs += [ |
238 ":media_config", | 118 ":media_config", |
239 ":media_implementation", | 119 ":media_implementation", |
240 "//build/config:precompiled_headers", | 120 "//build/config:precompiled_headers", |
241 | 121 |
242 # TODO(wolenetz): Fix size_t to int trunctaion in win64. | 122 # TODO(wolenetz): Fix size_t to int trunctaion in win64. |
243 # See http://crbug.com/171009 | 123 # See http://crbug.com/171009 |
244 "//build/config/compiler:no_size_t_to_int_warning", | 124 "//build/config/compiler:no_size_t_to_int_warning", |
245 ] | 125 ] |
246 all_dependent_configs = [ ":media_dependent_config" ] | 126 all_dependent_configs = [ ":media_dependent_config" ] |
247 | 127 |
248 allow_circular_includes_from = [] | 128 allow_circular_includes_from = [] |
249 cflags = [] | 129 cflags = [] |
250 libs = [] | 130 libs = [] |
251 defines = [] | 131 defines = [] |
252 deps = [ | 132 deps = [ |
253 ":cdm_api", | 133 ":cdm_api", |
254 "//base", | 134 "//base", |
255 "//base:i18n", | 135 "//base:i18n", |
256 "//base/third_party/dynamic_annotations", | 136 "//base/third_party/dynamic_annotations", |
257 "//cc/paint", | 137 "//cc/paint", |
258 "//crypto", | |
259 "//crypto:platform", | 138 "//crypto:platform", |
260 "//gpu/command_buffer/client:gles2_interface", | 139 "//gpu/command_buffer/client:gles2_interface", |
261 "//gpu/command_buffer/common", | 140 "//gpu/command_buffer/common", |
262 "//skia", | |
263 "//third_party/libwebm", | |
264 "//third_party/libyuv", | 141 "//third_party/libyuv", |
265 "//ui/events:events_base", | 142 "//ui/events:events_base", |
266 "//ui/gfx", | 143 "//ui/gfx", |
267 "//ui/gfx/geometry", | 144 "//ui/gfx/geometry", |
268 "//ui/gl:gl", | 145 "//ui/gl:gl", |
269 "//url", | 146 "//url", |
270 ] | 147 ] |
271 | 148 |
272 public_configs = [ "//third_party/libwebm:libwebm_config" ] | 149 public_configs = [ "//third_party/libwebm:libwebm_config" ] |
273 public_deps = [ | 150 public_deps = [ |
274 ":filters_common", | |
275 ":media_features", | 151 ":media_features", |
276 ":shared_memory_support", | 152 ":shared_memory_support", |
277 "//media/audio", | 153 "//media/filters", |
278 "//media/formats", | 154 "//media/formats", |
279 "//ui/gfx:color_space", | 155 "//ui/gfx:color_space", |
280 ] | 156 ] |
281 | 157 |
282 include_dirs = [ "." ] | 158 include_dirs = [ "." ] |
283 if (media_use_ffmpeg) { | |
284 public_deps += [ "//media/ffmpeg" ] | |
285 deps += [ | |
286 "//third_party/ffmpeg", | |
287 "//third_party/ffmpeg:ffmpeg_features", | |
288 "//third_party/opus", | |
289 ] | |
290 sources += [ | |
291 "filters/audio_file_reader.cc", | |
292 "filters/audio_file_reader.h", | |
293 "filters/blocking_url_protocol.cc", | |
294 "filters/ffmpeg_audio_decoder.cc", | |
295 "filters/ffmpeg_audio_decoder.h", | |
296 "filters/ffmpeg_bitstream_converter.h", | |
297 "filters/ffmpeg_demuxer.cc", | |
298 "filters/ffmpeg_demuxer.h", | |
299 "filters/ffmpeg_glue.cc", | |
300 "filters/in_memory_url_protocol.cc", | |
301 "filters/in_memory_url_protocol.h", | |
302 ] | |
303 if (!disable_ffmpeg_video_decoders) { | |
304 sources += [ | |
305 "filters/ffmpeg_video_decoder.cc", | |
306 "filters/ffmpeg_video_decoder.h", | |
307 ] | |
308 } | |
309 if (proprietary_codecs) { | |
310 sources += [ | |
311 "filters/ffmpeg_aac_bitstream_converter.cc", | |
312 "filters/ffmpeg_aac_bitstream_converter.h", | |
313 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc", | |
314 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.h", | |
315 ] | |
316 } | |
317 } | |
318 | |
319 if (proprietary_codecs && enable_hevc_demuxing) { | |
320 sources += [ | |
321 "filters/h265_parser.cc", | |
322 "filters/h265_parser.h", | |
323 ] | |
324 if (media_use_ffmpeg) { | |
325 sources += [ | |
326 "filters/ffmpeg_h265_to_annex_b_bitstream_converter.cc", | |
327 "filters/ffmpeg_h265_to_annex_b_bitstream_converter.h", | |
328 ] | |
329 } | |
330 } | |
331 | 159 |
332 if (current_cpu == "arm" && arm_use_neon) { | 160 if (current_cpu == "arm" && arm_use_neon) { |
333 defines += [ "USE_NEON" ] | 161 defines += [ "USE_NEON" ] |
334 } | 162 } |
335 | 163 |
336 if (media_use_libvpx) { | |
337 sources += [ | |
338 "filters/vpx_video_decoder.cc", | |
339 "filters/vpx_video_decoder.h", | |
340 ] | |
341 deps += [ "//third_party/libvpx" ] | |
342 } | |
343 | |
344 if (is_android) { | |
345 sources -= [ | |
346 "filters/decrypting_audio_decoder.cc", | |
347 "filters/decrypting_audio_decoder.h", | |
348 "filters/decrypting_video_decoder.cc", | |
349 "filters/decrypting_video_decoder.h", | |
350 ] | |
351 sources += [ | |
352 "filters/android/media_codec_audio_decoder.cc", | |
353 "filters/android/media_codec_audio_decoder.h", | |
354 ] | |
355 } | |
356 | |
357 if (current_cpu != "arm" && is_chromeos) { | |
358 sources += [ | |
359 "filters/h264_bitstream_buffer.cc", | |
360 "filters/h264_bitstream_buffer.h", | |
361 ] | |
362 } | |
363 | |
364 if (is_mac) { | 164 if (is_mac) { |
365 public_deps += [ "//media/base/mac" ] | 165 public_deps += [ "//media/base/mac" ] |
366 libs += [ | 166 libs += [ |
367 "CoreFoundation.framework", | 167 "CoreFoundation.framework", |
368 "CoreGraphics.framework", | 168 "CoreGraphics.framework", |
369 "Foundation.framework", | 169 "Foundation.framework", |
370 ] | 170 ] |
371 } | 171 } |
372 | 172 |
373 if (is_ios) { | 173 if (is_ios) { |
374 deps += [ "//media/base/mac" ] | 174 deps += [ "//media/base/mac" ] |
375 } | 175 } |
376 | 176 |
377 if (is_win) { | 177 if (is_win) { |
378 deps += [ "//media/base/win" ] | 178 deps += [ "//media/base/win" ] |
379 } | 179 } |
380 | 180 |
381 if (proprietary_codecs) { | |
382 sources += [ | |
383 "cdm/cenc_utils.cc", | |
384 "cdm/cenc_utils.h", | |
385 "filters/h264_to_annex_b_bitstream_converter.cc", | |
386 "filters/h264_to_annex_b_bitstream_converter.h", | |
387 ] | |
388 } | |
389 | |
390 if (use_low_memory_buffer) { | |
391 sources += [ | |
392 "filters/source_buffer_platform.h", | |
393 "filters/source_buffer_platform_lowmem.cc", | |
394 ] | |
395 } else { | |
396 sources += [ | |
397 "filters/source_buffer_platform.cc", | |
398 "filters/source_buffer_platform.h", | |
399 ] | |
400 } | |
401 | |
402 if (use_udev) { | 181 if (use_udev) { |
403 deps += [ "//device/udev_linux" ] | 182 deps += [ "//device/udev_linux" ] |
404 sources += [ | 183 sources += [ |
405 "device_monitors/device_monitor_udev.cc", | 184 "device_monitors/device_monitor_udev.cc", |
406 "device_monitors/device_monitor_udev.h", | 185 "device_monitors/device_monitor_udev.h", |
407 ] | 186 ] |
408 } | 187 } |
409 | 188 |
410 # TODO(xhwang): Move other library CDM related files to this block as well. | 189 # TODO(xhwang): Move other library CDM related files to this block as well. |
411 if (enable_pepper_cdms) { | 190 if (enable_pepper_cdms) { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 fuzzer_test("media_mp4_avcc_parser_fuzzer") { | 644 fuzzer_test("media_mp4_avcc_parser_fuzzer") { |
866 sources = [ | 645 sources = [ |
867 "formats/mp4/mp4_avcc_parser_fuzzer.cc", | 646 "formats/mp4/mp4_avcc_parser_fuzzer.cc", |
868 ] | 647 ] |
869 deps = [ | 648 deps = [ |
870 ":media", | 649 ":media", |
871 "//base", | 650 "//base", |
872 ] | 651 ] |
873 } | 652 } |
874 } | 653 } |
OLD | NEW |