Removes injection of RtpTransportControllerSend from Call::Create.
Bug: webrtc:10365 Change-Id: Ie319611828116f8ffbb582d5ab2099240b26699e Reviewed-on: https://webrtc-review.googlesource.com/c/124784 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26926}
This commit is contained in:
parent
d9f798a6b3
commit
547a1dceef
@ -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<RtpTransportControllerSendInterface> 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.
|
||||
|
||||
@ -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<RtpTransportControllerSendInterface> transport_send);
|
||||
|
||||
virtual AudioSendStream* CreateAudioSendStream(
|
||||
const AudioSendStream::Config& config) = 0;
|
||||
|
||||
|
||||
@ -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<RtpTransportControllerSend> controller_send =
|
||||
absl::make_unique<RtpTransportControllerSend>(
|
||||
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(
|
||||
|
||||
@ -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<webrtc::RtcEventLog> send_event_log_;
|
||||
std::unique_ptr<webrtc::RtcEventLog> recv_event_log_;
|
||||
std::unique_ptr<Call> sender_call_;
|
||||
RtpTransportControllerSend* sender_call_transport_controller_;
|
||||
std::unique_ptr<PacketTransport> send_transport_;
|
||||
std::vector<VideoSendStream::Config> video_send_configs_;
|
||||
std::vector<VideoEncoderConfig> 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(
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user