Remove FIR sending code.
We no longer send FIRs.
This commit is contained in:
@@ -226,8 +226,6 @@ func (down *rtpDownConnection) flushICECandidates() error {
|
|||||||
|
|
||||||
type upTrackAtomics struct {
|
type upTrackAtomics struct {
|
||||||
lastPLI uint64
|
lastPLI uint64
|
||||||
lastFIR uint64
|
|
||||||
firSeqno uint32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type rtpUpTrack struct {
|
type rtpUpTrack struct {
|
||||||
@@ -546,41 +544,6 @@ func sendPLI(pc *webrtc.PeerConnection, ssrc webrtc.SSRC) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (up *rtpUpConnection) sendFIR(track *rtpUpTrack, increment bool) error {
|
|
||||||
// we need to reliably increment the seqno, even if we are going
|
|
||||||
// to drop the packet due to rate limiting.
|
|
||||||
var seqno uint8
|
|
||||||
if increment {
|
|
||||||
seqno = uint8(atomic.AddUint32(&track.atomics.firSeqno, 1) & 0xFF)
|
|
||||||
} else {
|
|
||||||
seqno = uint8(atomic.LoadUint32(&track.atomics.firSeqno) & 0xFF)
|
|
||||||
}
|
|
||||||
|
|
||||||
if !track.hasRtcpFb("ccm", "fir") {
|
|
||||||
return ErrUnsupportedFeedback
|
|
||||||
}
|
|
||||||
last := atomic.LoadUint64(&track.atomics.lastFIR)
|
|
||||||
now := rtptime.Jiffies()
|
|
||||||
if now >= last && now-last < rtptime.JiffiesPerSec/2 {
|
|
||||||
return ErrRateLimited
|
|
||||||
}
|
|
||||||
atomic.StoreUint64(&track.atomics.lastFIR, now)
|
|
||||||
return sendFIR(up.pc, track.track.SSRC(), seqno)
|
|
||||||
}
|
|
||||||
|
|
||||||
func sendFIR(pc *webrtc.PeerConnection, ssrc webrtc.SSRC, seqno uint8) error {
|
|
||||||
return pc.WriteRTCP([]rtcp.Packet{
|
|
||||||
&rtcp.FullIntraRequest{
|
|
||||||
FIR: []rtcp.FIREntry{
|
|
||||||
{
|
|
||||||
SSRC: uint32(ssrc),
|
|
||||||
SequenceNumber: seqno,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (up *rtpUpConnection) sendNACK(track *rtpUpTrack, first uint16, bitmap uint16) error {
|
func (up *rtpUpConnection) sendNACK(track *rtpUpTrack, first uint16, bitmap uint16) error {
|
||||||
if !track.hasRtcpFb("nack", "") {
|
if !track.hasRtcpFb("nack", "") {
|
||||||
return ErrUnsupportedFeedback
|
return ErrUnsupportedFeedback
|
||||||
|
|||||||
Reference in New Issue
Block a user