Skip to content

Commit

Permalink
upgrade pion/webrtc to v4 (anacrolix#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcovidonis authored and Ns2Kracy committed Nov 15, 2024
1 parent cbccc02 commit 0298550
Show file tree
Hide file tree
Showing 15 changed files with 72 additions and 139 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
39 changes: 19 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ require (
github.com/google/go-cmp v0.6.0
github.com/gorilla/websocket 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/protolambda/ctxlock v0.1.0
github.com/stretchr/testify v1.9.0
github.com/tidwall/btree v1.6.0
go.etcd.io/bbolt v1.3.6
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 @@ -59,7 +59,7 @@ require (
github.com/benbjohnson/immutable v0.3.0 // indirect
github.com/bits-and-blooms/bitset v1.2.2 // indirect
github.com/go-llsqlite/crawshaw v0.5.2-0.20240425034140-f30eb7704568 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/klauspost/cpuid/v2 v2.2.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
Expand All @@ -69,30 +69,29 @@ 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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/dnscache v0.0.0-20211102005908-e0241e321417 // indirect
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
github.com/wlynxg/anet v0.0.3 // 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/net v0.29.0 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.1.6 // indirect
Expand Down
146 changes: 40 additions & 106 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"

"github.com/anacrolix/torrent/webtorrent"
)
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"

"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"
)

const (
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 0298550

Please sign in to comment.