Move callbacks out of messageRouter (#269)

* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
This commit is contained in:
David Colburn
2021-12-17 13:19:23 -08:00
committed by GitHub
parent a06edd885e
commit faa870de3d
82 changed files with 315 additions and 527 deletions
+7 -7
View File
@@ -1,13 +1,13 @@
package testutils
import (
"github.com/livekit/livekit-server/pkg/sfu/buffer"
"github.com/pion/rtp"
"github.com/pion/webrtc/v3"
"github.com/livekit/livekit-server/pkg/sfu/buffer"
)
//-----------------------------------------------------------
// -----------------------------------------------------------
type TestExtPacketParams struct {
SetMarker bool
@@ -23,7 +23,7 @@ type TestExtPacketParams struct {
ArrivalTime int64
}
//-----------------------------------------------------------
// -----------------------------------------------------------
func GetTestExtPacket(params *TestExtPacketParams) (*buffer.ExtPacket, error) {
packet := rtp.Packet{
@@ -56,7 +56,7 @@ func GetTestExtPacket(params *TestExtPacketParams) (*buffer.ExtPacket, error) {
return ep, nil
}
//--------------------------------------
// --------------------------------------
func GetTestExtPacketVP8(params *TestExtPacketParams, vp8 *buffer.VP8) (*buffer.ExtPacket, error) {
ep, err := GetTestExtPacket(params)
@@ -69,7 +69,7 @@ func GetTestExtPacketVP8(params *TestExtPacketParams, vp8 *buffer.VP8) (*buffer.
return ep, nil
}
//--------------------------------------
// --------------------------------------
var TestVP8Codec = webrtc.RTPCodecCapability{
MimeType: "video/vp8",
@@ -81,4 +81,4 @@ var TestOpusCodec = webrtc.RTPCodecCapability{
ClockRate: 48000,
}
//--------------------------------------
// --------------------------------------