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