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
2021-07-14 14:20:52 +02:00
parent 36d31f0db8
commit 3d2089f40f
3 changed files with 23 additions and 37 deletions
+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
}