mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Delete deprecated call_factory and media_engine
from PeerConnectionFactoryDependencies Bug: webrtc:15574 Change-Id: Id0ead8086ddd41f6792e2a3c224d8705cd797d49 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326003 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41309}
This commit is contained in:
parent
8f16ce98c2
commit
fe66dda733
8 changed files with 8 additions and 42 deletions
|
@ -319,7 +319,6 @@ rtc_library("libjingle_peerconnection_api") {
|
|||
":array_view",
|
||||
":async_dns_resolver",
|
||||
":audio_options_api",
|
||||
":callfactory_api",
|
||||
":candidate",
|
||||
":dtls_transport_interface",
|
||||
":fec_controller_api",
|
||||
|
|
|
@ -60,13 +60,8 @@ PeerConnectionDependencies::~PeerConnectionDependencies() = default;
|
|||
PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies() =
|
||||
default;
|
||||
|
||||
// TODO(bugs.webrtc.org/15574): Remove pragma once call_factory and media_engine
|
||||
// are removed from PeerConnectionFactoryDependencies
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies(
|
||||
PeerConnectionFactoryDependencies&&) = default;
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
PeerConnectionFactoryDependencies::~PeerConnectionFactoryDependencies() =
|
||||
default;
|
||||
|
|
|
@ -84,7 +84,6 @@
|
|||
#include "api/audio_codecs/audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/audio_encoder_factory.h"
|
||||
#include "api/audio_options.h"
|
||||
#include "api/call/call_factory_interface.h"
|
||||
#include "api/candidate.h"
|
||||
#include "api/crypto/crypto_options.h"
|
||||
#include "api/data_channel_interface.h"
|
||||
|
@ -1425,10 +1424,6 @@ struct RTC_EXPORT PeerConnectionFactoryDependencies final {
|
|||
// called without a `port_allocator`.
|
||||
std::unique_ptr<rtc::PacketSocketFactory> packet_socket_factory;
|
||||
std::unique_ptr<TaskQueueFactory> task_queue_factory;
|
||||
// TODO(bugs.webrtc.org/15574): Delete `media_engine` and `call_factory`
|
||||
// after 2023-12-01
|
||||
[[deprecated]] std::unique_ptr<cricket::MediaEngineInterface> media_engine;
|
||||
[[deprecated]] std::unique_ptr<CallFactoryInterface> call_factory;
|
||||
std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory;
|
||||
std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory;
|
||||
std::unique_ptr<NetworkStatePredictorFactoryInterface>
|
||||
|
|
|
@ -317,7 +317,6 @@ rtc_source_set("jsep_transport_controller") {
|
|||
rtc_source_set("media_factory") {
|
||||
sources = [ "media_factory.h" ]
|
||||
deps = [
|
||||
"../api:callfactory_api",
|
||||
"../api/environment",
|
||||
"../call:call_interfaces",
|
||||
"../media:rtc_media_base",
|
||||
|
@ -1541,6 +1540,7 @@ rtc_source_set("peer_connection_factory") {
|
|||
"../p2p:rtc_p2p",
|
||||
"../pc:audio_track",
|
||||
"../pc:connection_context",
|
||||
"../pc:media_factory",
|
||||
"../pc:media_stream",
|
||||
"../pc:rtp_parameters_conversion",
|
||||
"../pc:session_description",
|
||||
|
|
|
@ -81,18 +81,6 @@ std::unique_ptr<SctpTransportFactoryInterface> MaybeCreateSctpFactory(
|
|||
rtc::scoped_refptr<ConnectionContext> ConnectionContext::Create(
|
||||
const Environment& env,
|
||||
PeerConnectionFactoryDependencies* dependencies) {
|
||||
// TODO(bugs.webrtc.org/15574): Remove when call_factory and media_engine
|
||||
// are removed from PeerConnectionFactoryDependencies
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (dependencies->media_factory != nullptr) {
|
||||
RTC_CHECK(dependencies->media_engine == nullptr)
|
||||
<< "media_factory replaces media_engine. Do not set media_engine.";
|
||||
RTC_CHECK(dependencies->call_factory == nullptr)
|
||||
<< "media_factory replaces call_factory. Do not set call_factory.";
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
return rtc::scoped_refptr<ConnectionContext>(
|
||||
new ConnectionContext(env, dependencies));
|
||||
}
|
||||
|
@ -117,19 +105,11 @@ ConnectionContext::ConnectionContext(
|
|||
dependencies->media_factory != nullptr
|
||||
? dependencies->media_factory->CreateMediaEngine(env_,
|
||||
*dependencies)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
: std::move(dependencies->media_engine)),
|
||||
#pragma clang diagnostic pop
|
||||
: nullptr),
|
||||
network_monitor_factory_(
|
||||
std::move(dependencies->network_monitor_factory)),
|
||||
default_network_manager_(std::move(dependencies->network_manager)),
|
||||
call_factory_(dependencies->media_factory != nullptr
|
||||
? std::move(dependencies->media_factory)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
: std::move(dependencies->call_factory)),
|
||||
#pragma clang diagnostic pop
|
||||
call_factory_(std::move(dependencies->media_factory)),
|
||||
default_socket_factory_(std::move(dependencies->packet_socket_factory)),
|
||||
sctp_factory_(
|
||||
MaybeCreateSctpFactory(std::move(dependencies->sctp_factory),
|
||||
|
|
|
@ -96,7 +96,7 @@ class ConnectionContext final
|
|||
RTC_DCHECK_RUN_ON(signaling_thread_);
|
||||
return default_socket_factory_.get();
|
||||
}
|
||||
CallFactoryInterface* call_factory() {
|
||||
MediaFactory* call_factory() {
|
||||
RTC_DCHECK_RUN_ON(worker_thread());
|
||||
return call_factory_.get();
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ class ConnectionContext final
|
|||
RTC_GUARDED_BY(signaling_thread_);
|
||||
std::unique_ptr<rtc::NetworkManager> default_network_manager_
|
||||
RTC_GUARDED_BY(signaling_thread_);
|
||||
std::unique_ptr<CallFactoryInterface> const call_factory_
|
||||
std::unique_ptr<MediaFactory> const call_factory_
|
||||
RTC_GUARDED_BY(worker_thread());
|
||||
|
||||
std::unique_ptr<rtc::PacketSocketFactory> default_socket_factory_
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "api/call/call_factory_interface.h"
|
||||
#include "api/environment/environment.h"
|
||||
#include "call/call.h"
|
||||
#include "call/call_config.h"
|
||||
|
@ -31,13 +30,11 @@ struct PeerConnectionFactoryDependencies;
|
|||
|
||||
// Interface repsponsible for constructing media specific classes for
|
||||
// PeerConnectionFactory and PeerConnection.
|
||||
// TODO(bugs.webrtc.org/15574): Delete CallFactoryInterface inheritance
|
||||
// when call_factory is removed from PeerConnectionFactoryDependencies.
|
||||
class MediaFactory : public CallFactoryInterface {
|
||||
class MediaFactory {
|
||||
public:
|
||||
virtual ~MediaFactory() = default;
|
||||
|
||||
std::unique_ptr<Call> CreateCall(const CallConfig& config) override = 0;
|
||||
virtual std::unique_ptr<Call> CreateCall(const CallConfig& config) = 0;
|
||||
virtual std::unique_ptr<cricket::MediaEngineInterface> CreateMediaEngine(
|
||||
const Environment& env,
|
||||
PeerConnectionFactoryDependencies& dependencies) = 0;
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <utility>
|
||||
|
||||
#include "absl/strings/match.h"
|
||||
#include "api/call/call_factory_interface.h"
|
||||
#include "api/environment/environment.h"
|
||||
#include "api/environment/environment_factory.h"
|
||||
#include "api/fec_controller.h"
|
||||
|
@ -34,6 +33,7 @@
|
|||
#include "p2p/client/basic_port_allocator.h"
|
||||
#include "pc/audio_track.h"
|
||||
#include "pc/local_audio_source.h"
|
||||
#include "pc/media_factory.h"
|
||||
#include "pc/media_stream.h"
|
||||
#include "pc/media_stream_proxy.h"
|
||||
#include "pc/media_stream_track_proxy.h"
|
||||
|
|
Loading…
Reference in a new issue