From 0b5cae31f44f771c076a82da0e3aa78c74357156 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 30 Dec 2024 22:34:50 +0100 Subject: [PATCH] Use empty interceptor registry. This is the default in Pion v3, but not in v4. This is required since we do our own NACK handling and congestion control. --- go.mod | 2 +- group/group.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4750fb1..ac06e7a 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/jech/cert v0.0.0-20240301122532-f491cf43a77d github.com/jech/samplebuilder v0.0.0-20221109182433-6cbba09fc1c9 github.com/pion/ice/v2 v2.3.37 + github.com/pion/interceptor v0.1.37 github.com/pion/rtcp v1.2.15 github.com/pion/rtp v1.8.10 github.com/pion/sdp/v3 v3.0.9 @@ -24,7 +25,6 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/pion/datachannel v1.5.10 // indirect github.com/pion/dtls/v2 v2.2.12 // indirect - github.com/pion/interceptor v0.1.37 // indirect github.com/pion/logging v0.2.2 // indirect github.com/pion/mdns v0.0.12 // indirect github.com/pion/randutil v0.1.0 // indirect diff --git a/group/group.go b/group/group.go index 1bdd82e..a1b2e36 100644 --- a/group/group.go +++ b/group/group.go @@ -16,6 +16,7 @@ import ( "time" "github.com/pion/ice/v2" + "github.com/pion/interceptor" "github.com/pion/sdp/v3" "github.com/pion/webrtc/v3" @@ -364,6 +365,7 @@ func APIFromCodecs(codecs []webrtc.RTPCodecParameters) (*webrtc.API, error) { if !UseMDNS { s.SetICEMulticastDNSMode(ice.MulticastDNSModeDisabled) } + m := webrtc.MediaEngine{} for _, codec := range codecs { @@ -388,9 +390,12 @@ func APIFromCodecs(codecs []webrtc.RTPCodecParameters) (*webrtc.API, error) { webrtc.RTPHeaderExtensionCapability{sdp.SDESRTPStreamIDURI}, webrtc.RTPCodecTypeVideo) + ir := interceptor.Registry{} + return webrtc.NewAPI( webrtc.WithSettingEngine(s), webrtc.WithMediaEngine(&m), + webrtc.WithInterceptorRegistry(&ir), ), nil }