mirror of
https://github.com/livekit/livekit.git
synced 2026-04-26 15:17:35 +00:00
In order to avoid race conditions with WebRTC, where either side could initiate an offer when tracks have changes, we'll always initiate them from the SFU side.
22 lines
304 B
Go
22 lines
304 B
Go
package rtc
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/pion/ion-sfu/pkg/buffer"
|
|
)
|
|
|
|
const (
|
|
rtpPacketMaxSize = 1460
|
|
)
|
|
|
|
// package level factories for buffers
|
|
var (
|
|
bufferFactory = buffer.NewBufferFactory()
|
|
packetFactory = &sync.Pool{
|
|
New: func() interface{} {
|
|
return make([]byte, rtpPacketMaxSize)
|
|
},
|
|
}
|
|
)
|