diff --git a/call/call.cc b/call/call.cc index 5df97e9d81..6655e22ea8 100644 --- a/call/call.cc +++ b/call/call.cc @@ -419,12 +419,6 @@ Call* Call::Create(const Call::Config& config) { config.network_controller_factory, config.bitrate_config)); } -Call* Call::Create( - const Call::Config& config, - std::unique_ptr transport_send) { - return new internal::Call(config, std::move(transport_send)); -} - // This method here to avoid subclasses has to implement this method. // Call perf test will use Internal::Call::CreateVideoSendStream() to inject // FecController. diff --git a/call/call.h b/call/call.h index ab834f3c84..eb5596d2bd 100644 --- a/call/call.h +++ b/call/call.h @@ -50,11 +50,6 @@ class Call { static Call* Create(const Call::Config& config); - // Allows mocking |transport_send| for testing. - static Call* Create( - const Call::Config& config, - std::unique_ptr transport_send); - virtual AudioSendStream* CreateAudioSendStream( const AudioSendStream::Config& config) = 0; diff --git a/test/call_test.cc b/test/call_test.cc index b8334b548f..44df9cbe34 100644 --- a/test/call_test.cc +++ b/test/call_test.cc @@ -18,7 +18,6 @@ #include "api/video/builtin_video_bitrate_allocator_factory.h" #include "api/video_codecs/video_encoder_config.h" #include "call/fake_network_pipe.h" -#include "call/rtp_transport_controller_send.h" #include "call/simulated_network.h" #include "modules/audio_mixer/audio_mixer_impl.h" #include "rtc_base/checks.h" @@ -33,7 +32,6 @@ CallTest::CallTest() : clock_(Clock::GetRealTimeClock()), send_event_log_(RtcEventLog::CreateNull()), recv_event_log_(RtcEventLog::CreateNull()), - sender_call_transport_controller_(nullptr), audio_send_config_(/*send_transport=*/nullptr, /*media_transport=*/nullptr), audio_send_stream_(nullptr), @@ -113,10 +111,6 @@ void CallTest::RunBaseTest(BaseTest* test) { send_config.audio_state->audio_transport()); } CreateSenderCall(send_config); - if (sender_call_transport_controller_ != nullptr) { - test->OnRtpTransportControllerSendCreated( - sender_call_transport_controller_); - } if (test->ShouldCreateReceivers()) { Call::Config recv_config(recv_event_log_.get()); test->ModifyReceiverBitrateConfig(&recv_config.bitrate_config); @@ -221,20 +215,7 @@ void CallTest::CreateSenderCall() { } void CallTest::CreateSenderCall(const Call::Config& config) { - NetworkControllerFactoryInterface* injected_factory = - config.network_controller_factory; - if (injected_factory) { - RTC_LOG(LS_INFO) << "Using injected network controller factory"; - } else { - RTC_LOG(LS_INFO) << "Using default network controller factory"; - } - - std::unique_ptr controller_send = - absl::make_unique( - Clock::GetRealTimeClock(), config.event_log, injected_factory, - config.bitrate_config); - sender_call_transport_controller_ = controller_send.get(); - sender_call_.reset(Call::Create(config, std::move(controller_send))); + sender_call_.reset(Call::Create(config)); } void CallTest::CreateReceiverCall(const Call::Config& config) { @@ -761,9 +742,6 @@ void BaseTest::ModifySenderBitrateConfig(BitrateConstraints* bitrate_config) {} void BaseTest::ModifyReceiverBitrateConfig(BitrateConstraints* bitrate_config) { } -void BaseTest::OnRtpTransportControllerSendCreated( - RtpTransportControllerSend* controller) {} - void BaseTest::OnCallsCreated(Call* sender_call, Call* receiver_call) {} test::PacketTransport* BaseTest::CreateSendTransport( diff --git a/test/call_test.h b/test/call_test.h index dbe8e07e97..052d4c6137 100644 --- a/test/call_test.h +++ b/test/call_test.h @@ -20,7 +20,6 @@ #include "api/test/video/function_video_encoder_factory.h" #include "api/video/video_bitrate_allocator_factory.h" #include "call/call.h" -#include "call/rtp_transport_controller_send.h" #include "logging/rtc_event_log/rtc_event_log.h" #include "modules/audio_device/include/test_audio_device.h" #include "test/encoder_settings.h" @@ -179,7 +178,6 @@ class CallTest : public ::testing::Test { std::unique_ptr send_event_log_; std::unique_ptr recv_event_log_; std::unique_ptr sender_call_; - RtpTransportControllerSend* sender_call_transport_controller_; std::unique_ptr send_transport_; std::vector video_send_configs_; std::vector video_encoder_configs_; @@ -254,8 +252,6 @@ class BaseTest : public RtpRtcpObserver { virtual void ModifySenderBitrateConfig(BitrateConstraints* bitrate_config); virtual void ModifyReceiverBitrateConfig(BitrateConstraints* bitrate_config); - virtual void OnRtpTransportControllerSendCreated( - RtpTransportControllerSend* controller); virtual void OnCallsCreated(Call* sender_call, Call* receiver_call); virtual test::PacketTransport* CreateSendTransport( diff --git a/video/end_to_end_tests/probing_tests.cc b/video/end_to_end_tests/probing_tests.cc index dba3c3e881..df2caf9fb6 100644 --- a/video/end_to_end_tests/probing_tests.cc +++ b/video/end_to_end_tests/probing_tests.cc @@ -210,11 +210,6 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) { send_stream_ = send_stream; } - void OnRtpTransportControllerSendCreated( - RtpTransportControllerSend* transport_controller) override { - transport_controller_ = transport_controller; - } - test::PacketTransport* CreateSendTransport( test::SingleThreadedTaskQueueForTesting* task_queue, Call* sender_call) override { @@ -250,8 +245,10 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) { // In order to speed up the test we can interrupt exponential // probing by toggling the network availability. The alternative // is to wait for it to time out (1000 ms). - transport_controller_->OnNetworkAvailability(false); - transport_controller_->OnNetworkAvailability(true); + sender_call_->GetTransportControllerSend()->OnNetworkAvailability( + false); + sender_call_->GetTransportControllerSend()->OnNetworkAvailability( + true); ++state_; } @@ -288,7 +285,6 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) { SimulatedNetwork* send_simulated_network_; VideoSendStream* send_stream_; VideoEncoderConfig* encoder_config_; - RtpTransportControllerSend* transport_controller_; }; bool success = false;