diff options
author | Erik Språng <sprang@webrtc.org> | 2018-03-14 15:16:50 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-03-14 17:03:25 +0000 |
commit | 097085140e8258a1e3a3ff73c1725e5163c04b93 (patch) | |
tree | dfaf0124b14d3cf80c9760b35f795c2639a7b540 /call/BUILD.gn | |
parent | d00c8951cd8a912d09ddefd0a4b52bcd9f7ec087 (diff) | |
download | webrtc-097085140e8258a1e3a3ff73c1725e5163c04b93.tar.gz |
Reland: Add ability to emulate degraded network in Call via field trial
This is especially useful in Chrome, allowing use to emulate network
conditions in incoming or outgoing media without the need for platform
specific tools or hacks. It also doesn't interfere with the rest of the
network traffic.
Also includes some refactorings.
TBR=stefan@webrtc.org, philipel@webrtc.org
Originally reviewed on: https://webrtc-review.googlesource.com/33013
Bug: webrtc:8910
Change-Id: I162dde5fa20a260b41e5187fcf30b49f5e6fb0e0
Reviewed-on: https://webrtc-review.googlesource.com/61782
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22430}
Diffstat (limited to 'call/BUILD.gn')
-rw-r--r-- | call/BUILD.gn | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/call/BUILD.gn b/call/BUILD.gn index b9a6dc1cad..e447d3765c 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -143,6 +143,8 @@ rtc_static_library("call") { "call.cc", "callfactory.cc", "callfactory.h", + "degraded_call.cc", + "degraded_call.h", "flexfec_receive_stream_impl.cc", "flexfec_receive_stream_impl.h", ] @@ -155,6 +157,7 @@ rtc_static_library("call") { deps = [ ":bitrate_allocator", ":call_interfaces", + ":fake_network", ":rtp_interfaces", ":rtp_receiver", ":rtp_sender", @@ -184,6 +187,7 @@ rtc_static_library("call") { "../rtc_base:safe_minmax", "../rtc_base:sequenced_task_checker", "../system_wrappers", + "../system_wrappers:field_trial_api", "../system_wrappers:metrics_api", "../video", ] @@ -213,6 +217,29 @@ rtc_source_set("video_stream_api") { ] } +rtc_source_set("fake_network") { + sources = [ + "fake_network_pipe.cc", + "fake_network_pipe.h", + ] + deps = [ + ":call_interfaces", + "..:typedefs", + "..:webrtc_common", + "../api:transport_api", + "../modules:module_api", + "../modules/rtp_rtcp", + "../rtc_base:rtc_base_approved", + "../rtc_base:sequenced_task_checker", + "../system_wrappers", + ] + + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } +} + if (rtc_include_tests) { rtc_source_set("call_tests") { testonly = true @@ -340,4 +367,24 @@ if (rtc_include_tests) { "//test:test_support", ] } + + rtc_test("fake_network_unittests") { + deps = [ + ":call_interfaces", + ":fake_network", + "../modules/rtp_rtcp", + "../rtc_base:rtc_base_approved", + "../system_wrappers", + "../test:test_common", + "../test:test_main", + "//testing/gtest", + ] + sources = [ + "test/fake_network_pipe_unittest.cc", + ] + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } } |