| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//testing/test.gni") |
| |
| component("cast") { |
| deps = [ |
| ":sender", |
| ":receiver", |
| ] |
| } |
| |
| # Common code shared by all cast components. |
| source_set("common") { |
| sources = [ |
| "cast_config.cc", |
| "cast_config.h", |
| "cast_defines.h", |
| "cast_environment.cc", |
| "cast_environment.h", |
| "common/clock_drift_smoother.cc", |
| "common/clock_drift_smoother.h", |
| "common/transport_encryption_handler.cc", |
| "common/transport_encryption_handler.h", |
| "logging/encoding_event_subscriber.cc", |
| "logging/encoding_event_subscriber.h", |
| "logging/log_deserializer.cc", |
| "logging/log_deserializer.h", |
| "logging/log_serializer.cc", |
| "logging/log_serializer.h", |
| "logging/logging_defines.cc", |
| "logging/logging_defines.h", |
| "logging/logging_impl.cc", |
| "logging/logging_impl.h", |
| "logging/logging_raw.cc", |
| "logging/logging_raw.h", |
| "logging/raw_event_subscriber.h", |
| "logging/raw_event_subscriber_bundle.cc", |
| "logging/raw_event_subscriber_bundle.h", |
| "logging/receiver_time_offset_estimator.h", |
| "logging/receiver_time_offset_estimator_impl.cc", |
| "logging/receiver_time_offset_estimator_impl.h", |
| "logging/simple_event_subscriber.cc", |
| "logging/simple_event_subscriber.h", |
| "logging/stats_event_subscriber.cc", |
| "logging/stats_event_subscriber.h", |
| ] |
| |
| public_deps = [ |
| "//media/cast/logging/proto", |
| ] |
| deps = [ |
| "//base", |
| "//crypto", |
| "//net", |
| "//third_party/zlib", |
| ] |
| } |
| |
| source_set("net") { |
| sources = [ |
| "net/cast_transport_config.cc", |
| "net/cast_transport_config.h", |
| "net/cast_transport_defines.h", |
| "net/cast_transport_sender.h", |
| "net/cast_transport_sender_impl.cc", |
| "net/cast_transport_sender_impl.h", |
| "net/pacing/paced_sender.cc", |
| "net/pacing/paced_sender.h", |
| "net/rtcp/receiver_rtcp_event_subscriber.cc", |
| "net/rtcp/rtcp.cc", |
| "net/rtcp/rtcp.h", |
| "net/rtcp/rtcp_builder.cc", |
| "net/rtcp/rtcp_builder.h", |
| "net/rtcp/rtcp_defines.cc", |
| "net/rtcp/rtcp_defines.h", |
| "net/rtcp/rtcp_utility.cc", |
| "net/rtcp/rtcp_utility.h", |
| "net/rtp/cast_message_builder.cc", |
| "net/rtp/cast_message_builder.h", |
| "net/rtp/frame_buffer.cc", |
| "net/rtp/frame_buffer.h", |
| "net/rtp/framer.cc", |
| "net/rtp/framer.h", |
| "net/rtp/packet_storage.cc", |
| "net/rtp/packet_storage.h", |
| "net/rtp/receiver_stats.cc", |
| "net/rtp/receiver_stats.h", |
| "net/rtp/rtp_packetizer.cc", |
| "net/rtp/rtp_packetizer.h", |
| "net/rtp/rtp_parser.cc", |
| "net/rtp/rtp_parser.h", |
| "net/rtp/rtp_receiver_defines.cc", |
| "net/rtp/rtp_receiver_defines.h", |
| "net/rtp/rtp_sender.cc", |
| "net/rtp/rtp_sender.h", |
| "net/udp_transport.cc", |
| "net/udp_transport.h", |
| ] |
| |
| deps = [ |
| ":common", |
| ] |
| } |
| |
| source_set("sender") { |
| sources = [ |
| "cast_sender.h", |
| "cast_sender_impl.cc", |
| "cast_sender_impl.h", |
| "sender/audio_encoder.cc", |
| "sender/audio_encoder.h", |
| "sender/audio_sender.cc", |
| "sender/audio_sender.h", |
| "sender/congestion_control.cc", |
| "sender/congestion_control.h", |
| "sender/external_video_encoder.cc", |
| "sender/external_video_encoder.h", |
| "sender/fake_software_video_encoder.cc", |
| "sender/fake_software_video_encoder.h", |
| "sender/frame_sender.cc", |
| "sender/frame_sender.h", |
| "sender/size_adaptable_video_encoder_base.cc", |
| "sender/size_adaptable_video_encoder_base.h", |
| "sender/software_video_encoder.h", |
| "sender/video_encoder.cc", |
| "sender/video_encoder.h", |
| "sender/video_encoder_impl.cc", |
| "sender/video_encoder_impl.h", |
| "sender/video_frame_factory.h", |
| "sender/video_sender.cc", |
| "sender/video_sender.h", |
| "sender/vp8_encoder.cc", |
| "sender/vp8_encoder.h", |
| ] |
| |
| deps = [ |
| ":common", |
| ":net", |
| "//media", |
| "//media:shared_memory_support", |
| "//third_party/libvpx", |
| "//third_party/opus", |
| "//ui/gfx/geometry", |
| ] |
| |
| # use a restricted subset of media and no software codecs on iOS |
| if (is_ios) { |
| deps += [ "//media:media_for_cast_ios" ] |
| deps -= [ |
| "//media", |
| "//third_party/libvpx", |
| "//third_party/opus", |
| ] |
| sources -= [ |
| "sender/external_video_encoder.cc", |
| "sender/external_video_encoder.h", |
| "sender/video_encoder_impl.cc", |
| "sender/video_encoder_impl.h", |
| "sender/vp8_encoder.cc", |
| "sender/vp8_encoder.h", |
| ] |
| } |
| |
| # iOS and OS X encoders |
| if (is_ios || is_mac) { |
| sources += [ |
| "sender/h264_vt_encoder.cc", |
| "sender/h264_vt_encoder.h", |
| ] |
| } |
| } |
| |
| source_set("receiver") { |
| sources = [ |
| "cast_receiver.h", |
| "receiver/audio_decoder.cc", |
| "receiver/audio_decoder.h", |
| "receiver/cast_receiver_impl.cc", |
| "receiver/cast_receiver_impl.h", |
| "receiver/frame_receiver.cc", |
| "receiver/frame_receiver.h", |
| "receiver/video_decoder.cc", |
| "receiver/video_decoder.h", |
| ] |
| |
| deps = [ |
| ":common", |
| ":net", |
| "//media", |
| "//media:shared_memory_support", |
| "//third_party/libvpx", |
| "//third_party/opus", |
| "//ui/gfx", |
| ] |
| |
| # use a restricted subset of media and no software codecs on iOS |
| if (is_ios) { |
| deps += [ "//media:media_for_cast_ios" ] |
| deps -= [ |
| "//media", |
| "//third_party/libvpx", |
| "//third_party/opus", |
| ] |
| } |
| } |
| |
| static_library("test_support") { |
| testonly = true |
| sources = [ |
| # TODO(hclam): FFmpeg. |
| # "test/fake_media_source.cc", |
| # "test/fake_media_source.h", |
| "test/fake_single_thread_task_runner.cc", |
| "test/fake_single_thread_task_runner.h", |
| "test/loopback_transport.cc", |
| "test/loopback_transport.h", |
| "test/skewed_single_thread_task_runner.cc", |
| "test/skewed_single_thread_task_runner.h", |
| "test/skewed_tick_clock.cc", |
| "test/skewed_tick_clock.h", |
| "test/utility/audio_utility.cc", |
| "test/utility/audio_utility.h", |
| "test/utility/barcode.cc", |
| "test/utility/barcode.h", |
| "test/utility/default_config.cc", |
| "test/utility/default_config.h", |
| "test/utility/in_process_receiver.cc", |
| "test/utility/in_process_receiver.h", |
| "test/utility/input_builder.cc", |
| "test/utility/input_builder.h", |
| "test/utility/net_utility.cc", |
| "test/utility/net_utility.h", |
| "test/utility/standalone_cast_environment.cc", |
| "test/utility/standalone_cast_environment.h", |
| "test/utility/udp_proxy.cc", |
| "test/utility/udp_proxy.h", |
| "test/utility/video_utility.cc", |
| "test/utility/video_utility.h", |
| ] |
| |
| deps = [ |
| ":net", |
| ":receiver", |
| "//base/test:test_support", |
| "//testing/gtest", |
| |
| # TODO(hclam): Does not build on ARM yet. |
| # "//third_party/ffmpeg", |
| "//third_party/libyuv", |
| "//third_party/mt19937ar", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| ] |
| } |
| |
| test("cast_unittests") { |
| sources = [ |
| "logging/encoding_event_subscriber_unittest.cc", |
| "logging/logging_impl_unittest.cc", |
| "logging/logging_raw_unittest.cc", |
| "logging/receiver_time_offset_estimator_impl_unittest.cc", |
| "logging/serialize_deserialize_test.cc", |
| "logging/simple_event_subscriber_unittest.cc", |
| "logging/stats_event_subscriber_unittest.cc", |
| "net/cast_transport_sender_impl_unittest.cc", |
| "net/mock_cast_transport_sender.cc", |
| "net/mock_cast_transport_sender.h", |
| "net/pacing/mock_paced_packet_sender.cc", |
| "net/pacing/mock_paced_packet_sender.h", |
| "net/pacing/paced_sender_unittest.cc", |
| "net/rtcp/receiver_rtcp_event_subscriber_unittest.cc", |
| "net/rtcp/rtcp_builder_unittest.cc", |
| "net/rtcp/rtcp_unittest.cc", |
| "net/rtcp/rtcp_utility_unittest.cc", |
| |
| # TODO(miu): The following two are test utility modules. Rename/move the files. |
| "net/rtcp/test_rtcp_packet_builder.cc", |
| "net/rtcp/test_rtcp_packet_builder.h", |
| "net/rtp/cast_message_builder_unittest.cc", |
| "net/rtp/frame_buffer_unittest.cc", |
| "net/rtp/framer_unittest.cc", |
| "net/rtp/mock_rtp_payload_feedback.cc", |
| "net/rtp/mock_rtp_payload_feedback.h", |
| "net/rtp/packet_storage_unittest.cc", |
| "net/rtp/receiver_stats_unittest.cc", |
| "net/rtp/rtp_header_parser.cc", |
| "net/rtp/rtp_header_parser.h", |
| "net/rtp/rtp_packet_builder.cc", |
| "net/rtp/rtp_packetizer_unittest.cc", |
| "net/rtp/rtp_parser_unittest.cc", |
| "net/rtp/rtp_receiver_defines.h", |
| "net/udp_transport_unittest.cc", |
| "receiver/audio_decoder_unittest.cc", |
| "receiver/frame_receiver_unittest.cc", |
| "receiver/video_decoder_unittest.cc", |
| "sender/audio_encoder_unittest.cc", |
| "sender/audio_sender_unittest.cc", |
| "sender/congestion_control_unittest.cc", |
| "sender/fake_video_encode_accelerator_factory.cc", |
| "sender/fake_video_encode_accelerator_factory.h", |
| "sender/video_encoder_unittest.cc", |
| "sender/video_sender_unittest.cc", |
| "test/end2end_unittest.cc", |
| "test/fake_receiver_time_offset_estimator.cc", |
| "test/fake_receiver_time_offset_estimator.h", |
| "test/utility/audio_utility_unittest.cc", |
| "test/utility/barcode_unittest.cc", |
| ] |
| |
| deps = [ |
| ":common", |
| ":receiver", |
| ":sender", |
| ":test_support", |
| "//base/test:run_all_unittests", |
| "//base/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |
| |
| if (is_ios || is_mac) { |
| test("cast_h264_vt_encoder_unittests") { |
| sources = [ |
| "sender/h264_vt_encoder_unittest.cc", |
| ] |
| deps = [ |
| ":common", |
| ":sender", |
| ":test_support", |
| "//base/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/ffmpeg", |
| ] |
| } |
| } |
| |
| executable("generate_barcode_video") { |
| testonly = true |
| sources = [ |
| "test/utility/generate_barcode_video.cc", |
| ] |
| |
| deps = [ |
| ":test_support", |
| "//base", |
| "//media", |
| ] |
| } |
| |
| executable("generate_timecode_audio") { |
| testonly = true |
| sources = [ |
| "test/utility/generate_timecode_audio.cc", |
| ] |
| |
| deps = [ |
| ":test_support", |
| "//base", |
| "//media", |
| ] |
| } |
| |
| executable("udp_proxy") { |
| testonly = true |
| sources = [ |
| "test/utility/udp_proxy_main.cc", |
| ] |
| |
| deps = [ |
| ":test_support", |
| "//base", |
| "//net", |
| ] |
| } |