| 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") |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 "renderer_factory.cc", | 208 "renderer_factory.cc", |
| 209 "renderer_factory.h", | 209 "renderer_factory.h", |
| 210 "sample_format.cc", | 210 "sample_format.cc", |
| 211 "sample_format.h", | 211 "sample_format.h", |
| 212 "seekable_buffer.cc", | 212 "seekable_buffer.cc", |
| 213 "seekable_buffer.h", | 213 "seekable_buffer.h", |
| 214 "serial_runner.cc", | 214 "serial_runner.cc", |
| 215 "serial_runner.h", | 215 "serial_runner.h", |
| 216 "silent_sink_suspender.cc", | 216 "silent_sink_suspender.cc", |
| 217 "silent_sink_suspender.h", | 217 "silent_sink_suspender.h", |
| 218 "simd/convert_rgb_to_yuv.h", | |
| 219 "simd/convert_rgb_to_yuv_c.cc", | |
| 220 "simd/convert_yuv_to_rgb.h", | |
| 221 "simd/convert_yuv_to_rgb_c.cc", | |
| 222 "simd/filter_yuv.h", | |
| 223 "simd/filter_yuv_c.cc", | |
| 224 "sinc_resampler.cc", | 218 "sinc_resampler.cc", |
| 225 "sinc_resampler.h", | 219 "sinc_resampler.h", |
| 226 "stream_parser.cc", | 220 "stream_parser.cc", |
| 227 "stream_parser.h", | 221 "stream_parser.h", |
| 228 "stream_parser_buffer.cc", | 222 "stream_parser_buffer.cc", |
| 229 "stream_parser_buffer.h", | 223 "stream_parser_buffer.h", |
| 230 "subsample_entry.h", | 224 "subsample_entry.h", |
| 231 "surface_manager.h", | 225 "surface_manager.h", |
| 232 "text_cue.cc", | 226 "text_cue.cc", |
| 233 "text_cue.h", | 227 "text_cue.h", |
| (...skipping 24 matching lines...) Expand all Loading... |
| 258 "video_frame_pool.h", | 252 "video_frame_pool.h", |
| 259 "video_renderer.cc", | 253 "video_renderer.cc", |
| 260 "video_renderer.h", | 254 "video_renderer.h", |
| 261 "video_rotation.h", | 255 "video_rotation.h", |
| 262 "video_types.cc", | 256 "video_types.cc", |
| 263 "video_types.h", | 257 "video_types.h", |
| 264 "video_util.cc", | 258 "video_util.cc", |
| 265 "video_util.h", | 259 "video_util.h", |
| 266 "wall_clock_time_source.cc", | 260 "wall_clock_time_source.cc", |
| 267 "wall_clock_time_source.h", | 261 "wall_clock_time_source.h", |
| 268 "yuv_convert.cc", | |
| 269 "yuv_convert.h", | |
| 270 ] | 262 ] |
| 271 | 263 |
| 272 allow_circular_includes_from = [] | 264 allow_circular_includes_from = [] |
| 273 defines = [] | 265 defines = [] |
| 274 public_deps = [ | 266 public_deps = [ |
| 275 "//ppapi/features", | 267 "//ppapi/features", |
| 276 "//ui/gfx:color_space", | 268 "//ui/gfx:color_space", |
| 277 ] | 269 ] |
| 278 deps = [ | 270 deps = [ |
| 279 "//base/third_party/dynamic_annotations:dynamic_annotations", | 271 "//base/third_party/dynamic_annotations:dynamic_annotations", |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 sources += [ "user_input_monitor_mac.cc" ] | 322 sources += [ "user_input_monitor_mac.cc" ] |
| 331 | 323 |
| 332 # Required by video_frame.cc. | 324 # Required by video_frame.cc. |
| 333 libs = [ "CoreVideo.framework" ] | 325 libs = [ "CoreVideo.framework" ] |
| 334 } else if (is_win) { | 326 } else if (is_win) { |
| 335 sources += [ "user_input_monitor_win.cc" ] | 327 sources += [ "user_input_monitor_win.cc" ] |
| 336 } else { | 328 } else { |
| 337 defines += [ "DISABLE_USER_INPUT_MONITOR" ] | 329 defines += [ "DISABLE_USER_INPUT_MONITOR" ] |
| 338 } | 330 } |
| 339 | 331 |
| 340 if (current_cpu == "x86" || current_cpu == "x64") { | |
| 341 sources += [ | |
| 342 "simd/convert_rgb_to_yuv_sse2.cc", | |
| 343 "simd/convert_rgb_to_yuv_ssse3.cc", | |
| 344 "simd/convert_yuv_to_rgb_x86.cc", | |
| 345 "simd/filter_yuv_sse2.cc", | |
| 346 ] | |
| 347 deps += [ ":media_yasm" ] | |
| 348 } | |
| 349 | |
| 350 if (is_linux || is_win) { | 332 if (is_linux || is_win) { |
| 351 sources += [ | 333 sources += [ |
| 352 "keyboard_event_counter.cc", | 334 "keyboard_event_counter.cc", |
| 353 "keyboard_event_counter.h", | 335 "keyboard_event_counter.h", |
| 354 ] | 336 ] |
| 355 } | 337 } |
| 356 } | 338 } |
| 357 | 339 |
| 358 static_library("test_support") { | 340 static_library("test_support") { |
| 359 testonly = true | 341 testonly = true |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 "text_ranges_unittest.cc", | 432 "text_ranges_unittest.cc", |
| 451 "text_renderer_unittest.cc", | 433 "text_renderer_unittest.cc", |
| 452 "time_delta_interpolator_unittest.cc", | 434 "time_delta_interpolator_unittest.cc", |
| 453 "vector_math_unittest.cc", | 435 "vector_math_unittest.cc", |
| 454 "video_codecs_unittest.cc", | 436 "video_codecs_unittest.cc", |
| 455 "video_decoder_config_unittest.cc", | 437 "video_decoder_config_unittest.cc", |
| 456 "video_frame_pool_unittest.cc", | 438 "video_frame_pool_unittest.cc", |
| 457 "video_frame_unittest.cc", | 439 "video_frame_unittest.cc", |
| 458 "video_util_unittest.cc", | 440 "video_util_unittest.cc", |
| 459 "wall_clock_time_source_unittest.cc", | 441 "wall_clock_time_source_unittest.cc", |
| 460 "yuv_convert_unittest.cc", | |
| 461 ] | 442 ] |
| 462 configs += [ | 443 configs += [ |
| 463 "//build/config/compiler:no_size_t_to_int_warning", | 444 "//build/config/compiler:no_size_t_to_int_warning", |
| 464 "//media:media_config", | 445 "//media:media_config", |
| 465 ] | 446 ] |
| 466 deps = [ | 447 deps = [ |
| 467 ":test_support", | 448 ":test_support", |
| 468 "//base/test:test_support", | 449 "//base/test:test_support", |
| 469 "//gpu/command_buffer/common", | 450 "//gpu/command_buffer/common", |
| 470 "//media", | 451 "//media", |
| 471 "//media/base/android:anywhere_unit_tests", | 452 "//media/base/android:anywhere_unit_tests", |
| 472 "//ppapi/features", | 453 "//ppapi/features", |
| 473 "//skia", | 454 "//skia", |
| 474 "//testing/gmock", | 455 "//testing/gmock", |
| 475 "//testing/gtest", | 456 "//testing/gtest", |
| 457 "//third_party/libyuv", |
| 476 ] | 458 ] |
| 477 | 459 |
| 478 # Even if FFmpeg is enabled on Android we don't want these. | 460 # Even if FFmpeg is enabled on Android we don't want these. |
| 479 # TODO(watk): Refactor tests that could be made to run on Android. | 461 # TODO(watk): Refactor tests that could be made to run on Android. |
| 480 if (media_use_ffmpeg && !is_android) { | 462 if (media_use_ffmpeg && !is_android) { |
| 481 sources += [ | 463 sources += [ |
| 482 "audio_video_metadata_extractor_unittest.cc", | 464 "audio_video_metadata_extractor_unittest.cc", |
| 483 "media_file_checker_unittest.cc", | 465 "media_file_checker_unittest.cc", |
| 484 ] | 466 ] |
| 485 } | 467 } |
| 486 | 468 |
| 487 if (is_android) { | 469 if (is_android) { |
| 488 deps += [ | 470 deps += [ |
| 489 "//media/base/android:unit_tests", | 471 "//media/base/android:unit_tests", |
| 490 "//ui/gl", | 472 "//ui/gl", |
| 491 ] | 473 ] |
| 492 } | 474 } |
| 493 | 475 |
| 494 if (current_cpu == "x86" || current_cpu == "x64") { | |
| 495 sources += [ "simd/convert_rgb_to_yuv_unittest.cc" ] | |
| 496 } | |
| 497 if (is_linux || is_win) { | 476 if (is_linux || is_win) { |
| 498 sources += [ "keyboard_event_counter_unittest.cc" ] | 477 sources += [ "keyboard_event_counter_unittest.cc" ] |
| 499 } | 478 } |
| 500 } | 479 } |
| 501 | 480 |
| 502 test("media_base_unittests") { | 481 test("media_base_unittests") { |
| 503 deps = [ | 482 deps = [ |
| 504 ":unit_tests", | 483 ":unit_tests", |
| 505 "//media/test:run_all_unittests", | 484 "//media/test:run_all_unittests", |
| 506 ] | 485 ] |
| 507 | 486 |
| 508 if (is_android) { | 487 if (is_android) { |
| 509 deps += [ | 488 deps += [ |
| 510 # The test needs the java dependencies to add the java classes for their | 489 # The test needs the java dependencies to add the java classes for their |
| 511 # native counterparts to the test apk. | 490 # native counterparts to the test apk. |
| 512 "//media/base/android:media_java", | 491 "//media/base/android:media_java", |
| 513 "//ui/android:ui_java", | 492 "//ui/android:ui_java", |
| 514 ] | 493 ] |
| 515 } | 494 } |
| 516 } | 495 } |
| 517 | 496 |
| 518 source_set("perftests") { | 497 source_set("perftests") { |
| 519 testonly = true | 498 testonly = true |
| 520 sources = [ | 499 sources = [ |
| 521 "audio_bus_perftest.cc", | 500 "audio_bus_perftest.cc", |
| 522 "audio_converter_perftest.cc", | 501 "audio_converter_perftest.cc", |
| 523 "run_all_perftests.cc", | 502 "run_all_perftests.cc", |
| 524 "sinc_resampler_perftest.cc", | 503 "sinc_resampler_perftest.cc", |
| 525 "vector_math_perftest.cc", | 504 "vector_math_perftest.cc", |
| 526 "yuv_convert_perftest.cc", | |
| 527 ] | 505 ] |
| 528 configs += [ "//media:media_config" ] | 506 configs += [ "//media:media_config" ] |
| 529 deps = [ | 507 deps = [ |
| 530 ":test_support", | 508 ":test_support", |
| 531 "//base", | 509 "//base", |
| 532 "//base/test:test_support", | 510 "//base/test:test_support", |
| 533 "//media", | 511 "//media", |
| 534 "//testing/gmock", | 512 "//testing/gmock", |
| 535 "//testing/gtest", | 513 "//testing/gtest", |
| 536 "//testing/perf", | 514 "//testing/perf", |
| 537 "//third_party/libyuv", | |
| 538 ] | 515 ] |
| 539 | 516 |
| 540 if (media_use_ffmpeg) { | 517 if (media_use_ffmpeg) { |
| 541 sources += [ "demuxer_perftest.cc" ] | 518 sources += [ "demuxer_perftest.cc" ] |
| 542 } | 519 } |
| 543 } | 520 } |
| 544 | 521 |
| 545 if (current_cpu == "x86" || current_cpu == "x64") { | |
| 546 import("//third_party/yasm/yasm_assemble.gni") | |
| 547 yasm_assemble("media_yasm") { | |
| 548 sources = [ | |
| 549 "simd/convert_rgb_to_yuv_ssse3.asm", | |
| 550 "simd/convert_yuv_to_rgb_sse.asm", | |
| 551 "simd/convert_yuva_to_argb_mmx.asm", | |
| 552 "simd/empty_register_state_mmx.asm", | |
| 553 "simd/linear_scale_yuv_to_rgb_mmx.asm", | |
| 554 "simd/linear_scale_yuv_to_rgb_sse.asm", | |
| 555 "simd/scale_yuv_to_rgb_mmx.asm", | |
| 556 "simd/scale_yuv_to_rgb_sse.asm", | |
| 557 ] | |
| 558 | |
| 559 yasm_flags = [ | |
| 560 "-DCHROMIUM", | |
| 561 | |
| 562 # In addition to the same path as source asm, let yasm %include | |
| 563 # search path be relative to src/ per Chromium policy. | |
| 564 "-I", | |
| 565 rebase_path("..", root_build_dir), | |
| 566 ] | |
| 567 | |
| 568 if (is_component_build) { | |
| 569 yasm_flags += [ "-DEXPORT_SYMBOLS" ] | |
| 570 } | |
| 571 | |
| 572 inputs = [ | |
| 573 "//third_party/x86inc/x86inc.asm", | |
| 574 "simd/convert_rgb_to_yuv_ssse3.inc", | |
| 575 "simd/convert_yuv_to_rgb_mmx.inc", | |
| 576 "simd/convert_yuva_to_argb_mmx.inc", | |
| 577 "simd/linear_scale_yuv_to_rgb_mmx.inc", | |
| 578 "simd/media_export.asm", | |
| 579 "simd/scale_yuv_to_rgb_mmx.inc", | |
| 580 ] | |
| 581 | |
| 582 if (current_cpu == "x86") { | |
| 583 yasm_flags += [ "-DARCH_X86_32" ] | |
| 584 } else if (current_cpu == "x64") { | |
| 585 yasm_flags += [ "-DARCH_X86_64" ] | |
| 586 sources += [ | |
| 587 "simd/linear_scale_yuv_to_rgb_mmx_x64.asm", | |
| 588 "simd/scale_yuv_to_rgb_sse2_x64.asm", | |
| 589 ] | |
| 590 } | |
| 591 | |
| 592 if (is_mac || is_ios) { | |
| 593 yasm_flags += [ | |
| 594 "-DPREFIX", | |
| 595 "-DMACHO", | |
| 596 ] | |
| 597 } else { | |
| 598 if (is_posix) { | |
| 599 yasm_flags += [ "-DELF" ] | |
| 600 if (current_cpu == "x64") { | |
| 601 # TODO(ajwong): Why isn't this true in mac? | |
| 602 yasm_flags += [ "-DPIC" ] | |
| 603 } | |
| 604 } | |
| 605 } | |
| 606 } | |
| 607 } | |
| 608 | |
| 609 fuzzer_test("media_bit_reader_fuzzer") { | 522 fuzzer_test("media_bit_reader_fuzzer") { |
| 610 sources = [ | 523 sources = [ |
| 611 "bit_reader_fuzzertest.cc", | 524 "bit_reader_fuzzertest.cc", |
| 612 ] | 525 ] |
| 613 deps = [ | 526 deps = [ |
| 614 ":test_support", | 527 ":test_support", |
| 615 "//base", | 528 "//base", |
| 616 "//media", | 529 "//media", |
| 617 ] | 530 ] |
| 618 } | 531 } |
| 619 | 532 |
| 620 fuzzer_test("media_container_names_fuzzer") { | 533 fuzzer_test("media_container_names_fuzzer") { |
| 621 sources = [ | 534 sources = [ |
| 622 "container_names_fuzzertest.cc", | 535 "container_names_fuzzertest.cc", |
| 623 ] | 536 ] |
| 624 deps = [ | 537 deps = [ |
| 625 "//base", | 538 "//base", |
| 626 "//media", | 539 "//media", |
| 627 ] | 540 ] |
| 628 } | 541 } |
| OLD | NEW |