Deprecate the static RtpRtcp::Create() method.

The method is being used externally to create instances
of the deprecated internal implementation.

Instead, I'm moving how we instantiate the internal implementation into
the implementation itself and move towards keeping the interface
separate from a single implementation.

Change-Id: I743aa86dc4c812b545699c546c253c104719260e
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176404
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31420}
This commit is contained in:
Tomas Gunnarsson
2020-06-03 08:54:39 +02:00
committed by Commit Bot
parent 878808892d
commit fae05624ec
20 changed files with 71 additions and 32 deletions

View File

@ -48,11 +48,6 @@ ModuleRtpRtcpImpl2::RtpSenderContext::RtpSenderContext(
&packet_history,
config.paced_sender ? config.paced_sender : &non_paced_sender) {}
std::unique_ptr<RtpRtcp> RtpRtcp::Create(const Configuration& configuration) {
RTC_DCHECK(configuration.clock);
return std::make_unique<ModuleRtpRtcpImpl2>(configuration);
}
ModuleRtpRtcpImpl2::ModuleRtpRtcpImpl2(const Configuration& configuration)
: rtcp_sender_(configuration),
rtcp_receiver_(configuration, this),
@ -86,6 +81,14 @@ ModuleRtpRtcpImpl2::~ModuleRtpRtcpImpl2() {
RTC_DCHECK_RUN_ON(&construction_thread_checker_);
}
// static
std::unique_ptr<RtpRtcp> ModuleRtpRtcpImpl2::Create(
const Configuration& configuration) {
RTC_DCHECK(configuration.clock);
RTC_DCHECK(TaskQueueBase::Current());
return std::make_unique<ModuleRtpRtcpImpl2>(configuration);
}
// Returns the number of milliseconds until the module want a worker thread
// to call Process.
int64_t ModuleRtpRtcpImpl2::TimeUntilNextProcess() {