Split out mediatransportutil (#1071)

This commit is contained in:
Raja Subramanian
2022-10-06 23:55:59 +05:30
committed by GitHub
parent c3120679e6
commit 792349cc56
19 changed files with 30 additions and 1568 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import (
"io"
"sync"
"github.com/livekit/mediatransportutil/pkg/bucket"
"github.com/pion/transport/packetio"
)
@@ -19,13 +20,13 @@ func NewBufferFactory(trackingPackets int) *Factory {
return &Factory{
videoPool: &sync.Pool{
New: func() interface{} {
b := make([]byte, trackingPackets*maxPktSize)
b := make([]byte, trackingPackets*bucket.MaxPktSize)
return &b
},
},
audioPool: &sync.Pool{
New: func() interface{} {
b := make([]byte, maxPktSize*200)
b := make([]byte, bucket.MaxPktSize*200)
return &b
},
},