Skip to content

Commit

Permalink
upgrade pion/webrtc to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
marcovidonis committed Oct 14, 2024
1 parent f21937e commit c6c28bb
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 127 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/dustin/go-humanize"
gbtree "github.com/google/btree"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"

"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/internal/check"
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"golang.org/x/time/rate"

"github.com/anacrolix/torrent/iplist"
Expand Down
41 changes: 20 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ require (
github.com/gorilla/websocket v1.5.0
github.com/jessevdk/go-flags v1.5.0
github.com/multiformats/go-multihash v0.2.3
github.com/pion/datachannel v1.5.2
github.com/pion/datachannel v1.5.9
github.com/pion/logging v0.2.2
github.com/pion/webrtc/v3 v3.1.42
github.com/pion/webrtc/v4 v4.0.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.2
github.com/protolambda/ctxlock v0.1.0
Expand All @@ -54,7 +54,7 @@ require (
go.opentelemetry.io/otel/sdk v1.11.1
go.opentelemetry.io/otel/trace v1.11.1
golang.org/x/sync v0.8.0
golang.org/x/sys v0.18.0
golang.org/x/sys v0.26.0
golang.org/x/time v0.0.0-20220609170525-579cf78fd858
)

Expand All @@ -75,7 +75,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 // indirect
github.com/honeycombio/honeycomb-opentelemetry-go v0.3.0 // indirect
github.com/honeycombio/opentelemetry-go-contrib/launcher v0.0.0-20221031150637-a3c60ed98d54 // indirect
Expand All @@ -90,21 +90,19 @@ require (
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/pion/dtls/v2 v2.2.4 // indirect
github.com/pion/ice/v2 v2.2.6 // indirect
github.com/pion/interceptor v0.1.11 // indirect
github.com/pion/mdns v0.0.5 // indirect
github.com/pion/dtls/v3 v3.0.3 // indirect
github.com/pion/ice/v4 v4.0.2 // indirect
github.com/pion/interceptor v0.1.37 // indirect
github.com/pion/mdns/v2 v2.0.7 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.9 // indirect
github.com/pion/rtp v1.7.13 // indirect
github.com/pion/sctp v1.8.2 // indirect
github.com/pion/sdp/v3 v3.0.5 // indirect
github.com/pion/srtp/v2 v2.0.9 // indirect
github.com/pion/stun v0.3.5 // indirect
github.com/pion/transport v0.13.1 // indirect
github.com/pion/transport/v2 v2.0.0 // indirect
github.com/pion/turn/v2 v2.0.8 // indirect
github.com/pion/udp v0.1.4 // indirect
github.com/pion/rtcp v1.2.14 // indirect
github.com/pion/rtp v1.8.9 // indirect
github.com/pion/sctp v1.8.33 // indirect
github.com/pion/sdp/v3 v3.0.9 // indirect
github.com/pion/srtp/v3 v3.0.4 // indirect
github.com/pion/stun/v3 v3.0.0 // indirect
github.com/pion/transport/v3 v3.0.7 // indirect
github.com/pion/turn/v4 v4.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/prometheus/client_model v0.2.0 // indirect
Expand All @@ -119,6 +117,7 @@ require (
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
github.com/wlynxg/anet v0.0.3 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opentelemetry.io/contrib/instrumentation/host v0.36.4 // indirect
go.opentelemetry.io/contrib/instrumentation/runtime v0.36.4 // indirect
Expand All @@ -136,10 +135,10 @@ require (
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
Expand Down
135 changes: 42 additions & 93 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/anacrolix/multiless"
"github.com/anacrolix/sync"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"golang.org/x/sync/errgroup"

"github.com/anacrolix/torrent/bencode"
Expand Down
2 changes: 1 addition & 1 deletion webrtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/peer-conn-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package webtorrent

import (
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

func GetPeerConnStats(pc *wrappedPeerConnection) (stats webrtc.StatsReport) {
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/peer-conn-stats_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package webtorrent

import (
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

// webrtc.PeerConnection.GetStats() is not currently supported for WASM. Return empty stats.
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/setting-engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io"

"github.com/pion/logging"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

var s = webrtc.SettingEngine{
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/setting-engine_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package webtorrent

import (
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

// I'm not sure what to do for logging for JS. See
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/tracker-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/anacrolix/log"
"github.com/gorilla/websocket"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"go.opentelemetry.io/otel/trace"

"github.com/anacrolix/torrent/tracker"
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/tracker-protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math"

"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

type AnnounceRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2/pproffd"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
Expand Down
2 changes: 1 addition & 1 deletion webtorrent/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/anacrolix/log"
qt "github.com/frankban/quicktest"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

func TestClosingPeerConnectionDoesNotCloseUnopenedDataChannel(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion wstracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/anacrolix/log"
"github.com/gorilla/websocket"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"

"github.com/anacrolix/torrent/tracker"
httpTracker "github.com/anacrolix/torrent/tracker/http"
Expand Down

0 comments on commit c6c28bb

Please sign in to comment.