Commit b09dba0e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove FIR sending code.

We no longer send FIRs.
parent d3f53e6a
...@@ -225,9 +225,7 @@ func (down *rtpDownConnection) flushICECandidates() error { ...@@ -225,9 +225,7 @@ 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 { ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment