#include "call/rtp_demuxer.h"
#include "absl/strings/string_view.h"
#include "call/rtp_packet_sink_interface.h"
#include "modules/rtp_rtcp/source/rtp_header_extensions.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
namespace {
template <typename Container, typename Value>
size_t RemoveFromMultimapByValue(Container* multimap, const Value& value) { … }
template <typename Map, typename Value>
size_t RemoveFromMapByValue(Map* map, const Value& value) { … }
}
RtpDemuxerCriteria::RtpDemuxerCriteria(
absl::string_view mid,
absl::string_view rsid )
: … { … }
RtpDemuxerCriteria::RtpDemuxerCriteria() = default;
RtpDemuxerCriteria::~RtpDemuxerCriteria() = default;
bool RtpDemuxerCriteria::operator==(const RtpDemuxerCriteria& other) const { … }
bool RtpDemuxerCriteria::operator!=(const RtpDemuxerCriteria& other) const { … }
std::string RtpDemuxerCriteria::ToString() const { … }
std::string RtpDemuxer::DescribePacket(const RtpPacketReceived& packet) { … }
RtpDemuxer::RtpDemuxer(bool use_mid ) : … { … }
RtpDemuxer::~RtpDemuxer() { … }
bool RtpDemuxer::AddSink(const RtpDemuxerCriteria& criteria,
RtpPacketSinkInterface* sink) { … }
bool RtpDemuxer::CriteriaWouldConflict(
const RtpDemuxerCriteria& criteria) const { … }
void RtpDemuxer::RefreshKnownMids() { … }
bool RtpDemuxer::AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink) { … }
void RtpDemuxer::AddSink(absl::string_view rsid, RtpPacketSinkInterface* sink) { … }
bool RtpDemuxer::RemoveSink(const RtpPacketSinkInterface* sink) { … }
flat_set<uint32_t> RtpDemuxer::GetSsrcsForSink(
const RtpPacketSinkInterface* sink) const { … }
bool RtpDemuxer::OnRtpPacket(const RtpPacketReceived& packet) { … }
RtpPacketSinkInterface* RtpDemuxer::ResolveSink(
const RtpPacketReceived& packet) { … }
RtpPacketSinkInterface* RtpDemuxer::ResolveSinkByMid(absl::string_view mid,
uint32_t ssrc) { … }
RtpPacketSinkInterface* RtpDemuxer::ResolveSinkByMidRsid(absl::string_view mid,
absl::string_view rsid,
uint32_t ssrc) { … }
RtpPacketSinkInterface* RtpDemuxer::ResolveSinkByRsid(absl::string_view rsid,
uint32_t ssrc) { … }
RtpPacketSinkInterface* RtpDemuxer::ResolveSinkByPayloadType(
uint8_t payload_type,
uint32_t ssrc) { … }
void RtpDemuxer::AddSsrcSinkBinding(uint32_t ssrc,
RtpPacketSinkInterface* sink) { … }
}