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:
@ -65,18 +65,6 @@ const size_t kMaxNumberOfStoredRrtrs = 200;
|
||||
|
||||
constexpr int32_t kDefaultVideoReportInterval = 1000;
|
||||
constexpr int32_t kDefaultAudioReportInterval = 5000;
|
||||
|
||||
std::set<uint32_t> GetRegisteredSsrcs(const RtpRtcp::Configuration& config) {
|
||||
std::set<uint32_t> ssrcs;
|
||||
ssrcs.insert(config.local_media_ssrc);
|
||||
if (config.rtx_send_ssrc) {
|
||||
ssrcs.insert(*config.rtx_send_ssrc);
|
||||
}
|
||||
if (config.flexfec_sender) {
|
||||
ssrcs.insert(config.flexfec_sender->ssrc());
|
||||
}
|
||||
return ssrcs;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
struct RTCPReceiver::PacketInformation {
|
||||
@ -138,8 +126,6 @@ RTCPReceiver::RTCPReceiver(const RtpRtcp::Configuration& config,
|
||||
: clock_(config.clock),
|
||||
receiver_only_(config.receiver_only),
|
||||
rtp_rtcp_(owner),
|
||||
main_ssrc_(config.local_media_ssrc),
|
||||
registered_ssrcs_(GetRegisteredSsrcs(config)),
|
||||
rtcp_bandwidth_observer_(config.bandwidth_callback),
|
||||
rtcp_intra_frame_observer_(config.intra_frame_callback),
|
||||
rtcp_loss_notification_observer_(config.rtcp_loss_notification_observer),
|
||||
@ -151,6 +137,7 @@ RTCPReceiver::RTCPReceiver(const RtpRtcp::Configuration& config,
|
||||
: (config.audio ? kDefaultAudioReportInterval
|
||||
: kDefaultVideoReportInterval)),
|
||||
// TODO(bugs.webrtc.org/10774): Remove fallback.
|
||||
main_ssrc_(config.local_media_ssrc.value_or(0)),
|
||||
remote_ssrc_(0),
|
||||
remote_sender_rtp_time_(0),
|
||||
xr_rrtr_status_(false),
|
||||
@ -165,6 +152,15 @@ RTCPReceiver::RTCPReceiver(const RtpRtcp::Configuration& config,
|
||||
num_skipped_packets_(0),
|
||||
last_skipped_packets_warning_ms_(clock_->TimeInMilliseconds()) {
|
||||
RTC_DCHECK(owner);
|
||||
if (config.local_media_ssrc) {
|
||||
registered_ssrcs_.insert(*config.local_media_ssrc);
|
||||
}
|
||||
if (config.rtx_send_ssrc) {
|
||||
registered_ssrcs_.insert(*config.rtx_send_ssrc);
|
||||
}
|
||||
if (config.flexfec_sender) {
|
||||
registered_ssrcs_.insert(config.flexfec_sender->ssrc());
|
||||
}
|
||||
}
|
||||
|
||||
RTCPReceiver::~RTCPReceiver() {}
|
||||
@ -198,6 +194,13 @@ uint32_t RTCPReceiver::RemoteSSRC() const {
|
||||
return remote_ssrc_;
|
||||
}
|
||||
|
||||
void RTCPReceiver::SetSsrcs(uint32_t main_ssrc,
|
||||
const std::set<uint32_t>& registered_ssrcs) {
|
||||
rtc::CritScope lock(&rtcp_receiver_lock_);
|
||||
main_ssrc_ = main_ssrc;
|
||||
registered_ssrcs_ = registered_ssrcs;
|
||||
}
|
||||
|
||||
int32_t RTCPReceiver::RTT(uint32_t remote_ssrc,
|
||||
int64_t* last_rtt_ms,
|
||||
int64_t* avg_rtt_ms,
|
||||
|
||||
Reference in New Issue
Block a user