Merge GetRTP and Nack into GetPacket.

The two function were always called together.  This factors out
the NACKing logic into the track.
This commit is contained in:
Juliusz Chroboczek committed 2021-07-14 14:22:22 +02:00
1 parent 36d31f0db8
commit 3d2089f40f
3 files changed
+23 -37

No files matched your search

+3 -3
View File
@@ -25,9 +25,9 @@ type UpTrack interface {
Kind() webrtc.RTPCodecType
Label() string
Codec() webrtc.RTPCodecCapability
// get a recent packet. Returns 0 if the packet is not in cache.
GetRTP(seqno uint16, result []byte) uint16
Nack(seqnos []uint16) error
// GetPacket fetches a recent packet. Returns 0 if the packet is
// not in cache, and, in that case, optionally schedules a NACK.
GetPacket(seqno uint16, result []byte, nack bool) uint16
RequestKeyframe() error
}