Update pion/webrtc library to v4

This commit is contained in:
Alex X
2025-04-07 16:21:14 +03:00
parent bfd26560b1
commit af7509ebaf
25 changed files with 57 additions and 131 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ import (
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/xnet"
"github.com/pion/ice/v2"
"github.com/pion/ice/v4"
"github.com/pion/interceptor"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)
// ReceiveMTU = Ethernet MTU (1500) - IP Header (20) - UDP Header (8)
+1 -1
View File
@@ -3,7 +3,7 @@ package webrtc
import (
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/sdp/v3"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)
func (c *Conn) CreateOffer(medias []*core.Media) (string, error) {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"testing"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/rtcp"
"github.com/pion/rtp"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)
type Conn struct {
+3 -3
View File
@@ -11,10 +11,10 @@ import (
"time"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/ice/v2"
"github.com/pion/ice/v4"
"github.com/pion/sdp/v3"
"github.com/pion/stun"
"github.com/pion/webrtc/v3"
"github.com/pion/stun/v3"
"github.com/pion/webrtc/v4"
)
func UnmarshalMedias(descriptions []*sdp.MediaDescription) (medias []*core.Media) {
+1 -1
View File
@@ -2,7 +2,7 @@ package webrtc
import (
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)
func (c *Conn) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error) {
+1 -1
View File
@@ -3,7 +3,7 @@ package webrtc
import (
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/pion/sdp/v3"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)
func (c *Conn) SetOffer(offer string) (err error) {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"sync"
"github.com/pion/rtp"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)
type Track struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package webrtc
import (
"testing"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"github.com/stretchr/testify/require"
)