mirror of
https://github.com/livekit/livekit.git
synced 2026-04-27 02:05:25 +00:00
258f5add2d
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)
|
|
},
|
|
}
|
|
)
|