Add buffer factory

Allow to configure a buffer factory on SettingEngine to provide
a custom buffer for RTP/RTCP
This commit is contained in:
OrlandoCo
2020-12-18 18:34:37 -06:00
committed by Tarrence van As
parent c387312c60
commit 6ef4c1bba8
4 changed files with 10 additions and 7 deletions

View File

@@ -3,10 +3,12 @@
package webrtc
import (
"io"
"time"
"github.com/pion/ice/v2"
"github.com/pion/logging"
"github.com/pion/transport/packetio"
"github.com/pion/transport/vnet"
"golang.org/x/net/proxy"
)
@@ -53,6 +55,7 @@ type SettingEngine struct {
disableSRTPReplayProtection bool
disableSRTCPReplayProtection bool
vnet *vnet.Net
BufferFactory func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
LoggerFactory logging.LoggerFactory
iceTCPMux ice.TCPMux
iceProxyDialer proxy.Dialer