| 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/linux/pkg_config.gni") | 8 import("//build/config/linux/pkg_config.gni") |
| 9 import("//build/config/ui.gni") | 9 import("//build/config/ui.gni") |
| 10 import("//media/media_options.gni") | 10 import("//media/media_options.gni") |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 if (use_ozone) { | 44 if (use_ozone) { |
| 45 action("generate_ozone_constructor_list") { | 45 action("generate_ozone_constructor_list") { |
| 46 # Ozone platform objects are auto-generated using similar | 46 # Ozone platform objects are auto-generated using similar |
| 47 # patterns for naming and classes constructors. Here we build the | 47 # patterns for naming and classes constructors. Here we build the |
| 48 # object MediaOzonePlatform. | 48 # object MediaOzonePlatform. |
| 49 script = "../ui/ozone/generate_constructor_list.py" | 49 script = "../ui/ozone/generate_constructor_list.py" |
| 50 | 50 |
| 51 platform_list_txt_file = "$target_gen_dir/../ui/ozone/platform_list.txt" | 51 platform_list_txt_file = "$target_gen_dir/../ui/ozone/platform_list.txt" |
| 52 constructor_list_cc_file = "$target_gen_dir/../media/ozone/constructor_list.
cc" | 52 constructor_list_cc_file = |
| 53 "$target_gen_dir/../media/ozone/constructor_list.cc" |
| 53 | 54 |
| 54 sources = [ platform_list_txt_file ] | 55 sources = [ |
| 55 outputs = [ constructor_list_cc_file ] | 56 platform_list_txt_file, |
| 57 ] |
| 58 outputs = [ |
| 59 constructor_list_cc_file, |
| 60 ] |
| 56 args = [ | 61 args = [ |
| 57 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir), | 62 "--platform_list=" + rebase_path(platform_list_txt_file, root_build_dir), |
| 58 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir), | 63 "--output_cc=" + rebase_path(constructor_list_cc_file, root_build_dir), |
| 59 "--namespace=media", | 64 "--namespace=media", |
| 60 "--typename=MediaOzonePlatform", | 65 "--typename=MediaOzonePlatform", |
| 61 "--include=\"media/ozone/media_ozone_platform.h\"" | 66 "--include=\"media/ozone/media_ozone_platform.h\"", |
| 62 ] | 67 ] |
| 63 } | 68 } |
| 64 } | 69 } |
| 65 | 70 |
| 66 component("media") { | 71 component("media") { |
| 67 sources = [ | 72 sources = [ |
| 68 "cdm/aes_decryptor.cc", | 73 "cdm/aes_decryptor.cc", |
| 69 "cdm/aes_decryptor.h", | 74 "cdm/aes_decryptor.h", |
| 70 "cdm/json_web_key.cc", | 75 "cdm/json_web_key.cc", |
| 71 "cdm/json_web_key.h", | 76 "cdm/json_web_key.h", |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 "formats/webm/webm_stream_parser.cc", | 236 "formats/webm/webm_stream_parser.cc", |
| 232 "formats/webm/webm_stream_parser.h", | 237 "formats/webm/webm_stream_parser.h", |
| 233 "formats/webm/webm_tracks_parser.cc", | 238 "formats/webm/webm_tracks_parser.cc", |
| 234 "formats/webm/webm_tracks_parser.h", | 239 "formats/webm/webm_tracks_parser.h", |
| 235 "formats/webm/webm_video_client.cc", | 240 "formats/webm/webm_video_client.cc", |
| 236 "formats/webm/webm_video_client.h", | 241 "formats/webm/webm_video_client.h", |
| 237 "formats/webm/webm_webvtt_parser.cc", | 242 "formats/webm/webm_webvtt_parser.cc", |
| 238 "formats/webm/webm_webvtt_parser.h", | 243 "formats/webm/webm_webvtt_parser.h", |
| 239 ] | 244 ] |
| 240 | 245 |
| 241 configs += [ ":media_config", ] | 246 configs += [ ":media_config" ] |
| 242 all_dependent_configs = [ ":media_dependent_config" ] | 247 all_dependent_configs = [ ":media_dependent_config" ] |
| 243 | 248 |
| 244 cflags = [] | 249 cflags = [] |
| 245 libs = [] | 250 libs = [] |
| 246 defines = [] | 251 defines = [] |
| 247 deps = [] | 252 deps = [] |
| 248 | 253 |
| 249 include_dirs = [ "." ] | 254 include_dirs = [ "." ] |
| 250 if (media_use_ffmpeg) { | 255 if (media_use_ffmpeg) { |
| 251 deps += [ "//third_party/ffmpeg" ] | 256 deps += [ "//third_party/ffmpeg" ] |
| (...skipping 24 matching lines...) Expand all Loading... |
| 276 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.h", | 281 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.h", |
| 277 ] | 282 ] |
| 278 } | 283 } |
| 279 } | 284 } |
| 280 | 285 |
| 281 if (cpu_arch == "arm" && arm_use_neon) { | 286 if (cpu_arch == "arm" && arm_use_neon) { |
| 282 defines += [ "USE_NEON" ] | 287 defines += [ "USE_NEON" ] |
| 283 } | 288 } |
| 284 | 289 |
| 285 if (media_use_libvpx) { | 290 if (media_use_libvpx) { |
| 286 sources += [ | 291 sources += [ |
| 287 "filters/vpx_video_decoder.cc", | 292 "filters/vpx_video_decoder.cc", |
| 288 "filters/vpx_video_decoder.h", | 293 "filters/vpx_video_decoder.h", |
| 289 ] | 294 ] |
| 290 deps += [ "//third_party/libvpx" ] | 295 deps += [ "//third_party/libvpx" ] |
| 291 } | 296 } |
| 292 | 297 |
| 293 if (!is_android) { | 298 if (!is_android) { |
| 294 sources += [ | 299 sources += [ |
| 295 "filters/opus_audio_decoder.cc", | 300 "filters/opus_audio_decoder.cc", |
| 296 "filters/opus_audio_decoder.h", | 301 "filters/opus_audio_decoder.h", |
| 297 ] | 302 ] |
| 298 } else { | 303 } else { |
| 299 sources += [ | 304 sources += [ |
| 300 "midi/midi_manager_android.cc", | 305 "midi/midi_manager_android.cc", |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 ] | 338 ] |
| 334 } | 339 } |
| 335 | 340 |
| 336 # A simple WebM encoder for animated avatars on ChromeOS. | 341 # A simple WebM encoder for animated avatars on ChromeOS. |
| 337 | 342 |
| 338 if (use_ozone) { | 343 if (use_ozone) { |
| 339 # Used for the generated listing header (ui/ozone/platform_list.h) | 344 # Used for the generated listing header (ui/ozone/platform_list.h) |
| 340 include_dirs += [ target_gen_dir ] | 345 include_dirs += [ target_gen_dir ] |
| 341 | 346 |
| 342 sources += [ | 347 sources += [ |
| 343 "ozone/media_ozone_platform.cc", | 348 "ozone/media_ozone_platform.cc", |
| 344 "ozone/media_ozone_platform.h", | 349 "ozone/media_ozone_platform.h", |
| 345 ] + get_target_outputs(":generate_ozone_constructor_list") | 350 ] + get_target_outputs(":generate_ozone_constructor_list") |
| 346 | 351 |
| 347 deps += [ | 352 deps += [ |
| 348 ":generate_ozone_constructor_list", | 353 ":generate_ozone_constructor_list", |
| 349 "//ui/ozone", | 354 "//ui/ozone", |
| 350 ] | 355 ] |
| 351 } | 356 } |
| 352 | 357 |
| 353 if (is_mac) { | 358 if (is_mac) { |
| 354 deps += [ | 359 deps += [ |
| 355 "//media/base/mac", | 360 "//media/base/mac", |
| 356 "//third_party/decklink", | 361 "//third_party/decklink", |
| 357 ] | 362 ] |
| 358 libs += [ | 363 libs += [ |
| 359 "CoreMIDI.framework", | 364 "CoreMIDI.framework", |
| 360 "CoreVideo.framework", | 365 "CoreVideo.framework", |
| 361 "OpenGL.framework", | 366 "OpenGL.framework", |
| 362 "QTKit.framework", | 367 "QTKit.framework", |
| 363 ] | 368 ] |
| 364 } | 369 } |
| 365 | 370 |
| 366 if (is_ios) { | 371 if (is_ios) { |
| 367 deps += [ | 372 deps += [ "//media/base/mac" ] |
| 368 "//media/base/mac", | |
| 369 ] | |
| 370 } | 373 } |
| 371 | 374 |
| 372 if (is_win) { | 375 if (is_win) { |
| 373 libs += [ | 376 libs += [ |
| 374 "mf.lib", | 377 "mf.lib", |
| 375 "mfplat.lib", | 378 "mfplat.lib", |
| 376 "mfreadwrite.lib", | 379 "mfreadwrite.lib", |
| 377 "mfuuid.lib", | 380 "mfuuid.lib", |
| 378 ] | 381 ] |
| 379 cflags += [ | 382 cflags += [ "/wd4267" ] # TODO(wolenetz): Fix size_t to int trunctaion in w
in64. See |
| 380 "/wd4267" # TODO(wolenetz): Fix size_t to int trunctaion in win64. See | 383 # http://crbug.com/171009 |
| 381 # http://crbug.com/171009 | |
| 382 ] | |
| 383 } | 384 } |
| 384 | 385 |
| 385 if (proprietary_codecs) { | 386 if (proprietary_codecs) { |
| 386 sources += [ | 387 sources += [ |
| 387 "filters/h264_to_annex_b_bitstream_converter.cc", | 388 "filters/h264_to_annex_b_bitstream_converter.cc", |
| 388 "filters/h264_to_annex_b_bitstream_converter.h", | 389 "filters/h264_to_annex_b_bitstream_converter.h", |
| 389 "formats/mp2t/es_adapter_video.cc", | 390 "formats/mp2t/es_adapter_video.cc", |
| 390 "formats/mp2t/es_adapter_video.h", | 391 "formats/mp2t/es_adapter_video.h", |
| 391 "formats/mp2t/es_parser.cc", | 392 "formats/mp2t/es_parser.cc", |
| 392 "formats/mp2t/es_parser.h", | 393 "formats/mp2t/es_parser.h", |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 "formats/mp4/es_descriptor_unittest.cc", | 600 "formats/mp4/es_descriptor_unittest.cc", |
| 600 "formats/mp4/mp4_stream_parser_unittest.cc", | 601 "formats/mp4/mp4_stream_parser_unittest.cc", |
| 601 "formats/mp4/sample_to_group_iterator_unittest.cc", | 602 "formats/mp4/sample_to_group_iterator_unittest.cc", |
| 602 "formats/mp4/track_run_iterator_unittest.cc", | 603 "formats/mp4/track_run_iterator_unittest.cc", |
| 603 "formats/mpeg/adts_stream_parser_unittest.cc", | 604 "formats/mpeg/adts_stream_parser_unittest.cc", |
| 604 "formats/mpeg/mpeg1_audio_stream_parser_unittest.cc", | 605 "formats/mpeg/mpeg1_audio_stream_parser_unittest.cc", |
| 605 ] | 606 ] |
| 606 } | 607 } |
| 607 | 608 |
| 608 if (is_win && cpu_arch == "x64") { | 609 if (is_win && cpu_arch == "x64") { |
| 609 cflags += [ | 610 cflags += [ "/wd4267" ] # TODO(wolenetz): Fix size_t to int trunctaion in w
in64. See |
| 610 "/wd4267" # TODO(wolenetz): Fix size_t to int trunctaion in win64. See | 611 # http://crbug.com/171009 |
| 611 # http://crbug.com/171009 | |
| 612 ] | |
| 613 } | 612 } |
| 614 | 613 |
| 615 if (is_mac || is_ios) { | 614 if (is_mac || is_ios) { |
| 616 deps += [ | 615 deps += [ "//media/base/mac" ] |
| 617 "//media/base/mac", | |
| 618 ] | |
| 619 } | 616 } |
| 620 | 617 |
| 621 if (is_mac) { | 618 if (is_mac) { |
| 622 sources += [ | 619 sources += |
| 623 "video/capture/mac/video_capture_device_factory_mac_unittest.mm" | 620 [ "video/capture/mac/video_capture_device_factory_mac_unittest.mm" ] |
| 624 ] | |
| 625 } | 621 } |
| 626 | 622 |
| 627 # include_dirs += [ | 623 # include_dirs += [ |
| 628 # # Needed by media_drm_bridge.cc. | 624 # # Needed by media_drm_bridge.cc. |
| 629 # target_gen_dir, | 625 # target_gen_dir, |
| 630 # ], | 626 # ], |
| 631 | 627 |
| 632 configs += [ ":media_config" ] | 628 configs += [ ":media_config" ] |
| 633 | 629 |
| 634 if (media_use_ffmpeg) { | 630 if (media_use_ffmpeg) { |
| 635 deps += [ | 631 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit
config. |
| 636 "//third_party/ffmpeg", # Direct dependency required to inherit config. | |
| 637 ] | |
| 638 } | 632 } |
| 639 } | 633 } |
| 640 | 634 |
| 641 test("media_perftests") { | 635 test("media_perftests") { |
| 642 sources = [] | 636 sources = [] |
| 643 if (media_use_ffmpeg) { | 637 if (media_use_ffmpeg) { |
| 644 sources += [ | 638 sources += [ |
| 645 "filters/pipeline_integration_perftest.cc", | 639 "filters/pipeline_integration_perftest.cc", |
| 646 "filters/pipeline_integration_test_base.cc", | 640 "filters/pipeline_integration_test_base.cc", |
| 647 ] | 641 ] |
| (...skipping 10 matching lines...) Expand all Loading... |
| 658 "//testing/gmock", | 652 "//testing/gmock", |
| 659 "//testing/gtest", | 653 "//testing/gtest", |
| 660 "//testing/perf", | 654 "//testing/perf", |
| 661 "//third_party/widevine/cdm:version_h", | 655 "//third_party/widevine/cdm:version_h", |
| 662 "//ui/gfx:test_support", | 656 "//ui/gfx:test_support", |
| 663 ] | 657 ] |
| 664 if (is_android) { | 658 if (is_android) { |
| 665 deps += [ "//ui/gl" ] | 659 deps += [ "//ui/gl" ] |
| 666 } | 660 } |
| 667 if (media_use_ffmpeg) { | 661 if (media_use_ffmpeg) { |
| 668 deps += [ | 662 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit
config. |
| 669 "//third_party/ffmpeg", # Direct dependency required to inherit config. | |
| 670 ] | |
| 671 } | 663 } |
| 672 } | 664 } |
| 673 | 665 |
| 674 source_set("test_support") { | 666 source_set("test_support") { |
| 675 testonly = true | 667 testonly = true |
| 676 sources = [ | 668 sources = [ |
| 677 "filters/clockless_video_frame_scheduler.cc", | 669 "filters/clockless_video_frame_scheduler.cc", |
| 678 "filters/clockless_video_frame_scheduler.h", | 670 "filters/clockless_video_frame_scheduler.h", |
| 679 "filters/mock_gpu_video_accelerator_factories.cc", | 671 "filters/mock_gpu_video_accelerator_factories.cc", |
| 680 "filters/mock_gpu_video_accelerator_factories.h", | 672 "filters/mock_gpu_video_accelerator_factories.h", |
| (...skipping 21 matching lines...) Expand all Loading... |
| 702 "base/audio_bus.h", | 694 "base/audio_bus.h", |
| 703 "base/channel_layout.cc", | 695 "base/channel_layout.cc", |
| 704 "base/channel_layout.h", | 696 "base/channel_layout.h", |
| 705 "base/limits.h", | 697 "base/limits.h", |
| 706 "base/media_export.h", | 698 "base/media_export.h", |
| 707 "base/vector_math.cc", | 699 "base/vector_math.cc", |
| 708 "base/vector_math.h", | 700 "base/vector_math.h", |
| 709 ] | 701 ] |
| 710 configs += [ ":media_config" ] | 702 configs += [ ":media_config" ] |
| 711 defines = [ "MEDIA_IMPLEMENTATION" ] | 703 defines = [ "MEDIA_IMPLEMENTATION" ] |
| 712 deps = [ "//base" ] | 704 deps = [ |
| 705 "//base", |
| 706 ] |
| 713 } | 707 } |
| 714 | 708 |
| 715 if (media_use_ffmpeg) { | 709 if (media_use_ffmpeg) { |
| 716 test("ffmpeg_unittests") { | 710 test("ffmpeg_unittests") { |
| 717 sources = [ "ffmpeg/ffmpeg_unittest.cc" ] | 711 sources = [ |
| 712 "ffmpeg/ffmpeg_unittest.cc", |
| 713 ] |
| 718 | 714 |
| 719 deps = [ | 715 deps = [ |
| 720 ":media", | 716 ":media", |
| 721 ":test_support", | 717 ":test_support", |
| 722 "//base", | 718 "//base", |
| 723 "//base:i18n", | 719 "//base:i18n", |
| 724 "//base/test:test_support", | 720 "//base/test:test_support", |
| 725 "//testing/gtest", | 721 "//testing/gtest", |
| 726 "//third_party/ffmpeg", | 722 "//third_party/ffmpeg", |
| 727 "//ui/gfx:test_support", | 723 "//ui/gfx:test_support", |
| 728 ] | 724 ] |
| 729 } | 725 } |
| 730 | 726 |
| 731 test("ffmpeg_regression_tests") { | 727 test("ffmpeg_regression_tests") { |
| 732 sources = [ | 728 sources = [ |
| 733 "base/run_all_unittests.cc", | 729 "base/run_all_unittests.cc", |
| 734 "ffmpeg/ffmpeg_regression_tests.cc", | 730 "ffmpeg/ffmpeg_regression_tests.cc", |
| 735 "filters/pipeline_integration_test_base.cc", | 731 "filters/pipeline_integration_test_base.cc", |
| 736 ] | 732 ] |
| 737 configs += [ ":media_config" ] | 733 configs += [ ":media_config" ] |
| 738 deps = [ | 734 deps = [ |
| 739 ":media", | 735 ":media", |
| 740 ":test_support", | 736 ":test_support", |
| 741 "//base/test:test_support", | 737 "//base/test:test_support", |
| 742 "//media/audio:test_support", | 738 "//media/audio:test_support", |
| 743 "//media/base:test_support", | 739 "//media/base:test_support", |
| 744 "//testing/gmock", | 740 "//testing/gmock", |
| 745 "//testing/gtest", | 741 "//testing/gtest", |
| 746 "//third_party/ffmpeg", | 742 "//third_party/ffmpeg", |
| 747 "//ui/gfx/geometry", | 743 "//ui/gfx/geometry", |
| 748 "//ui/gfx:test_support", | 744 "//ui/gfx:test_support", |
| 749 ] | 745 ] |
| 750 # TODO(ajwong): This was in the original gyp, but it seems silly. | 746 |
| 751 # ['os_posix==1 and OS!="mac"', { | 747 # TODO(ajwong): This was in the original gyp, but it seems silly. |
| 752 # 'conditions': [ | 748 # ['os_posix==1 and OS!="mac"', { |
| 753 # ['use_allocator!="none"', { | 749 # 'conditions': [ |
| 754 # 'dependencies': [ | 750 # ['use_allocator!="none"', { |
| 755 # '../base/allocator/allocator.gyp:allocator', | 751 # 'dependencies': [ |
| 756 # ], | 752 # '../base/allocator/allocator.gyp:allocator', |
| 757 # }], | 753 # ], |
| 758 # ], | 754 # }], |
| 759 # }], | 755 # ], |
| 756 # }], |
| 760 } | 757 } |
| 761 } | 758 } |
| 762 | 759 |
| 763 if (use_x11) { | 760 if (use_x11) { |
| 764 executable("player_x11") { | 761 executable("player_x11") { |
| 765 sources = [ | 762 sources = [ |
| 766 "tools/player_x11/data_source_logger.cc", | 763 "tools/player_x11/data_source_logger.cc", |
| 767 "tools/player_x11/data_source_logger.h", | 764 "tools/player_x11/data_source_logger.h", |
| 768 "tools/player_x11/gl_video_renderer.cc", | 765 "tools/player_x11/gl_video_renderer.cc", |
| 769 "tools/player_x11/gl_video_renderer.h", | 766 "tools/player_x11/gl_video_renderer.h", |
| 770 "tools/player_x11/player_x11.cc", | 767 "tools/player_x11/player_x11.cc", |
| 771 "tools/player_x11/x11_video_renderer.cc", | 768 "tools/player_x11/x11_video_renderer.cc", |
| 772 "tools/player_x11/x11_video_renderer.h", | 769 "tools/player_x11/x11_video_renderer.h", |
| 773 ] | 770 ] |
| 774 configs += [ | 771 configs += [ |
| 775 ":media_config", | 772 ":media_config", |
| 776 "//build/config/linux:x11", | 773 "//build/config/linux:x11", |
| 777 "//build/config/linux:xext", | 774 "//build/config/linux:xext", |
| 778 # TODO(ajwong): Why does xext get a separate thing in //build/config/linux:BUILD
.gn | 775 |
| 779 # "//build/config/linux:xrender", | 776 # TODO(ajwong): Why does xext get a separate thing in //build/config/linux
:BUILD.gn |
| 777 # "//build/config/linux:xrender", |
| 780 ] | 778 ] |
| 781 deps = [ | 779 deps = [ |
| 782 ":media", | 780 ":media", |
| 783 ":shared_memory_support", | 781 ":shared_memory_support", |
| 784 "//base", | 782 "//base", |
| 785 "//ui/gl", | 783 "//ui/gl", |
| 786 "//ui/gfx", | 784 "//ui/gfx", |
| 787 "//ui/gfx/geometry", | 785 "//ui/gfx/geometry", |
| 788 ] | 786 ] |
| 789 } | 787 } |
| 790 } | 788 } |
| OLD | NEW |