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/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/arm.gni") | 6 import("//build/config/arm.gni") |
7 import("//build/config/features.gni") | 7 import("//build/config/features.gni") |
8 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
9 import("//build/config/linux/pkg_config.gni") | 9 import("//build/config/linux/pkg_config.gni") |
10 import("//media/media_options.gni") | 10 import("//media/media_options.gni") |
11 | 11 |
12 source_set("base") { | 12 source_set("base") { |
13 visibility = [ "//media/*" ] | 13 # This is part of the media component. |
| 14 visibility = [ "//media" ] |
14 sources = [ | 15 sources = [ |
15 "audio_block_fifo.cc", | 16 "audio_block_fifo.cc", |
16 "audio_block_fifo.h", | 17 "audio_block_fifo.h", |
17 "audio_buffer.cc", | 18 "audio_buffer.cc", |
18 "audio_buffer.h", | 19 "audio_buffer.h", |
19 "audio_buffer_converter.cc", | 20 "audio_buffer_converter.cc", |
20 "audio_buffer_converter.h", | 21 "audio_buffer_converter.h", |
21 "audio_buffer_queue.cc", | 22 "audio_buffer_queue.cc", |
22 "audio_buffer_queue.h", | 23 "audio_buffer_queue.h", |
23 "audio_capturer_source.h", | 24 "audio_capturer_source.h", |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 "video_renderer.cc", | 181 "video_renderer.cc", |
181 "video_renderer.h", | 182 "video_renderer.h", |
182 "video_rotation.h", | 183 "video_rotation.h", |
183 "video_util.cc", | 184 "video_util.cc", |
184 "video_util.h", | 185 "video_util.h", |
185 "wall_clock_time_source.cc", | 186 "wall_clock_time_source.cc", |
186 "wall_clock_time_source.h", | 187 "wall_clock_time_source.h", |
187 "yuv_convert.cc", | 188 "yuv_convert.cc", |
188 "yuv_convert.h", | 189 "yuv_convert.h", |
189 ] | 190 ] |
| 191 |
| 192 allow_circular_includes_from = [] |
190 defines = [] | 193 defines = [] |
| 194 public_deps = [] |
191 deps = [ | 195 deps = [ |
| 196 "//ui/events:events_base", |
192 "//skia", | 197 "//skia", |
193 ] | 198 ] |
194 libs = [] | 199 libs = [] |
195 configs += [ "//media:media_config" ] | 200 configs += [ |
| 201 "//media:media_config", |
| 202 "//media:media_implementation", |
| 203 ] |
196 | 204 |
197 if (media_use_ffmpeg) { | 205 if (media_use_ffmpeg) { |
198 sources += [ | 206 sources += [ |
199 "audio_video_metadata_extractor.cc", | 207 "audio_video_metadata_extractor.cc", |
200 "audio_video_metadata_extractor.h", | 208 "audio_video_metadata_extractor.h", |
201 "container_names.cc", | 209 "container_names.cc", |
202 "container_names.h", | 210 "container_names.h", |
203 "media_file_checker.cc", | 211 "media_file_checker.cc", |
204 "media_file_checker.h", | 212 "media_file_checker.h", |
205 ] | 213 ] |
| 214 if (is_win) { |
| 215 sources += [ "media_win.cc" ] |
| 216 } else if (is_posix) { |
| 217 sources += [ "media_posix.cc" ] |
| 218 } |
| 219 |
206 deps += [ "//third_party/ffmpeg" ] | 220 deps += [ "//third_party/ffmpeg" ] |
207 } | 221 } |
208 | 222 |
209 if (enable_browser_cdms) { | 223 if (enable_browser_cdms) { |
210 sources += [ | 224 sources += [ |
211 "browser_cdm.cc", | 225 "browser_cdm.cc", |
212 "browser_cdm.h", | 226 "browser_cdm.h", |
213 "browser_cdm_factory.cc", | 227 "browser_cdm_factory.cc", |
214 "browser_cdm_factory.h", | 228 "browser_cdm_factory.h", |
215 ] | 229 ] |
216 } | 230 } |
217 | 231 |
218 if (is_android) { | 232 if (is_android) { |
219 sources += [ "media_stub.cc" ] | 233 sources += [ "media_stub.cc" ] |
220 } else if (is_win) { | 234 public_deps = [ |
221 sources += [ "media_win.cc" ] | 235 "//media/base/android", |
222 } else if (is_posix) { | 236 "//media/base/android:media_java", |
223 sources += [ "media_posix.cc" ] | 237 "//media/base/android:media_jni_headers", |
| 238 "//media/base/android:video_capture_jni_headers", |
| 239 ] |
| 240 allow_circular_includes_from += [ "//media/base/android" ] |
224 } | 241 } |
225 | 242 |
226 if (is_linux && use_x11) { | 243 if (is_linux && use_x11) { |
227 configs += [ | 244 configs += [ |
228 "//build/config/linux:x11", | 245 "//build/config/linux:x11", |
229 "//build/config/linux:xext", | 246 "//build/config/linux:xext", |
230 | 247 |
231 # TODO(ajwong): Why does xent get a separate thing in //build/config/linux
:BUILD.gn | 248 # TODO(ajwong): Why does xent get a separate thing in //build/config/linux
:BUILD.gn |
232 # "//build/config/linux:xdamage", | 249 # "//build/config/linux:xdamage", |
233 # "//build/config/linux:xfixes", | 250 # "//build/config/linux:xfixes", |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 "keyboard_event_counter.h", | 282 "keyboard_event_counter.h", |
266 ] | 283 ] |
267 } | 284 } |
268 } | 285 } |
269 | 286 |
270 # Minimal media component for media/cast on iOS. | 287 # Minimal media component for media/cast on iOS. |
271 config("base_for_cast_ios_dependent_config") { | 288 config("base_for_cast_ios_dependent_config") { |
272 defines = [ "MEDIA_FOR_CAST_IOS" ] | 289 defines = [ "MEDIA_FOR_CAST_IOS" ] |
273 } | 290 } |
274 | 291 |
275 source_set("base_for_cast_ios") { | 292 if (is_ios) { |
276 sources = [ | 293 source_set("base_for_cast_ios") { |
277 "simd/convert_rgb_to_yuv.h", | 294 sources = [ |
278 "simd/convert_rgb_to_yuv_c.cc", | 295 "simd/convert_rgb_to_yuv.h", |
279 "simd/convert_yuv_to_rgb.h", | 296 "simd/convert_rgb_to_yuv_c.cc", |
280 "simd/convert_yuv_to_rgb_c.cc", | 297 "simd/convert_yuv_to_rgb.h", |
281 "simd/filter_yuv.h", | 298 "simd/convert_yuv_to_rgb_c.cc", |
282 "simd/filter_yuv_c.cc", | 299 "simd/filter_yuv.h", |
283 "video_frame.cc", | 300 "simd/filter_yuv_c.cc", |
284 "video_frame.h", | 301 "video_frame.cc", |
285 "video_frame_metadata.cc", | 302 "video_frame.h", |
286 "video_frame_metadata.h", | 303 "video_frame_metadata.cc", |
287 "video_util.cc", | 304 "video_frame_metadata.h", |
288 "video_util.h", | 305 "video_util.cc", |
289 "yuv_convert.cc", | 306 "video_util.h", |
290 "yuv_convert.h", | 307 "yuv_convert.cc", |
291 ] | 308 "yuv_convert.h", |
292 configs += [ | 309 ] |
293 "//build/config/compiler:no_size_t_to_int_warning", | 310 configs += [ |
294 "//media:media_config", | 311 "//build/config/compiler:no_size_t_to_int_warning", |
295 ] | 312 "//media:media_config", |
296 all_dependent_configs = [ ":base_for_cast_ios_dependent_config" ] | 313 ] |
| 314 all_dependent_configs = [ ":base_for_cast_ios_dependent_config" ] |
| 315 } |
297 } | 316 } |
298 | 317 |
299 source_set("test_support") { | 318 source_set("test_support") { |
300 testonly = true | 319 testonly = true |
301 sources = [ | 320 sources = [ |
302 "fake_audio_render_callback.cc", | 321 "fake_audio_render_callback.cc", |
303 "fake_audio_render_callback.h", | 322 "fake_audio_render_callback.h", |
304 "fake_audio_renderer_sink.cc", | 323 "fake_audio_renderer_sink.cc", |
305 "fake_audio_renderer_sink.h", | 324 "fake_audio_renderer_sink.h", |
306 "fake_text_track_stream.cc", | 325 "fake_text_track_stream.cc", |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 "video_frame_unittest.cc", | 390 "video_frame_unittest.cc", |
372 "video_util_unittest.cc", | 391 "video_util_unittest.cc", |
373 "wall_clock_time_source_unittest.cc", | 392 "wall_clock_time_source_unittest.cc", |
374 "yuv_convert_unittest.cc", | 393 "yuv_convert_unittest.cc", |
375 ] | 394 ] |
376 configs += [ | 395 configs += [ |
377 "//build/config/compiler:no_size_t_to_int_warning", | 396 "//build/config/compiler:no_size_t_to_int_warning", |
378 "//media:media_config", | 397 "//media:media_config", |
379 ] | 398 ] |
380 deps = [ | 399 deps = [ |
381 ":base", | |
382 ":test_support", | 400 ":test_support", |
383 "//gpu/command_buffer/common", | 401 "//gpu/command_buffer/common", |
| 402 "//media", |
384 "//skia", | 403 "//skia", |
385 "//testing/gmock", | 404 "//testing/gmock", |
386 "//testing/gtest", | 405 "//testing/gtest", |
387 ] | 406 ] |
388 | 407 |
389 if (media_use_ffmpeg) { | 408 if (media_use_ffmpeg) { |
390 sources += [ | 409 sources += [ |
391 "audio_video_metadata_extractor_unittest.cc", | 410 "audio_video_metadata_extractor_unittest.cc", |
392 "media_file_checker_unittest.cc", | 411 "media_file_checker_unittest.cc", |
393 ] | 412 ] |
(...skipping 15 matching lines...) Expand all Loading... |
409 sources = [ | 428 sources = [ |
410 "audio_bus_perftest.cc", | 429 "audio_bus_perftest.cc", |
411 "audio_converter_perftest.cc", | 430 "audio_converter_perftest.cc", |
412 "run_all_perftests.cc", | 431 "run_all_perftests.cc", |
413 "sinc_resampler_perftest.cc", | 432 "sinc_resampler_perftest.cc", |
414 "vector_math_perftest.cc", | 433 "vector_math_perftest.cc", |
415 "yuv_convert_perftest.cc", | 434 "yuv_convert_perftest.cc", |
416 ] | 435 ] |
417 configs += [ "//media:media_config" ] | 436 configs += [ "//media:media_config" ] |
418 deps = [ | 437 deps = [ |
419 ":base", | |
420 ":test_support", | 438 ":test_support", |
| 439 "//media", |
421 "//testing/gmock", | 440 "//testing/gmock", |
422 "//testing/gtest", | 441 "//testing/gtest", |
423 ] | 442 ] |
424 | 443 |
425 if (media_use_ffmpeg) { | 444 if (media_use_ffmpeg) { |
426 sources += [ "demuxer_perftest.cc" ] | 445 sources += [ "demuxer_perftest.cc" ] |
427 } | 446 } |
428 | 447 |
429 if (is_android) { | 448 if (is_android) { |
430 deps += [ "//ui/gl" ] | 449 deps += [ "//ui/gl" ] |
431 } | 450 } |
432 } | 451 } |
433 | 452 |
434 if (current_cpu == "x86" || current_cpu == "x64") { | 453 if (current_cpu == "x86" || current_cpu == "x64") { |
435 source_set("media_sse2") { | 454 source_set("media_sse2") { |
436 sources = [ | 455 sources = [ |
437 "simd/convert_rgb_to_yuv_sse2.cc", | 456 "simd/convert_rgb_to_yuv_sse2.cc", |
438 "simd/convert_rgb_to_yuv_ssse3.cc", | 457 "simd/convert_rgb_to_yuv_ssse3.cc", |
439 "simd/filter_yuv_sse2.cc", | 458 "simd/filter_yuv_sse2.cc", |
440 ] | 459 ] |
441 configs += [ "//media:media_config" ] | 460 configs += [ |
| 461 "//media:media_config", |
| 462 "//media:media_implementation", |
| 463 ] |
442 if (!is_win) { | 464 if (!is_win) { |
443 cflags = [ "-msse2" ] | 465 cflags = [ "-msse2" ] |
444 } | 466 } |
445 } | 467 } |
446 | 468 |
447 import("//third_party/yasm/yasm_assemble.gni") | 469 import("//third_party/yasm/yasm_assemble.gni") |
448 yasm_assemble("media_yasm") { | 470 yasm_assemble("media_yasm") { |
449 sources = [ | 471 sources = [ |
450 "simd/convert_rgb_to_yuv_ssse3.asm", | 472 "simd/convert_rgb_to_yuv_ssse3.asm", |
451 "simd/convert_yuv_to_rgb_sse.asm", | 473 "simd/convert_yuv_to_rgb_sse.asm", |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 if (is_posix) { | 519 if (is_posix) { |
498 yasm_flags += [ "-DELF" ] | 520 yasm_flags += [ "-DELF" ] |
499 if (current_cpu == "x64") { | 521 if (current_cpu == "x64") { |
500 # TODO(ajwong): Why isn't this true in mac? | 522 # TODO(ajwong): Why isn't this true in mac? |
501 yasm_flags += [ "-DPIC" ] | 523 yasm_flags += [ "-DPIC" ] |
502 } | 524 } |
503 } | 525 } |
504 } | 526 } |
505 } | 527 } |
506 } | 528 } |
OLD | NEW |