mirror of
https://github.com/livekit/livekit.git
synced 2026-05-11 16:54:54 +00:00
Set packet time for padding packets (#2091)
This commit is contained in:
@@ -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