diff options
Diffstat (limited to 'third_party/libwebrtc/call/rtp_video_sender_unittest.cc')
-rw-r--r-- | third_party/libwebrtc/call/rtp_video_sender_unittest.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/third_party/libwebrtc/call/rtp_video_sender_unittest.cc b/third_party/libwebrtc/call/rtp_video_sender_unittest.cc index 9646a81cfd..cf099afaa3 100644 --- a/third_party/libwebrtc/call/rtp_video_sender_unittest.cc +++ b/third_party/libwebrtc/call/rtp_video_sender_unittest.cc @@ -16,6 +16,8 @@ #include <utility> #include "absl/functional/any_invocable.h" +#include "api/environment/environment.h" +#include "api/environment/environment_factory.h" #include "call/rtp_transport_controller_send.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/byte_io.h" @@ -118,23 +120,21 @@ class RtpVideoSenderTestFixture { rtc::scoped_refptr<FrameTransformerInterface> frame_transformer, const FieldTrialsView* field_trials = nullptr) : time_controller_(Timestamp::Millis(1000000)), + env_(CreateEnvironment(&field_trials_, + field_trials, + time_controller_.GetClock(), + time_controller_.CreateTaskQueueFactory())), config_(CreateVideoSendStreamConfig(&transport_, ssrcs, rtx_ssrcs, payload_type)), bitrate_config_(GetBitrateConfig()), transport_controller_( - time_controller_.GetClock(), - RtpTransportConfig{ - .bitrate_config = bitrate_config_, - .event_log = &event_log_, - .task_queue_factory = time_controller_.GetTaskQueueFactory(), - .trials = field_trials ? field_trials : &field_trials_, - }), + RtpTransportConfig{.env = env_, .bitrate_config = bitrate_config_}), stats_proxy_(time_controller_.GetClock(), config_, VideoEncoderConfig::ContentType::kRealtimeVideo, - field_trials ? *field_trials : field_trials_), + env_.field_trials()), retransmission_rate_limiter_(time_controller_.GetClock(), kRetransmitWindowSizeMs) { transport_controller_.EnsureStarted(); @@ -144,10 +144,10 @@ class RtpVideoSenderTestFixture { config_.rtp, config_.rtcp_report_interval_ms, &transport_, CreateObservers(&encoder_feedback_, &stats_proxy_, &stats_proxy_, &stats_proxy_, frame_count_observer, &stats_proxy_), - &transport_controller_, &event_log_, &retransmission_rate_limiter_, - std::make_unique<FecControllerDefault>(time_controller_.GetClock()), - nullptr, CryptoOptions{}, frame_transformer, - field_trials ? *field_trials : field_trials_, + &transport_controller_, &env_.event_log(), + &retransmission_rate_limiter_, + std::make_unique<FecControllerDefault>(env_), nullptr, CryptoOptions{}, + frame_transformer, env_.field_trials(), time_controller_.GetTaskQueueFactory()); } @@ -197,7 +197,7 @@ class RtpVideoSenderTestFixture { NiceMock<MockTransport> transport_; NiceMock<MockRtcpIntraFrameObserver> encoder_feedback_; GlobalSimulatedTimeController time_controller_; - RtcEventLogNull event_log_; + Environment env_; VideoSendStream::Config config_; BitrateConstraints bitrate_config_; RtpTransportControllerSend transport_controller_; |