Revert "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This reverts commit 17608dc4592fe25c1effdd75bf856f4af251942e. Reason for revert: Breaks downstream build 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} TBR=nisse@webrtc.org,sprang@webrtc.org Change-Id: Idc60f26f34dd0456a40c72375ae829e25b28621f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:10774 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157046 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29483}
This commit is contained in:
@ -150,7 +150,6 @@ class RTCPSender::RtcpContext {
|
||||
|
||||
RTCPSender::RTCPSender(const RtpRtcp::Configuration& config)
|
||||
: audio_(config.audio),
|
||||
ssrc_(config.local_media_ssrc),
|
||||
clock_(config.clock),
|
||||
random_(clock_->TimeInMicroseconds()),
|
||||
method_(RtcpMode::kOff),
|
||||
@ -165,6 +164,7 @@ RTCPSender::RTCPSender(const RtpRtcp::Configuration& config)
|
||||
timestamp_offset_(0),
|
||||
last_rtp_timestamp_(0),
|
||||
last_frame_capture_time_ms_(-1),
|
||||
ssrc_(config.local_media_ssrc.value_or(0)),
|
||||
remote_ssrc_(0),
|
||||
receive_statistics_(config.receive_statistics),
|
||||
|
||||
@ -331,6 +331,23 @@ void RTCPSender::SetRtpClockRate(int8_t payload_type, int rtp_clock_rate_hz) {
|
||||
rtp_clock_rates_khz_[payload_type] = rtp_clock_rate_hz / 1000;
|
||||
}
|
||||
|
||||
uint32_t RTCPSender::SSRC() const {
|
||||
rtc::CritScope lock(&critical_section_rtcp_sender_);
|
||||
return ssrc_;
|
||||
}
|
||||
|
||||
void RTCPSender::SetSSRC(uint32_t ssrc) {
|
||||
rtc::CritScope lock(&critical_section_rtcp_sender_);
|
||||
|
||||
if (ssrc_ != 0 && ssrc != ssrc_) {
|
||||
// not first SetSSRC, probably due to a collision
|
||||
// schedule a new RTCP report
|
||||
// make sure that we send a RTP packet
|
||||
next_time_to_send_rtcp_ = clock_->TimeInMilliseconds() + 100;
|
||||
}
|
||||
ssrc_ = ssrc;
|
||||
}
|
||||
|
||||
void RTCPSender::SetRemoteSSRC(uint32_t ssrc) {
|
||||
rtc::CritScope lock(&critical_section_rtcp_sender_);
|
||||
remote_ssrc_ = ssrc;
|
||||
|
||||
Reference in New Issue
Block a user