1*d9f75844SAndroid Build Coastguard Worker# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. 2*d9f75844SAndroid Build Coastguard Worker# 3*d9f75844SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license 4*d9f75844SAndroid Build Coastguard Worker# that can be found in the LICENSE file in the root of the source 5*d9f75844SAndroid Build Coastguard Worker# tree. An additional intellectual property rights grant can be found 6*d9f75844SAndroid Build Coastguard Worker# in the file PATENTS. All contributing project authors may 7*d9f75844SAndroid Build Coastguard Worker# be found in the AUTHORS file in the root of the source tree. 8*d9f75844SAndroid Build Coastguard Worker 9*d9f75844SAndroid Build Coastguard Workerimport("../../webrtc.gni") 10*d9f75844SAndroid Build Coastguard Worker 11*d9f75844SAndroid Build Coastguard Workerrtc_library("column_printer") { 12*d9f75844SAndroid Build Coastguard Worker testonly = true 13*d9f75844SAndroid Build Coastguard Worker sources = [ 14*d9f75844SAndroid Build Coastguard Worker "column_printer.cc", 15*d9f75844SAndroid Build Coastguard Worker "column_printer.h", 16*d9f75844SAndroid Build Coastguard Worker ] 17*d9f75844SAndroid Build Coastguard Worker deps = [ 18*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:macromagic", 19*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:stringutils", 20*d9f75844SAndroid Build Coastguard Worker "../logging:log_writer", 21*d9f75844SAndroid Build Coastguard Worker ] 22*d9f75844SAndroid Build Coastguard Worker} 23*d9f75844SAndroid Build Coastguard Worker 24*d9f75844SAndroid Build Coastguard Workerif (rtc_include_tests && !build_with_chromium) { 25*d9f75844SAndroid Build Coastguard Worker scenario_resources = [ 26*d9f75844SAndroid Build Coastguard Worker "../../resources/difficult_photo_1850_1110.yuv", 27*d9f75844SAndroid Build Coastguard Worker "../../resources/photo_1850_1110.yuv", 28*d9f75844SAndroid Build Coastguard Worker "../../resources/presentation_1850_1110.yuv", 29*d9f75844SAndroid Build Coastguard Worker "../../resources/web_screenshot_1850_1110.yuv", 30*d9f75844SAndroid Build Coastguard Worker ] 31*d9f75844SAndroid Build Coastguard Worker scenario_unittest_resources = [ "../../resources/foreman_cif.yuv" ] 32*d9f75844SAndroid Build Coastguard Worker 33*d9f75844SAndroid Build Coastguard Worker if (is_ios) { 34*d9f75844SAndroid Build Coastguard Worker bundle_data("scenario_resources_bundle_data") { 35*d9f75844SAndroid Build Coastguard Worker testonly = true 36*d9f75844SAndroid Build Coastguard Worker sources = scenario_resources 37*d9f75844SAndroid Build Coastguard Worker outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] 38*d9f75844SAndroid Build Coastguard Worker } 39*d9f75844SAndroid Build Coastguard Worker bundle_data("scenario_unittest_resources_bundle_data") { 40*d9f75844SAndroid Build Coastguard Worker testonly = true 41*d9f75844SAndroid Build Coastguard Worker sources = scenario_unittest_resources 42*d9f75844SAndroid Build Coastguard Worker outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] 43*d9f75844SAndroid Build Coastguard Worker } 44*d9f75844SAndroid Build Coastguard Worker } 45*d9f75844SAndroid Build Coastguard Worker 46*d9f75844SAndroid Build Coastguard Worker rtc_library("scenario") { 47*d9f75844SAndroid Build Coastguard Worker testonly = true 48*d9f75844SAndroid Build Coastguard Worker sources = [ 49*d9f75844SAndroid Build Coastguard Worker "audio_stream.cc", 50*d9f75844SAndroid Build Coastguard Worker "audio_stream.h", 51*d9f75844SAndroid Build Coastguard Worker "call_client.cc", 52*d9f75844SAndroid Build Coastguard Worker "call_client.h", 53*d9f75844SAndroid Build Coastguard Worker "hardware_codecs.cc", 54*d9f75844SAndroid Build Coastguard Worker "hardware_codecs.h", 55*d9f75844SAndroid Build Coastguard Worker "network_node.cc", 56*d9f75844SAndroid Build Coastguard Worker "network_node.h", 57*d9f75844SAndroid Build Coastguard Worker "performance_stats.cc", 58*d9f75844SAndroid Build Coastguard Worker "performance_stats.h", 59*d9f75844SAndroid Build Coastguard Worker "scenario.cc", 60*d9f75844SAndroid Build Coastguard Worker "scenario.h", 61*d9f75844SAndroid Build Coastguard Worker "scenario_config.cc", 62*d9f75844SAndroid Build Coastguard Worker "scenario_config.h", 63*d9f75844SAndroid Build Coastguard Worker "stats_collection.cc", 64*d9f75844SAndroid Build Coastguard Worker "stats_collection.h", 65*d9f75844SAndroid Build Coastguard Worker "video_frame_matcher.cc", 66*d9f75844SAndroid Build Coastguard Worker "video_frame_matcher.h", 67*d9f75844SAndroid Build Coastguard Worker "video_stream.cc", 68*d9f75844SAndroid Build Coastguard Worker "video_stream.h", 69*d9f75844SAndroid Build Coastguard Worker ] 70*d9f75844SAndroid Build Coastguard Worker deps = [ 71*d9f75844SAndroid Build Coastguard Worker ":column_printer", 72*d9f75844SAndroid Build Coastguard Worker "../:fake_video_codecs", 73*d9f75844SAndroid Build Coastguard Worker "../:fileutils", 74*d9f75844SAndroid Build Coastguard Worker "../:test_common", 75*d9f75844SAndroid Build Coastguard Worker "../:test_support", 76*d9f75844SAndroid Build Coastguard Worker "../:video_test_common", 77*d9f75844SAndroid Build Coastguard Worker "../../api:create_frame_generator", 78*d9f75844SAndroid Build Coastguard Worker "../../api:fec_controller_api", 79*d9f75844SAndroid Build Coastguard Worker "../../api:frame_generator_api", 80*d9f75844SAndroid Build Coastguard Worker "../../api:libjingle_peerconnection_api", 81*d9f75844SAndroid Build Coastguard Worker "../../api:rtc_event_log_output_file", 82*d9f75844SAndroid Build Coastguard Worker "../../api:rtp_parameters", 83*d9f75844SAndroid Build Coastguard Worker "../../api:sequence_checker", 84*d9f75844SAndroid Build Coastguard Worker "../../api:time_controller", 85*d9f75844SAndroid Build Coastguard Worker "../../api:time_controller", 86*d9f75844SAndroid Build Coastguard Worker "../../api:transport_api", 87*d9f75844SAndroid Build Coastguard Worker "../../api/audio_codecs:builtin_audio_decoder_factory", 88*d9f75844SAndroid Build Coastguard Worker "../../api/audio_codecs:builtin_audio_encoder_factory", 89*d9f75844SAndroid Build Coastguard Worker "../../api/rtc_event_log", 90*d9f75844SAndroid Build Coastguard Worker "../../api/rtc_event_log:rtc_event_log_factory", 91*d9f75844SAndroid Build Coastguard Worker "../../api/task_queue", 92*d9f75844SAndroid Build Coastguard Worker "../../api/test/video:function_video_factory", 93*d9f75844SAndroid Build Coastguard Worker "../../api/transport:network_control", 94*d9f75844SAndroid Build Coastguard Worker "../../api/units:data_rate", 95*d9f75844SAndroid Build Coastguard Worker "../../api/units:data_size", 96*d9f75844SAndroid Build Coastguard Worker "../../api/units:time_delta", 97*d9f75844SAndroid Build Coastguard Worker "../../api/units:timestamp", 98*d9f75844SAndroid Build Coastguard Worker "../../api/video:builtin_video_bitrate_allocator_factory", 99*d9f75844SAndroid Build Coastguard Worker "../../api/video:video_frame", 100*d9f75844SAndroid Build Coastguard Worker "../../api/video:video_rtp_headers", 101*d9f75844SAndroid Build Coastguard Worker "../../api/video_codecs:scalability_mode", 102*d9f75844SAndroid Build Coastguard Worker "../../api/video_codecs:video_codecs_api", 103*d9f75844SAndroid Build Coastguard Worker "../../audio", 104*d9f75844SAndroid Build Coastguard Worker "../../call", 105*d9f75844SAndroid Build Coastguard Worker "../../call:call_interfaces", 106*d9f75844SAndroid Build Coastguard Worker "../../call:rtp_sender", 107*d9f75844SAndroid Build Coastguard Worker "../../call:simulated_network", 108*d9f75844SAndroid Build Coastguard Worker "../../call:video_stream_api", 109*d9f75844SAndroid Build Coastguard Worker "../../common_video", 110*d9f75844SAndroid Build Coastguard Worker "../../media:rtc_audio_video", 111*d9f75844SAndroid Build Coastguard Worker "../../media:rtc_internal_video_codecs", 112*d9f75844SAndroid Build Coastguard Worker "../../media:rtc_media_base", 113*d9f75844SAndroid Build Coastguard Worker "../../modules/audio_device", 114*d9f75844SAndroid Build Coastguard Worker "../../modules/audio_device:audio_device_impl", 115*d9f75844SAndroid Build Coastguard Worker "../../modules/audio_device:mock_audio_device", 116*d9f75844SAndroid Build Coastguard Worker "../../modules/audio_mixer:audio_mixer_impl", 117*d9f75844SAndroid Build Coastguard Worker "../../modules/audio_processing", 118*d9f75844SAndroid Build Coastguard Worker "../../modules/congestion_controller/goog_cc:test_goog_cc_printer", 119*d9f75844SAndroid Build Coastguard Worker "../../modules/rtp_rtcp", 120*d9f75844SAndroid Build Coastguard Worker "../../modules/rtp_rtcp:mock_rtp_rtcp", 121*d9f75844SAndroid Build Coastguard Worker "../../modules/rtp_rtcp:rtp_rtcp_format", 122*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding:video_codec_interface", 123*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding:video_coding_utility", 124*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding:webrtc_h264", 125*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding:webrtc_multiplex", 126*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding:webrtc_vp8", 127*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding:webrtc_vp9", 128*d9f75844SAndroid Build Coastguard Worker "../../modules/video_coding/svc:scalability_mode_util", 129*d9f75844SAndroid Build Coastguard Worker "../../rtc_base", 130*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:checks", 131*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:copy_on_write_buffer", 132*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:refcount", 133*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:rtc_base_tests_utils", 134*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:rtc_event", 135*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:rtc_numerics", 136*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:rtc_stats_counters", 137*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:safe_minmax", 138*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:socket_address", 139*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:task_queue_for_test", 140*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:threading", 141*d9f75844SAndroid Build Coastguard Worker "../../rtc_base/synchronization:mutex", 142*d9f75844SAndroid Build Coastguard Worker "../../rtc_base/task_utils:repeating_task", 143*d9f75844SAndroid Build Coastguard Worker "../../system_wrappers", 144*d9f75844SAndroid Build Coastguard Worker "../../system_wrappers:field_trial", 145*d9f75844SAndroid Build Coastguard Worker "../../video/config:streams_config", 146*d9f75844SAndroid Build Coastguard Worker "../logging:log_writer", 147*d9f75844SAndroid Build Coastguard Worker "../network:emulated_network", 148*d9f75844SAndroid Build Coastguard Worker "../time_controller", 149*d9f75844SAndroid Build Coastguard Worker ] 150*d9f75844SAndroid Build Coastguard Worker absl_deps = [ 151*d9f75844SAndroid Build Coastguard Worker "//third_party/abseil-cpp/absl/flags:flag", 152*d9f75844SAndroid Build Coastguard Worker "//third_party/abseil-cpp/absl/flags:parse", 153*d9f75844SAndroid Build Coastguard Worker "//third_party/abseil-cpp/absl/functional:any_invocable", 154*d9f75844SAndroid Build Coastguard Worker "//third_party/abseil-cpp/absl/memory", 155*d9f75844SAndroid Build Coastguard Worker "//third_party/abseil-cpp/absl/strings", 156*d9f75844SAndroid Build Coastguard Worker "//third_party/abseil-cpp/absl/types:optional", 157*d9f75844SAndroid Build Coastguard Worker ] 158*d9f75844SAndroid Build Coastguard Worker if (is_android) { 159*d9f75844SAndroid Build Coastguard Worker deps += [ "../../modules/video_coding:android_codec_factory_helper" ] 160*d9f75844SAndroid Build Coastguard Worker } else if (is_ios || is_mac) { 161*d9f75844SAndroid Build Coastguard Worker deps += [ "../../modules/video_coding:objc_codec_factory_helper" ] 162*d9f75844SAndroid Build Coastguard Worker } 163*d9f75844SAndroid Build Coastguard Worker if (rtc_enable_protobuf) { 164*d9f75844SAndroid Build Coastguard Worker deps += [ "../../modules/audio_coding:ana_config_proto" ] 165*d9f75844SAndroid Build Coastguard Worker } 166*d9f75844SAndroid Build Coastguard Worker data = scenario_resources 167*d9f75844SAndroid Build Coastguard Worker if (is_ios) { 168*d9f75844SAndroid Build Coastguard Worker deps += [ ":scenario_resources_bundle_data" ] 169*d9f75844SAndroid Build Coastguard Worker } 170*d9f75844SAndroid Build Coastguard Worker } 171*d9f75844SAndroid Build Coastguard Worker rtc_library("scenario_unittests") { 172*d9f75844SAndroid Build Coastguard Worker testonly = true 173*d9f75844SAndroid Build Coastguard Worker sources = [ 174*d9f75844SAndroid Build Coastguard Worker "performance_stats_unittest.cc", 175*d9f75844SAndroid Build Coastguard Worker "probing_test.cc", 176*d9f75844SAndroid Build Coastguard Worker "scenario_unittest.cc", 177*d9f75844SAndroid Build Coastguard Worker "stats_collection_unittest.cc", 178*d9f75844SAndroid Build Coastguard Worker "video_stream_unittest.cc", 179*d9f75844SAndroid Build Coastguard Worker ] 180*d9f75844SAndroid Build Coastguard Worker deps = [ 181*d9f75844SAndroid Build Coastguard Worker ":scenario", 182*d9f75844SAndroid Build Coastguard Worker "../../api/test/network_emulation", 183*d9f75844SAndroid Build Coastguard Worker "../../api/test/network_emulation:create_cross_traffic", 184*d9f75844SAndroid Build Coastguard Worker "../../logging:mocks", 185*d9f75844SAndroid Build Coastguard Worker "../../rtc_base:checks", 186*d9f75844SAndroid Build Coastguard Worker "../../system_wrappers", 187*d9f75844SAndroid Build Coastguard Worker "../../system_wrappers:field_trial", 188*d9f75844SAndroid Build Coastguard Worker "../../test:field_trial", 189*d9f75844SAndroid Build Coastguard Worker "../../test:test_support", 190*d9f75844SAndroid Build Coastguard Worker "../logging:log_writer", 191*d9f75844SAndroid Build Coastguard Worker "//testing/gmock", 192*d9f75844SAndroid Build Coastguard Worker ] 193*d9f75844SAndroid Build Coastguard Worker data = scenario_unittest_resources 194*d9f75844SAndroid Build Coastguard Worker if (is_ios) { 195*d9f75844SAndroid Build Coastguard Worker deps += [ ":scenario_unittest_resources_bundle_data" ] 196*d9f75844SAndroid Build Coastguard Worker } 197*d9f75844SAndroid Build Coastguard Worker } 198*d9f75844SAndroid Build Coastguard Worker} 199