mirror of
https://github.com/livekit/livekit.git
synced 2026-11-12 12:08:48 +00:00
Set packet time for padding packets (#2091)
This commit is contained in:
1 parent
e46da0705a
commit
d0bfb349aa
1 file changed
+3
@@ -823,6 +823,7 @@ func (d *DownTrack) WritePaddingRTP(bytesToSend int, paddingOnMute bool, forceMa
|
||||
&hdr,
|
||||
len(payload),
|
||||
&sendPacketMetadata{
|
||||
packetTime: time.Now(),
|
||||
extSequenceNumber: snts[i].extSequenceNumber,
|
||||
extTimestamp: snts[i].extTimestamp,
|
||||
isPadding: true,
|
||||
@@ -1347,6 +1348,7 @@ func (d *DownTrack) writeBlankFrameRTP(duration float32, generation uint32) chan
|
||||
}
|
||||
|
||||
d.sendingPacket(&hdr, len(payload), &sendPacketMetadata{
|
||||
packetTime: time.Now(),
|
||||
extSequenceNumber: snts[i].extSequenceNumber,
|
||||
extTimestamp: snts[i].extTimestamp,
|
||||
})
|
||||
@@ -1861,6 +1863,7 @@ func (d *DownTrack) sendSilentFrameOnMuteForOpus() {
|
||||
&hdr,
|
||||
len(payload),
|
||||
&sendPacketMetadata{
|
||||
packetTime: time.Now(),
|
||||
extSequenceNumber: snts[i].extSequenceNumber,
|
||||
extTimestamp: snts[i].extTimestamp,
|
||||
// although this is using empty frames, mark as padding as these are used to trigger Pion OnTrack only
|
||||
|
||||
Reference in new issue
Block a user