mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Don't check MIDs when demuxing RTP packets in Call
The MID header extension is handled by the RtpTransport which lives above Call and takes care of demuxing to SSRC. Bug: webrtc:4050 Change-Id: I27135e296ae9c7b15e926ba17547c26c75684ad6 Reviewed-on: https://webrtc-review.googlesource.com/65025 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22682}
This commit is contained in:
parent
003930a3ce
commit
ed09dc6f56
3 changed files with 13 additions and 2 deletions
|
@ -168,7 +168,7 @@ RtpPacketSinkInterface* RtpDemuxer::ResolveSink(
|
||||||
// RSID and RRID are routed to the same sinks. If an RSID is specified on a
|
// RSID and RRID are routed to the same sinks. If an RSID is specified on a
|
||||||
// repair packet, it should be ignored and the RRID should be used.
|
// repair packet, it should be ignored and the RRID should be used.
|
||||||
std::string packet_mid, packet_rsid;
|
std::string packet_mid, packet_rsid;
|
||||||
bool has_mid = packet.GetExtension<RtpMid>(&packet_mid);
|
bool has_mid = use_mid_ && packet.GetExtension<RtpMid>(&packet_mid);
|
||||||
bool has_rsid = packet.GetExtension<RepairedRtpStreamId>(&packet_rsid);
|
bool has_rsid = packet.GetExtension<RepairedRtpStreamId>(&packet_rsid);
|
||||||
if (!has_rsid) {
|
if (!has_rsid) {
|
||||||
has_rsid = packet.GetExtension<RtpStreamId>(&packet_rsid);
|
has_rsid = packet.GetExtension<RtpStreamId>(&packet_rsid);
|
||||||
|
|
|
@ -137,6 +137,10 @@ class RtpDemuxer {
|
||||||
// Deprecated: Use the above method.
|
// Deprecated: Use the above method.
|
||||||
void DeregisterRsidResolutionObserver(const SsrcBindingObserver* observer);
|
void DeregisterRsidResolutionObserver(const SsrcBindingObserver* observer);
|
||||||
|
|
||||||
|
// Configure whether to look at the MID header extension when demuxing
|
||||||
|
// incoming RTP packets. By default this is enabled.
|
||||||
|
void set_use_mid(bool use_mid) { use_mid_ = use_mid; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Returns true if adding a sink with the given criteria would cause conflicts
|
// Returns true if adding a sink with the given criteria would cause conflicts
|
||||||
// with the existing criteria and should be rejected.
|
// with the existing criteria and should be rejected.
|
||||||
|
@ -197,6 +201,8 @@ class RtpDemuxer {
|
||||||
// Observers which will be notified when an RSID association to an SSRC is
|
// Observers which will be notified when an RSID association to an SSRC is
|
||||||
// resolved by this object.
|
// resolved by this object.
|
||||||
std::vector<SsrcBindingObserver*> ssrc_binding_observers_;
|
std::vector<SsrcBindingObserver*> ssrc_binding_observers_;
|
||||||
|
|
||||||
|
bool use_mid_ = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
|
@ -35,7 +35,12 @@ RtpStreamReceiverController::Receiver::~Receiver() {
|
||||||
controller_->RemoveSink(sink_);
|
controller_->RemoveSink(sink_);
|
||||||
}
|
}
|
||||||
|
|
||||||
RtpStreamReceiverController::RtpStreamReceiverController() = default;
|
RtpStreamReceiverController::RtpStreamReceiverController() {
|
||||||
|
// At this level the demuxer is only configured to demux by SSRC, so don't
|
||||||
|
// worry about MIDs (MIDs are handled by upper layers).
|
||||||
|
demuxer_.set_use_mid(false);
|
||||||
|
}
|
||||||
|
|
||||||
RtpStreamReceiverController::~RtpStreamReceiverController() = default;
|
RtpStreamReceiverController::~RtpStreamReceiverController() = default;
|
||||||
|
|
||||||
std::unique_ptr<RtpStreamReceiverInterface>
|
std::unique_ptr<RtpStreamReceiverInterface>
|
||||||
|
|
Loading…
Reference in a new issue