mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Handle Simulcast RepairStream
Read + Discard packets from the Simulcast repair stream. When a Simulcast stream is enabled the remote will send packets via the repair stream for probing. We can't ignore these packets anymore because it will cause gaps in the feedback reports Resolves #1957
This commit is contained in:
@@ -247,7 +247,7 @@ func satisfyTypeAndDirection(remoteKind RTPCodecType, remoteDirection RTPTransce
|
||||
|
||||
// handleUnknownRTPPacket consumes a single RTP Packet and returns information that is helpful
|
||||
// for demuxing and handling an unknown SSRC (usually for Simulcast)
|
||||
func handleUnknownRTPPacket(buf []byte, midExtensionID, streamIDExtensionID uint8) (mid, rid string, payloadType PayloadType, err error) {
|
||||
func handleUnknownRTPPacket(buf []byte, midExtensionID, streamIDExtensionID, repairStreamIDExtensionID uint8, mid, rid, rsid *string) (payloadType PayloadType, err error) {
|
||||
rp := &rtp.Packet{}
|
||||
if err = rp.Unmarshal(buf); err != nil {
|
||||
return
|
||||
@@ -259,11 +259,15 @@ func handleUnknownRTPPacket(buf []byte, midExtensionID, streamIDExtensionID uint
|
||||
|
||||
payloadType = PayloadType(rp.PayloadType)
|
||||
if payload := rp.GetExtension(midExtensionID); payload != nil {
|
||||
mid = string(payload)
|
||||
*mid = string(payload)
|
||||
}
|
||||
|
||||
if payload := rp.GetExtension(streamIDExtensionID); payload != nil {
|
||||
rid = string(payload)
|
||||
*rid = string(payload)
|
||||
}
|
||||
|
||||
if payload := rp.GetExtension(repairStreamIDExtensionID); payload != nil {
|
||||
*rsid = string(payload)
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user