nit: Rename RtpDemuxer::sink_ to RtpDemuxer::ssrc_sinks_
Rationale:
1. sinks_ is not properly differentiated from rsid_sinks_.
2. Consistency with RtcpDemuxer.
BUG=webrtc:7135
Review-Url: https://codereview.webrtc.org/2958283002
Cr-Original-Commit-Position: refs/heads/master@{#18813}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: c3e3e60f592865b671175941a972dbf6961e1b38
diff --git a/call/rtp_demuxer.cc b/call/rtp_demuxer.cc
index e1957ed..b616f6f 100644
--- a/call/rtp_demuxer.cc
+++ b/call/rtp_demuxer.cc
@@ -27,7 +27,7 @@
RtpDemuxer::RtpDemuxer() = default;
RtpDemuxer::~RtpDemuxer() {
- RTC_DCHECK(sinks_.empty());
+ RTC_DCHECK(ssrc_sinks_.empty());
RTC_DCHECK(rsid_sinks_.empty());
}
@@ -50,7 +50,7 @@
bool RtpDemuxer::RemoveSink(const RtpPacketSinkInterface* sink) {
RTC_DCHECK(sink);
- return (RemoveFromMultimapByValue(&sinks_, sink) +
+ return (RemoveFromMultimapByValue(&ssrc_sinks_, sink) +
RemoveFromMultimapByValue(&rsid_sinks_, sink)) > 0;
}
@@ -59,14 +59,14 @@
RTC_DCHECK(sink);
// The association might already have been set by a different
// configuration source.
- if (!MultimapAssociationExists(sinks_, ssrc, sink)) {
- sinks_.emplace(ssrc, sink);
+ if (!MultimapAssociationExists(ssrc_sinks_, ssrc, sink)) {
+ ssrc_sinks_.emplace(ssrc, sink);
}
}
bool RtpDemuxer::OnRtpPacket(const RtpPacketReceived& packet) {
ResolveAssociations(packet);
- auto it_range = sinks_.equal_range(packet.Ssrc());
+ auto it_range = ssrc_sinks_.equal_range(packet.Ssrc());
for (auto it = it_range.first; it != it_range.second; ++it) {
it->second->OnRtpPacket(packet);
}
diff --git a/call/rtp_demuxer.h b/call/rtp_demuxer.h
index 9ec9378..5060a80 100644
--- a/call/rtp_demuxer.h
+++ b/call/rtp_demuxer.h
@@ -71,12 +71,12 @@
// This records the association SSRCs to sinks. Other associations, such
// as by RSID, also end up here once the RSID, etc., is resolved to an SSRC.
- std::multimap<uint32_t, RtpPacketSinkInterface*> sinks_;
+ std::multimap<uint32_t, RtpPacketSinkInterface*> ssrc_sinks_;
// A sink may be associated with an RSID - RTP Stream ID. This tag has a
// one-to-one association with an SSRC, but that SSRC is not yet known.
// When it becomes known, the association of the sink to the RSID is deleted
- // from this container, and moved into |sinks_|.
+ // from this container, and moved into |ssrc_sinks_|.
std::multimap<std::string, RtpPacketSinkInterface*> rsid_sinks_;
// Iterating over |rsid_sinks_| for each incoming and performing multiple