RTCPSender: migrate to own configuration struct.

The class depends on RtcRtcpInterface::Configuration which adds an
unneeded dependency, and inhibits well-manored changes to the
constructor interface.

Fix this so that RTCPSender uses it's own configuration struct which
can be extended in future CLs.

Also add a legacy constructor while downstream dependencies are
updated.

Bug: webrtc:11581
Change-Id: I8d166ab8253b27c08fcbe6aa7c7adde92688b7dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222322
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34343}
This commit is contained in:
Markus Handell
2021-06-18 13:44:13 +02:00
committed by WebRTC LUCI CQ
parent f906ec40d4
commit 2e3edc1da9
6 changed files with 100 additions and 34 deletions

View File

@ -21,7 +21,9 @@
#include "api/transport/field_trial_based_config.h"
#include "modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
#include "modules/rtp_rtcp/source/rtcp_sender.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "system_wrappers/include/ntp_time.h"
@ -58,7 +60,8 @@ std::unique_ptr<RtpRtcp> RtpRtcp::DEPRECATED_Create(
}
ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
: rtcp_sender_(configuration),
: rtcp_sender_(
RTCPSender::Configuration::FromRtpRtcpConfiguration(configuration)),
rtcp_receiver_(configuration, this),
clock_(configuration.clock),
last_bitrate_process_time_(clock_->TimeInMilliseconds()),