Files
livekit/pkg/rtc/factory.go
David Zhao 258f5add2d protocol update: explicit AddTrack to move negotiation initiation to server side.
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.
2021-01-09 23:40:29 -08:00

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)
},
}
)