Remove RtpTransportControllerSendFactoryInterface

This removes the possibility of injecting a custom factory for creating
the RtpTransportControllerSendInterface.  It done in preparation of
moving RtpTransportControllerSend to RtpTransport.

Bug: webrtc:438396766
Change-Id: Iaffa554b29564820b5f8b7c4a02619254dedbd48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404322
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45542}
This commit is contained in:
Per K 2025-09-03 06:30:34 +00:00 committed by WebRTC LUCI CQ
parent 1de952a79d
commit 6196e72116
9 changed files with 3 additions and 96 deletions

View File

@ -44,10 +44,6 @@ include_rules = [
specific_include_rules = {
# Some internal headers are allowed even in API headers:
"call_factory_interface\.h": [
"+call/rtp_transport_controller_send_factory_interface.h",
],
".*\.h": [
"+rtc_base/checks.h",
"+rtc_base/system/rtc_export.h",
@ -127,7 +123,6 @@ specific_include_rules = {
],
"peer_connection_interface\.h": [
"+call/rtp_transport_controller_send_factory_interface.h",
"+media/base/media_config.h",
"+media/base/media_engine.h",
"+p2p/base/port.h",

View File

@ -126,7 +126,6 @@
#include "api/video/video_bitrate_allocator_factory.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "call/rtp_transport_controller_send_factory_interface.h"
#include "media/base/media_config.h"
// TODO(bugs.webrtc.org/7447): We plan to provide a way to let applications
// inject a PacketSocketFactory and/or NetworkManager, and not expose
@ -1469,8 +1468,6 @@ struct RTC_EXPORT PeerConnectionFactoryDependencies final {
std::unique_ptr<NetworkMonitorFactory> network_monitor_factory;
std::unique_ptr<NetEqFactory> neteq_factory;
std::unique_ptr<SctpTransportFactoryInterface> sctp_factory;
std::unique_ptr<RtpTransportControllerSendFactoryInterface>
transport_controller_send_factory;
// Metronome used for decoding, must be called on the worker thread.
std::unique_ptr<Metronome> decode_metronome;
// Metronome used for encoding, must be called on the worker thread.

View File

@ -105,7 +105,6 @@ rtc_library("rtp_interfaces") {
"rtp_packet_sink_interface.h",
"rtp_stream_receiver_controller_interface.h",
"rtp_transport_config.h",
"rtp_transport_controller_send_factory_interface.h",
"rtp_transport_controller_send_interface.h",
]
deps = [
@ -167,7 +166,6 @@ rtc_library("rtp_sender") {
"rtp_payload_params.h",
"rtp_transport_controller_send.cc",
"rtp_transport_controller_send.h",
"rtp_transport_controller_send_factory.h",
"rtp_video_sender.cc",
"rtp_video_sender.h",
"rtp_video_sender_interface.h",

View File

@ -59,7 +59,7 @@
#include "call/receive_time_calculator.h"
#include "call/rtp_config.h"
#include "call/rtp_stream_receiver_controller.h"
#include "call/rtp_transport_controller_send_factory.h"
#include "call/rtp_transport_controller_send.h"
#include "call/version.h"
#include "call/video_receive_stream.h"
#include "call/video_send_stream.h"
@ -527,14 +527,8 @@ std::string Call::Stats::ToString(int64_t time_ms) const {
}
std::unique_ptr<Call> Call::Create(CallConfig config) {
std::unique_ptr<RtpTransportControllerSendInterface> transport_send;
if (config.rtp_transport_controller_send_factory != nullptr) {
transport_send = config.rtp_transport_controller_send_factory->Create(
config.ExtractTransportConfig());
} else {
transport_send = RtpTransportControllerSendFactory().Create(
config.ExtractTransportConfig());
}
auto transport_send = std::make_unique<RtpTransportControllerSend>(
config.ExtractTransportConfig());
return std::make_unique<internal::Call>(std::move(config),
std::move(transport_send));

View File

@ -25,7 +25,6 @@
#include "api/units/time_delta.h"
#include "call/audio_state.h"
#include "call/rtp_transport_config.h"
#include "call/rtp_transport_controller_send_factory_interface.h"
namespace webrtc {
@ -77,9 +76,6 @@ struct CallConfig {
NetEqFactory* neteq_factory = nullptr;
TaskQueueBase* network_task_queue_ = nullptr;
// RtpTransportControllerSend to use for this call.
RtpTransportControllerSendFactoryInterface*
rtp_transport_controller_send_factory = nullptr;
Metronome* decode_metronome = nullptr;
Metronome* encode_metronome = nullptr;

View File

@ -1,33 +0,0 @@
/*
* Copyright (c) 2021 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 CALL_RTP_TRANSPORT_CONTROLLER_SEND_FACTORY_H_
#define CALL_RTP_TRANSPORT_CONTROLLER_SEND_FACTORY_H_
#include <memory>
#include "call/rtp_transport_config.h"
#include "call/rtp_transport_controller_send.h"
#include "call/rtp_transport_controller_send_factory_interface.h"
#include "call/rtp_transport_controller_send_interface.h"
namespace webrtc {
class RtpTransportControllerSendFactory
: public RtpTransportControllerSendFactoryInterface {
public:
std::unique_ptr<RtpTransportControllerSendInterface> Create(
const RtpTransportConfig& config) override {
return std::make_unique<RtpTransportControllerSend>(config);
}
virtual ~RtpTransportControllerSendFactory() {}
};
} // namespace webrtc
#endif // CALL_RTP_TRANSPORT_CONTROLLER_SEND_FACTORY_H_

View File

@ -1,29 +0,0 @@
/*
* Copyright (c) 2021 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 CALL_RTP_TRANSPORT_CONTROLLER_SEND_FACTORY_INTERFACE_H_
#define CALL_RTP_TRANSPORT_CONTROLLER_SEND_FACTORY_INTERFACE_H_
#include <memory>
#include "call/rtp_transport_config.h"
#include "call/rtp_transport_controller_send_interface.h"
namespace webrtc {
// A factory used for dependency injection on the send side of the transport
// controller.
class RtpTransportControllerSendFactoryInterface {
public:
virtual ~RtpTransportControllerSendFactoryInterface() = default;
virtual std::unique_ptr<RtpTransportControllerSendInterface> Create(
const RtpTransportConfig& config) = 0;
};
} // namespace webrtc
#endif // CALL_RTP_TRANSPORT_CONTROLLER_SEND_FACTORY_INTERFACE_H_

View File

@ -35,7 +35,6 @@
#include "api/transport/network_control.h"
#include "api/units/data_rate.h"
#include "call/call_config.h"
#include "call/rtp_transport_controller_send_factory.h"
#include "media/base/codec.h"
#include "media/base/media_engine.h"
#include "p2p/base/basic_async_resolver_factory.h"
@ -111,10 +110,6 @@ PeerConnectionFactory::PeerConnectionFactory(
injected_network_controller_factory_(
std::move(dependencies->network_controller_factory)),
neteq_factory_(std::move(dependencies->neteq_factory)),
transport_controller_send_factory_(
(dependencies->transport_controller_send_factory)
? std::move(dependencies->transport_controller_send_factory)
: std::make_unique<RtpTransportControllerSendFactory>()),
decode_metronome_(std::move(dependencies->decode_metronome)),
encode_metronome_(std::move(dependencies->encode_metronome)) {}
@ -384,9 +379,6 @@ std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
} else {
RTC_LOG(LS_INFO) << "Using default network controller factory";
}
call_config.rtp_transport_controller_send_factory =
transport_controller_send_factory_.get();
call_config.decode_metronome = decode_metronome_.get();
call_config.encode_metronome = encode_metronome_.get();
call_config.pacer_burst_interval = configuration.pacer_burst_interval;

View File

@ -37,7 +37,6 @@
#include "api/transport/network_control.h"
#include "api/transport/sctp_transport_factory_interface.h"
#include "call/call.h"
#include "call/rtp_transport_controller_send_factory_interface.h"
#include "media/base/media_engine.h"
#include "pc/codec_vendor.h"
#include "pc/connection_context.h"
@ -142,8 +141,6 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
std::unique_ptr<NetworkControllerFactoryInterface>
injected_network_controller_factory_;
std::unique_ptr<NetEqFactory> neteq_factory_;
const std::unique_ptr<RtpTransportControllerSendFactoryInterface>
transport_controller_send_factory_;
std::unique_ptr<Metronome> decode_metronome_ RTC_GUARDED_BY(worker_thread());
std::unique_ptr<Metronome> encode_metronome_ RTC_GUARDED_BY(worker_thread());
};