Remove the audio/video split for the RTCP report intervals.

This is a follow up of a comment in
https://webrtc-review.googlesource.com/c/src/+/110105

It was not very useful to split the audio and video report interval since the RTCP module can only either be audio or video.

The recent it was written that way in https://webrtc-review.googlesource.com/c/src/+/43201/ was because that was a straightforward transition from two global constants to two variable.

Bug: webrtc:8789
Change-Id: I2293de14ba5f363351f379a02022ed5dc7b8d458
Reviewed-on: https://webrtc-review.googlesource.com/c/110824
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25741}
This commit is contained in:
Jiawei Ou
2018-11-15 16:44:37 -08:00
committed by Commit Bot
parent 4a2dd7ac7e
commit 8b5d9d8650
15 changed files with 84 additions and 102 deletions

View File

@ -124,7 +124,7 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
std::unique_ptr<ModuleRtpRtcpImpl> impl_;
uint32_t remote_ssrc_;
RtpKeepAliveConfig keepalive_config_;
RtcpIntervalConfig rtcp_interval_config_;
int rtcp_report_interval_ms_ = 0;
void SetRemoteSsrc(uint32_t ssrc) {
remote_ssrc_ = ssrc;
@ -159,8 +159,8 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
CreateModuleImpl();
transport_.SetKeepalivePayloadType(config.payload_type);
}
void SetRtcpIntervalConfigAndReset(const RtcpIntervalConfig& config) {
rtcp_interval_config_ = config;
void SetRtcpReportIntervalAndReset(int rtcp_report_interval_ms) {
rtcp_report_interval_ms_ = rtcp_report_interval_ms;
CreateModuleImpl();
}
@ -174,7 +174,7 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver {
config.rtcp_packet_type_counter_observer = this;
config.rtt_stats = &rtt_stats_;
config.keepalive_config = keepalive_config_;
config.rtcp_interval_config = rtcp_interval_config_;
config.rtcp_report_interval_ms = rtcp_report_interval_ms_;
impl_.reset(new ModuleRtpRtcpImpl(config));
impl_->SetRTCPStatus(RtcpMode::kCompound);
@ -643,11 +643,8 @@ TEST_F(RtpRtcpImplTest, SendsKeepaliveAfterTimout) {
TEST_F(RtpRtcpImplTest, ConfigurableRtcpReportInterval) {
const int kVideoReportInterval = 3000;
RtcpIntervalConfig config;
config.video_interval_ms = kVideoReportInterval;
// Recreate sender impl with new configuration, and redo setup.
sender_.SetRtcpIntervalConfigAndReset(config);
sender_.SetRtcpReportIntervalAndReset(kVideoReportInterval);
SetUp();
SendFrame(&sender_, kBaseLayerTid);