mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Move call/simulated_network to test/network
Old target and call/simulated.h exist but refer to new target in test/network. Bug: webrtc:14525 Change-Id: Ida04cef17913f2f829d7e925ae454dc40d5e8240 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349264 Commit-Queue: Per Kjellander <perkj@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Owners-Override: Per Kjellander <perkj@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42191}
This commit is contained in:
parent
c21a150b25
commit
569849e885
49 changed files with 233 additions and 195 deletions
|
@ -865,7 +865,7 @@ rtc_source_set("network_emulation_manager_api") {
|
|||
":peer_network_dependencies",
|
||||
":simulated_network_api",
|
||||
":time_controller",
|
||||
"../call:simulated_network",
|
||||
"..//test/network:simulated_network",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:network",
|
||||
"../rtc_base:network_constants",
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
|
|
@ -134,7 +134,6 @@ if (rtc_include_tests) {
|
|||
"../api/audio:audio_device",
|
||||
"../api/task_queue",
|
||||
"../call:fake_network",
|
||||
"../call:simulated_network",
|
||||
"../modules/audio_device:test_audio_device_module",
|
||||
"../system_wrappers",
|
||||
"../test:test_common",
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include "api/task_queue/task_queue_base.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/audio_device/include/test_audio_device.h"
|
||||
#include "system_wrappers/include/sleep.h"
|
||||
#include "test/gtest.h"
|
||||
|
|
|
@ -336,6 +336,7 @@ rtc_library("call") {
|
|||
"../system_wrappers",
|
||||
"../system_wrappers:field_trial",
|
||||
"../system_wrappers:metrics",
|
||||
"../test/network:simulated_network",
|
||||
"../video",
|
||||
"../video:decode_synchronizer",
|
||||
"../video/config:encoder_config",
|
||||
|
@ -399,24 +400,9 @@ rtc_library("video_stream_api") {
|
|||
}
|
||||
|
||||
rtc_library("simulated_network") {
|
||||
sources = [
|
||||
"simulated_network.cc",
|
||||
"simulated_network.h",
|
||||
]
|
||||
deps = [
|
||||
"../api:sequence_checker",
|
||||
"../api:simulated_network_api",
|
||||
"../api/units:data_rate",
|
||||
"../api/units:data_size",
|
||||
"../api/units:time_delta",
|
||||
"../api/units:timestamp",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:macromagic",
|
||||
"../rtc_base:race_checker",
|
||||
"../rtc_base:random",
|
||||
"../rtc_base/synchronization:mutex",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
# TODO(bugs.webrtc.org/14525): Remove target and directly depend on test/network:simulated_network.
|
||||
sources = [ "simulated_network.h" ]
|
||||
deps = [ "../test/network:simulated_network" ]
|
||||
}
|
||||
|
||||
rtc_source_set("simulated_packet_receiver") {
|
||||
|
@ -434,7 +420,6 @@ rtc_library("fake_network") {
|
|||
]
|
||||
deps = [
|
||||
":call_interfaces",
|
||||
":simulated_network",
|
||||
":simulated_packet_receiver",
|
||||
"../api:rtp_parameters",
|
||||
"../api:sequence_checker",
|
||||
|
@ -447,6 +432,7 @@ rtc_library("fake_network") {
|
|||
"../rtc_base:macromagic",
|
||||
"../rtc_base/synchronization:mutex",
|
||||
"../system_wrappers",
|
||||
"../test/network:simulated_network",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -606,6 +592,7 @@ if (rtc_include_tests) {
|
|||
"../test:test_support",
|
||||
"../test:video_test_common",
|
||||
"../test:video_test_constants",
|
||||
"../test/network:simulated_network",
|
||||
"../video",
|
||||
"../video/config:encoder_config",
|
||||
"//testing/gtest",
|
||||
|
@ -663,13 +650,9 @@ if (rtc_include_tests) {
|
|||
rtc_library("fake_network_pipe_unittests") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"fake_network_pipe_unittest.cc",
|
||||
"simulated_network_unittest.cc",
|
||||
]
|
||||
sources = [ "fake_network_pipe_unittest.cc" ]
|
||||
deps = [
|
||||
":fake_network",
|
||||
":simulated_network",
|
||||
"../api:simulated_network_api",
|
||||
"../api/units:data_rate",
|
||||
"../api/units:time_delta",
|
||||
|
@ -678,6 +661,7 @@ if (rtc_include_tests) {
|
|||
"../rtc_base:checks",
|
||||
"../system_wrappers",
|
||||
"../test:test_support",
|
||||
"../test/network:simulated_network",
|
||||
"//testing/gtest",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/algorithm:container" ]
|
||||
|
|
|
@ -28,5 +28,9 @@ specific_include_rules = {
|
|||
],
|
||||
"call_perf_tests\.cc": [
|
||||
"+media/engine",
|
||||
],
|
||||
"simulated_network\.h": [
|
||||
"+test/network/simulated_network.h",
|
||||
]
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "absl/strings/string_view.h"
|
||||
#include "api/test/create_frame_generator.h"
|
||||
#include "call/call.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "call/call.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "media/engine/internal_encoder_factory.h"
|
||||
#include "media/engine/simulcast_encoder_adapter.h"
|
||||
#include "modules/audio_coding/include/audio_coding_module.h"
|
||||
|
@ -51,6 +50,7 @@
|
|||
#include "test/field_trial.h"
|
||||
#include "test/frame_generator_capturer.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/null_transport.h"
|
||||
#include "test/rtp_rtcp_observer.h"
|
||||
#include "test/test_flags.h"
|
||||
|
|
|
@ -34,12 +34,12 @@
|
|||
#include "call/flexfec_receive_stream.h"
|
||||
#include "call/packet_receiver.h"
|
||||
#include "call/rtp_transport_controller_send_interface.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "call/video_receive_stream.h"
|
||||
#include "call/video_send_stream.h"
|
||||
#include "rtc_base/copy_on_write_buffer.h"
|
||||
#include "rtc_base/network/sent_packet.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "video/config/video_encoder_config.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include "api/units/time_delta.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
|
||||
|
@ -23,6 +22,7 @@
|
|||
#include "system_wrappers/include/clock.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::Property;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "api/test/metrics/metric.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "call/call.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/task_utils/repeating_task.h"
|
||||
#include "test/call_test.h"
|
||||
|
|
|
@ -10,125 +10,8 @@
|
|||
#ifndef CALL_SIMULATED_NETWORK_H_
|
||||
#define CALL_SIMULATED_NETWORK_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <deque>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/sequence_checker.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/units/data_size.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "rtc_base/race_checker.h"
|
||||
#include "rtc_base/random.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Class simulating a network link.
|
||||
//
|
||||
// This is a basic implementation of NetworkBehaviorInterface that supports:
|
||||
// - Packet loss
|
||||
// - Capacity delay
|
||||
// - Extra delay with or without packets reorder
|
||||
// - Packet overhead
|
||||
// - Queue max capacity
|
||||
class RTC_EXPORT SimulatedNetwork : public SimulatedNetworkInterface {
|
||||
public:
|
||||
using Config = BuiltInNetworkBehaviorConfig;
|
||||
explicit SimulatedNetwork(Config config, uint64_t random_seed = 1);
|
||||
~SimulatedNetwork() override;
|
||||
|
||||
// Sets a new configuration. This will affect packets that will be sent with
|
||||
// EnqueuePacket but also packets in the network that have not left the
|
||||
// network emulation. Packets that are ready to be retrieved by
|
||||
// DequeueDeliverablePackets are not affected by the new configuration.
|
||||
// TODO(bugs.webrtc.org/14525): Fix SetConfig and make it apply only to the
|
||||
// part of the packet that is currently being sent (instead of applying to
|
||||
// all of it).
|
||||
void SetConfig(const Config& config) override;
|
||||
void UpdateConfig(std::function<void(BuiltInNetworkBehaviorConfig*)>
|
||||
config_modifier) override;
|
||||
void PauseTransmissionUntil(int64_t until_us) override;
|
||||
|
||||
// NetworkBehaviorInterface
|
||||
bool EnqueuePacket(PacketInFlightInfo packet) override;
|
||||
std::vector<PacketDeliveryInfo> DequeueDeliverablePackets(
|
||||
int64_t receive_time_us) override;
|
||||
|
||||
absl::optional<int64_t> NextDeliveryTimeUs() const override;
|
||||
|
||||
private:
|
||||
struct PacketInfo {
|
||||
PacketInFlightInfo packet;
|
||||
// Time when the packet has left (or will leave) the network.
|
||||
int64_t arrival_time_us;
|
||||
};
|
||||
// Contains current configuration state.
|
||||
struct ConfigState {
|
||||
// Static link configuration.
|
||||
Config config;
|
||||
// The probability to drop the packet if we are currently dropping a
|
||||
// burst of packet
|
||||
double prob_loss_bursting;
|
||||
// The probability to drop a burst of packets.
|
||||
double prob_start_bursting;
|
||||
// Used for temporary delay spikes.
|
||||
int64_t pause_transmission_until_us = 0;
|
||||
};
|
||||
|
||||
// Moves packets from capacity- to delay link.
|
||||
void UpdateCapacityQueue(ConfigState state, int64_t time_now_us)
|
||||
RTC_RUN_ON(&process_checker_);
|
||||
ConfigState GetConfigState() const;
|
||||
|
||||
mutable Mutex config_lock_;
|
||||
|
||||
// Guards the data structures involved in delay and loss processing, such as
|
||||
// the packet queues.
|
||||
rtc::RaceChecker process_checker_;
|
||||
// Models the capacity of the network by rejecting packets if the queue is
|
||||
// full and keeping them in the queue until they are ready to exit (according
|
||||
// to the link capacity, which cannot be violated, e.g. a 1 kbps link will
|
||||
// only be able to deliver 1000 bits per second).
|
||||
//
|
||||
// Invariant:
|
||||
// The head of the `capacity_link_` has arrival_time_us correctly set to the
|
||||
// time when the packet is supposed to be delivered (without accounting
|
||||
// potential packet loss or potential extra delay and without accounting for a
|
||||
// new configuration of the network, which requires a re-computation of the
|
||||
// arrival_time_us).
|
||||
std::queue<PacketInfo> capacity_link_ RTC_GUARDED_BY(process_checker_);
|
||||
// Models the extra delay of the network (see `queue_delay_ms`
|
||||
// and `delay_standard_deviation_ms` in BuiltInNetworkBehaviorConfig), packets
|
||||
// in the `delay_link_` have technically already left the network and don't
|
||||
// use its capacity but they are not delivered yet.
|
||||
std::deque<PacketInfo> delay_link_ RTC_GUARDED_BY(process_checker_);
|
||||
// Represents the next moment in time when the network is supposed to deliver
|
||||
// packets to the client (either by pulling them from `delay_link_` or
|
||||
// `capacity_link_` or both).
|
||||
absl::optional<int64_t> next_process_time_us_
|
||||
RTC_GUARDED_BY(process_checker_);
|
||||
|
||||
ConfigState config_state_ RTC_GUARDED_BY(config_lock_);
|
||||
|
||||
Random random_ RTC_GUARDED_BY(process_checker_);
|
||||
// Are we currently dropping a burst of packets?
|
||||
bool bursting_;
|
||||
|
||||
// The send time of the last enqueued packet, this is only used to check that
|
||||
// the send time of enqueued packets is monotonically increasing.
|
||||
int64_t last_enqueue_time_us_;
|
||||
|
||||
// The last time a packet left the capacity_link_ (used to enforce
|
||||
// the capacity of the link and avoid packets starts to get sent before
|
||||
// the link it free).
|
||||
int64_t last_capacity_link_exit_time_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
// TODO(bugs.webrtc.org/14525): Remove once downstream projects does not use
|
||||
// it.
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
#endif // CALL_SIMULATED_NETWORK_H_
|
||||
|
|
|
@ -236,7 +236,6 @@ if (rtc_include_tests) {
|
|||
"../../../api/task_queue",
|
||||
"../../../api/task_queue:pending_task_safety_flag",
|
||||
"../../../api/units:time_delta",
|
||||
"../../../call:simulated_network",
|
||||
"../../../rtc_base:checks",
|
||||
"../../../rtc_base:copy_on_write_buffer",
|
||||
"../../../rtc_base:gunit_helpers",
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "api/test/create_network_emulation_manager.h"
|
||||
#include "api/test/network_emulation_manager.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "net/dcsctp/public/dcsctp_options.h"
|
||||
#include "net/dcsctp/public/dcsctp_socket.h"
|
||||
#include "net/dcsctp/public/types.h"
|
||||
|
|
|
@ -2833,6 +2833,7 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||
sources = [ "test/svc_e2e_tests.cc" ]
|
||||
data = svc_tests_resources
|
||||
deps = [
|
||||
"..//test/network:simulated_network",
|
||||
"../api:create_network_emulation_manager",
|
||||
"../api:create_peer_connection_quality_test_frame_generator",
|
||||
"../api:create_peerconnection_quality_test_fixture",
|
||||
|
@ -2848,7 +2849,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||
"../api/test/pclf:media_quality_test_params",
|
||||
"../api/test/pclf:peer_configurer",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../call:simulated_network",
|
||||
"../modules/video_coding:webrtc_vp9",
|
||||
"../modules/video_coding/svc:scalability_mode_util",
|
||||
"../rtc_base/containers:flat_map",
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/time_controller.h"
|
||||
#include "api/video_codecs/vp9_profile.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/video_coding/codecs/vp9/include/vp9.h"
|
||||
#include "modules/video_coding/svc/scalability_mode_util.h"
|
||||
#include "rtc_base/containers/flat_map.h"
|
||||
|
@ -35,6 +34,7 @@
|
|||
#include "test/field_trial.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/pc/e2e/analyzer/video/default_video_quality_analyzer.h"
|
||||
#include "test/pc/e2e/network_quality_metrics_reporter.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
|
|
|
@ -201,6 +201,7 @@ if (!is_component_build) {
|
|||
"..//api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter",
|
||||
"..//api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter",
|
||||
"..//api/video_codecs:video_encoder_factory_template_open_h264_adapter",
|
||||
"..//test/network:simulated_network",
|
||||
"../api:create_frame_generator",
|
||||
"../api:rtp_parameters",
|
||||
"../api:transport_api",
|
||||
|
@ -213,7 +214,6 @@ if (!is_component_build) {
|
|||
"../call:fake_network",
|
||||
"../call:rtp_interfaces",
|
||||
"../call:rtp_sender",
|
||||
"../call:simulated_network",
|
||||
"../call:simulated_packet_receiver",
|
||||
"../call:video_stream_api",
|
||||
"../media:media_constants",
|
||||
|
|
|
@ -1266,6 +1266,7 @@ if (!build_with_chromium) {
|
|||
":test_video_capturer",
|
||||
":video_test_common",
|
||||
":video_test_constants",
|
||||
"..//test/network:simulated_network",
|
||||
"../api:array_view",
|
||||
"../api:create_frame_generator",
|
||||
"../api:frame_generator_api",
|
||||
|
@ -1290,7 +1291,6 @@ if (!build_with_chromium) {
|
|||
"../call",
|
||||
"../call:call_interfaces",
|
||||
"../call:fake_network",
|
||||
"../call:simulated_network",
|
||||
"../call:simulated_packet_receiver",
|
||||
"../call:video_stream_api",
|
||||
"../modules/audio_device:test_audio_device_module",
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
#include "api/video/builtin_video_bitrate_allocator_factory.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/packet_receiver.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/audio_device/include/test_audio_device.h"
|
||||
#include "modules/audio_mixer/audio_mixer_impl.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "test/fake_encoder.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtp_rtcp_observer.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
|
|
@ -38,6 +38,7 @@ rtc_library("emulated_network") {
|
|||
"traffic_route.h",
|
||||
]
|
||||
deps = [
|
||||
"../..//test/network:simulated_network",
|
||||
"../../api:array_view",
|
||||
"../../api:field_trials_view",
|
||||
"../../api:network_emulation_manager_api",
|
||||
|
@ -55,7 +56,6 @@ rtc_library("emulated_network") {
|
|||
"../../api/units:data_size",
|
||||
"../../api/units:time_delta",
|
||||
"../../api/units:timestamp",
|
||||
"../../call:simulated_network",
|
||||
"../../p2p:basic_packet_socket_factory",
|
||||
"../../p2p:p2p_server_utils",
|
||||
"../../p2p:rtc_p2p",
|
||||
|
@ -101,9 +101,9 @@ rtc_library("network_emulation_unittest") {
|
|||
deps = [
|
||||
":emulated_network",
|
||||
"../:test_support",
|
||||
"../..//test/network:simulated_network",
|
||||
"../../api:simulated_network_api",
|
||||
"../../api/units:time_delta",
|
||||
"../../call:simulated_network",
|
||||
"../../rtc_base:gunit_helpers",
|
||||
"../../rtc_base:logging",
|
||||
"../../rtc_base:rtc_event",
|
||||
|
@ -119,6 +119,7 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||
deps = [
|
||||
":emulated_network",
|
||||
"../:test_support",
|
||||
"../..//test/network:simulated_network",
|
||||
"../../api:enable_media_with_defaults",
|
||||
"../../api:libjingle_peerconnection_api",
|
||||
"../../api:scoped_refptr",
|
||||
|
@ -126,7 +127,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||
"../../api/rtc_event_log:rtc_event_log_factory",
|
||||
"../../api/task_queue:default_task_queue_factory",
|
||||
"../../api/transport:field_trial_based_config",
|
||||
"../../call:simulated_network",
|
||||
"../../media:rtc_audio_video",
|
||||
"../../modules/audio_device:test_audio_device_module",
|
||||
"../../p2p:basic_packet_socket_factory",
|
||||
|
@ -148,9 +148,9 @@ rtc_library("cross_traffic_unittest") {
|
|||
deps = [
|
||||
":emulated_network",
|
||||
"../:test_support",
|
||||
"../..//test/network:simulated_network",
|
||||
"../../api:network_emulation_manager_api",
|
||||
"../../api:simulated_network_api",
|
||||
"../../call:simulated_network",
|
||||
"../../rtc_base:logging",
|
||||
"../../rtc_base:network_constants",
|
||||
"../../rtc_base:rtc_event",
|
||||
|
@ -171,9 +171,9 @@ if (rtc_include_tests) {
|
|||
]
|
||||
deps = [
|
||||
":emulated_network",
|
||||
"../..//test/network:simulated_network",
|
||||
"../../api/transport:network_control",
|
||||
"../../api/transport:test_feedback_generator_interface",
|
||||
"../../call:simulated_network",
|
||||
"../../rtc_base:checks",
|
||||
"../time_controller",
|
||||
]
|
||||
|
@ -197,7 +197,46 @@ if (rtc_include_tests) {
|
|||
":feedback_generator_unittest",
|
||||
":network_emulation_pc_unittest",
|
||||
":network_emulation_unittest",
|
||||
":simulated_network_unittest",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rtc_library("simulated_network") {
|
||||
sources = [
|
||||
"simulated_network.cc",
|
||||
"simulated_network.h",
|
||||
]
|
||||
deps = [
|
||||
"../../api:sequence_checker",
|
||||
"../../api:simulated_network_api",
|
||||
"../../api/units:data_rate",
|
||||
"../../api/units:data_size",
|
||||
"../../api/units:time_delta",
|
||||
"../../api/units:timestamp",
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base:macromagic",
|
||||
"../../rtc_base:race_checker",
|
||||
"../../rtc_base:random",
|
||||
"../../rtc_base/synchronization:mutex",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
}
|
||||
|
||||
if (rtc_include_tests) {
|
||||
rtc_library("simulated_network_unittest") {
|
||||
testonly = true
|
||||
sources = [ "simulated_network_unittest.cc" ]
|
||||
deps = [
|
||||
":simulated_network",
|
||||
"../:test_support",
|
||||
"../../api:simulated_network_api",
|
||||
"../../api/units:data_rate",
|
||||
"../../api/units:data_size",
|
||||
"../../api/units:time_delta",
|
||||
"//testing/gtest",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/algorithm:container" ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
#include "absl/types/optional.h"
|
||||
#include "api/test/network_emulation_manager.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/network_constants.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/network_emulation_manager.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/network/traffic_route.h"
|
||||
#include "test/time_controller/simulated_time_controller.h"
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
#include "api/transport/network_types.h"
|
||||
#include "api/transport/test/feedback_generator_interface.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "test/network/network_emulation.h"
|
||||
#include "test/network/network_emulation_manager.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/time_controller/simulated_time_controller.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include "api/field_trials_view.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "test/network/emulated_turn_server.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/network/traffic_route.h"
|
||||
#include "test/time_controller/real_time_controller.h"
|
||||
#include "test/time_controller/simulated_time_controller.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "api/scoped_refptr.h"
|
||||
#include "api/task_queue/default_task_queue_factory.h"
|
||||
#include "api/transport/field_trial_based_config.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "media/engine/webrtc_media_engine.h"
|
||||
#include "modules/audio_device/include/test_audio_device.h"
|
||||
#include "p2p/base/basic_packet_socket_factory.h"
|
||||
|
@ -30,6 +29,7 @@
|
|||
#include "test/gtest.h"
|
||||
#include "test/network/network_emulation.h"
|
||||
#include "test/network/network_emulation_manager.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/event.h"
|
||||
#include "rtc_base/gunit.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
|
@ -24,6 +23,7 @@
|
|||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/network_emulation_manager.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "call/simulated_network.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
134
test/network/simulated_network.h
Normal file
134
test/network/simulated_network.h
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef TEST_NETWORK_SIMULATED_NETWORK_H_
|
||||
#define TEST_NETWORK_SIMULATED_NETWORK_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <deque>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/sequence_checker.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/units/data_size.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "rtc_base/race_checker.h"
|
||||
#include "rtc_base/random.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Class simulating a network link.
|
||||
//
|
||||
// This is a basic implementation of NetworkBehaviorInterface that supports:
|
||||
// - Packet loss
|
||||
// - Capacity delay
|
||||
// - Extra delay with or without packets reorder
|
||||
// - Packet overhead
|
||||
// - Queue max capacity
|
||||
class RTC_EXPORT SimulatedNetwork : public SimulatedNetworkInterface {
|
||||
public:
|
||||
using Config = BuiltInNetworkBehaviorConfig;
|
||||
explicit SimulatedNetwork(Config config, uint64_t random_seed = 1);
|
||||
~SimulatedNetwork() override;
|
||||
|
||||
// Sets a new configuration. This will affect packets that will be sent with
|
||||
// EnqueuePacket but also packets in the network that have not left the
|
||||
// network emulation. Packets that are ready to be retrieved by
|
||||
// DequeueDeliverablePackets are not affected by the new configuration.
|
||||
// TODO(bugs.webrtc.org/14525): Fix SetConfig and make it apply only to the
|
||||
// part of the packet that is currently being sent (instead of applying to
|
||||
// all of it).
|
||||
void SetConfig(const Config& config) override;
|
||||
void UpdateConfig(std::function<void(BuiltInNetworkBehaviorConfig*)>
|
||||
config_modifier) override;
|
||||
void PauseTransmissionUntil(int64_t until_us) override;
|
||||
|
||||
// NetworkBehaviorInterface
|
||||
bool EnqueuePacket(PacketInFlightInfo packet) override;
|
||||
std::vector<PacketDeliveryInfo> DequeueDeliverablePackets(
|
||||
int64_t receive_time_us) override;
|
||||
|
||||
absl::optional<int64_t> NextDeliveryTimeUs() const override;
|
||||
|
||||
private:
|
||||
struct PacketInfo {
|
||||
PacketInFlightInfo packet;
|
||||
// Time when the packet has left (or will leave) the network.
|
||||
int64_t arrival_time_us;
|
||||
};
|
||||
// Contains current configuration state.
|
||||
struct ConfigState {
|
||||
// Static link configuration.
|
||||
Config config;
|
||||
// The probability to drop the packet if we are currently dropping a
|
||||
// burst of packet
|
||||
double prob_loss_bursting;
|
||||
// The probability to drop a burst of packets.
|
||||
double prob_start_bursting;
|
||||
// Used for temporary delay spikes.
|
||||
int64_t pause_transmission_until_us = 0;
|
||||
};
|
||||
|
||||
// Moves packets from capacity- to delay link.
|
||||
void UpdateCapacityQueue(ConfigState state, int64_t time_now_us)
|
||||
RTC_RUN_ON(&process_checker_);
|
||||
ConfigState GetConfigState() const;
|
||||
|
||||
mutable Mutex config_lock_;
|
||||
|
||||
// Guards the data structures involved in delay and loss processing, such as
|
||||
// the packet queues.
|
||||
rtc::RaceChecker process_checker_;
|
||||
// Models the capacity of the network by rejecting packets if the queue is
|
||||
// full and keeping them in the queue until they are ready to exit (according
|
||||
// to the link capacity, which cannot be violated, e.g. a 1 kbps link will
|
||||
// only be able to deliver 1000 bits per second).
|
||||
//
|
||||
// Invariant:
|
||||
// The head of the `capacity_link_` has arrival_time_us correctly set to the
|
||||
// time when the packet is supposed to be delivered (without accounting
|
||||
// potential packet loss or potential extra delay and without accounting for a
|
||||
// new configuration of the network, which requires a re-computation of the
|
||||
// arrival_time_us).
|
||||
std::queue<PacketInfo> capacity_link_ RTC_GUARDED_BY(process_checker_);
|
||||
// Models the extra delay of the network (see `queue_delay_ms`
|
||||
// and `delay_standard_deviation_ms` in BuiltInNetworkBehaviorConfig), packets
|
||||
// in the `delay_link_` have technically already left the network and don't
|
||||
// use its capacity but they are not delivered yet.
|
||||
std::deque<PacketInfo> delay_link_ RTC_GUARDED_BY(process_checker_);
|
||||
// Represents the next moment in time when the network is supposed to deliver
|
||||
// packets to the client (either by pulling them from `delay_link_` or
|
||||
// `capacity_link_` or both).
|
||||
absl::optional<int64_t> next_process_time_us_
|
||||
RTC_GUARDED_BY(process_checker_);
|
||||
|
||||
ConfigState config_state_ RTC_GUARDED_BY(config_lock_);
|
||||
|
||||
Random random_ RTC_GUARDED_BY(process_checker_);
|
||||
// Are we currently dropping a burst of packets?
|
||||
bool bursting_;
|
||||
|
||||
// The send time of the last enqueued packet, this is only used to check that
|
||||
// the send time of enqueued packets is monotonically increasing.
|
||||
int64_t last_enqueue_time_us_;
|
||||
|
||||
// The last time a packet left the capacity_link_ (used to enforce
|
||||
// the capacity of the link and avoid packets starts to get sent before
|
||||
// the link it free).
|
||||
int64_t last_capacity_link_exit_time_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // TEST_NETWORK_SIMULATED_NETWORK_H_
|
|
@ -7,7 +7,7 @@
|
|||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#include "call/simulated_network.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
|
@ -287,6 +287,7 @@ if (!build_with_chromium) {
|
|||
":default_audio_quality_analyzer",
|
||||
":network_quality_metrics_reporter",
|
||||
":stats_based_network_quality_metrics_reporter",
|
||||
"../../..//test/network:simulated_network",
|
||||
"../../../api:create_network_emulation_manager",
|
||||
"../../../api:create_peer_connection_quality_test_frame_generator",
|
||||
"../../../api:create_peerconnection_quality_test_fixture",
|
||||
|
@ -304,7 +305,6 @@ if (!build_with_chromium) {
|
|||
"../../../api/test/pclf:peer_configurer",
|
||||
"../../../api/video_codecs:builtin_video_decoder_factory",
|
||||
"../../../api/video_codecs:builtin_video_encoder_factory",
|
||||
"../../../call:simulated_network",
|
||||
"../../../media:rtc_audio_video",
|
||||
"../../../modules/audio_device:audio_device_impl",
|
||||
"../../../p2p:rtc_p2p",
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/pclf/peer_configurer.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.h"
|
||||
#include "test/pc/e2e/analyzer/video/default_video_quality_analyzer.h"
|
||||
#include "test/pc/e2e/analyzer/video/default_video_quality_analyzer_shared_objects.h"
|
||||
|
|
|
@ -77,6 +77,7 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||
"../:test_common",
|
||||
"../:test_support",
|
||||
"../:video_test_common",
|
||||
"../..//test/network:simulated_network",
|
||||
"../../api:array_view",
|
||||
"../../api:create_frame_generator",
|
||||
"../../api:fec_controller_api",
|
||||
|
@ -110,7 +111,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||
"../../call",
|
||||
"../../call:call_interfaces",
|
||||
"../../call:rtp_sender",
|
||||
"../../call:simulated_network",
|
||||
"../../call:video_stream_api",
|
||||
"../../common_video",
|
||||
"../../media:media_constants",
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#include "api/call/transport.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "call/call.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/copy_on_write_buffer.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "test/network/network_emulation.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/scenario/column_printer.h"
|
||||
#include "test/scenario/scenario_config.h"
|
||||
|
||||
|
|
|
@ -513,6 +513,7 @@ if (rtc_include_tests) {
|
|||
]
|
||||
deps = [
|
||||
":frame_dumping_decoder",
|
||||
"..//test/network:simulated_network",
|
||||
"../api:create_frame_generator",
|
||||
"../api:fec_controller_api",
|
||||
"../api:frame_generator_api",
|
||||
|
@ -534,7 +535,6 @@ if (rtc_include_tests) {
|
|||
"../api/video:video_rtp_headers",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../call:fake_network",
|
||||
"../call:simulated_network",
|
||||
"../common_video",
|
||||
"../media:media_constants",
|
||||
"../media:rtc_audio_video",
|
||||
|
@ -623,6 +623,7 @@ if (rtc_include_tests) {
|
|||
|
||||
sources = [ "pc_full_stack_tests.cc" ]
|
||||
deps = [
|
||||
"..//test/network:simulated_network",
|
||||
"../api:create_network_emulation_manager",
|
||||
"../api:create_peer_connection_quality_test_frame_generator",
|
||||
"../api:create_peerconnection_quality_test_fixture",
|
||||
|
@ -637,7 +638,6 @@ if (rtc_include_tests) {
|
|||
"../api/test/pclf:media_quality_test_params",
|
||||
"../api/test/pclf:peer_configurer",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../call:simulated_network",
|
||||
"../modules/video_coding:webrtc_vp9",
|
||||
"../system_wrappers:field_trial",
|
||||
"../test:field_trial",
|
||||
|
@ -820,6 +820,7 @@ if (rtc_include_tests) {
|
|||
":video_stream_buffer_controller",
|
||||
":video_stream_encoder_impl",
|
||||
":video_stream_encoder_interface",
|
||||
"..//test/network:simulated_network",
|
||||
"../api:array_view",
|
||||
"../api:bitrate_allocation",
|
||||
"../api:create_frame_generator",
|
||||
|
@ -879,7 +880,6 @@ if (rtc_include_tests) {
|
|||
"../call:rtp_interfaces",
|
||||
"../call:rtp_receiver",
|
||||
"../call:rtp_sender",
|
||||
"../call:simulated_network",
|
||||
"../call:simulated_packet_receiver",
|
||||
"../call:video_stream_api",
|
||||
"../call/adaptation:resource_adaptation",
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "api/video/builtin_video_bitrate_allocator_factory.h"
|
||||
#include "api/video/video_bitrate_allocation.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
|
||||
#include "rtc_base/rate_limiter.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
|
@ -26,6 +25,7 @@
|
|||
#include "test/fake_encoder.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/rtp_rtcp_observer.h"
|
||||
#include "test/video_encoder_proxy_factory.h"
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
#include "api/test/frame_generator_interface.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "system_wrappers/include/sleep.h"
|
||||
#include "test/call_test.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/frame_forwarder.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/null_transport.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "call/call.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/rtp_config.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "call/simulated_packet_receiver.h"
|
||||
#include "call/video_receive_stream.h"
|
||||
#include "call/video_send_stream.h"
|
||||
|
@ -37,6 +36,7 @@
|
|||
#include "test/call_test.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/rtp_rtcp_observer.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video/function_video_encoder_factory.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "media/engine/internal_decoder_factory.h"
|
||||
#include "modules/include/module_common_types_public.h"
|
||||
#include "modules/rtp_rtcp/source/byte_io.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "test/field_trial.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video/function_video_encoder_factory.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/include/module_common_types_public.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
#include "modules/video_coding/codecs/h264/include/h264.h"
|
||||
|
@ -24,6 +23,7 @@
|
|||
#include "test/call_test.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
using ::testing::Contains;
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#include "api/test/video/function_video_encoder_factory.h"
|
||||
#include "api/video/builtin_video_bitrate_allocator_factory.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "media/engine/internal_decoder_factory.h"
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "test/call_test.h"
|
||||
#include "test/encoder_settings.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "test/call_test.h"
|
||||
#include "test/fake_encoder.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/video_encoder_proxy_factory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "api/test/video/function_video_encoder_factory.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
#include "rtc_base/event.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "test/call_test.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/include/module_common_types_public.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
|
@ -21,6 +20,7 @@
|
|||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "test/call_test.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/packet_receiver.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_util.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "test/call_test.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video/function_video_encoder_factory.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
#include "modules/video_coding/include/video_coding_defines.h"
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
|
@ -27,6 +26,7 @@
|
|||
#include "test/call_test.h"
|
||||
#include "test/fake_encoder.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "api/units/time_delta.h"
|
||||
#include "call/call.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/rtp_rtcp/source/byte_io.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "test/call_test.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/video_test_constants.h"
|
||||
#include "video/end_to_end_tests/multi_stream_tester.h"
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/time_controller.h"
|
||||
#include "api/video_codecs/vp9_profile.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "modules/video_coding/codecs/vp9/include/vp9.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/pc/e2e/network_quality_metrics_reporter.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video/function_video_encoder_factory.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "media/engine/internal_encoder_factory.h"
|
||||
#include "media/engine/simulcast_encoder_adapter.h"
|
||||
#include "modules/rtp_rtcp/source/create_video_rtp_depacketizer.h"
|
||||
|
@ -25,6 +24,7 @@
|
|||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "test/call_test.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/video_test_constants.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "api/video/builtin_video_bitrate_allocator_factory.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "media/base/media_constants.h"
|
||||
#include "media/engine/adm_helpers.h"
|
||||
#include "media/engine/fake_video_codec_factory.h"
|
||||
|
@ -45,6 +44,7 @@
|
|||
#include "modules/video_coding/utility/ivf_file_writer.h"
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/platform_video_capturer.h"
|
||||
#include "test/test_flags.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "call/call.h"
|
||||
#include "call/fake_network_pipe.h"
|
||||
#include "call/rtp_transport_controller_send.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "call/video_send_stream.h"
|
||||
#include "media/engine/internal_encoder_factory.h"
|
||||
#include "media/engine/simulcast_encoder_adapter.h"
|
||||
|
@ -66,6 +65,7 @@
|
|||
#include "test/frame_utils.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/network/simulated_network.h"
|
||||
#include "test/null_transport.h"
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/rtp_rtcp_observer.h"
|
||||
|
|
Loading…
Reference in a new issue