Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"

This is a reland of 17608dc4592fe25c1effdd75bf856f4af251942e

Downstream test now fixed.
As a precaution, also avoid DCHECKS for non-zero SSRC.
First patch set is reland, second makes checks more lenient.

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
>
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
>
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

Bug: webrtc:10774
Change-Id: I540b49a31a31e98d87f02ae04083d5206e71c1b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157100
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29491}
This commit is contained in:
Erik Språng
2019-10-15 14:29:11 +02:00
committed by Commit Bot
parent f39c815a1d
commit 6841d25d45
14 changed files with 44 additions and 217 deletions

View File

@ -94,10 +94,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
RtpState GetRtpState() const override;
RtpState GetRtxState() const override;
uint32_t SSRC() const override;
// Configure SSRC, default is a random number.
void SetSSRC(uint32_t ssrc) override;
uint32_t SSRC() const override { return rtcp_sender_.SSRC(); }
void SetRid(const std::string& rid) override;
@ -110,8 +107,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
void SetRtxSendStatus(int mode) override;
int RtxSendStatus() const override;
void SetRtxSsrc(uint32_t ssrc) override;
void SetRtxSendPayloadType(int payload_type,
int associated_payload_type) override;
@ -302,7 +297,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
private:
FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, Rtt);
FRIEND_TEST_ALL_PREFIXES(RtpRtcpImplTest, RttForReceiverOnly);
void SetRtcpReceiverSsrcs(uint32_t main_ssrc);
void set_rtt_ms(int64_t rtt_ms);
int64_t rtt_ms() const;