Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate pion v4 #11

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ go 1.23.1
require (
github.com/gorilla/websocket v1.5.3
github.com/pion/interceptor v0.1.37
github.com/pion/mediadevices v0.6.4
github.com/pion/mediadevices v0.7.0
github.com/pion/rtcp v1.2.14
github.com/pion/rtp v1.8.9
github.com/pion/webrtc/v3 v3.3.4
github.com/pion/webrtc/v4 v4.0.5
github.com/tiiuae/rclgo v0.0.0-20240131135202-56b24e11219b
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
)

require (
github.com/alessio/shellescape v1.4.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -26,27 +25,25 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pion/datachannel v1.5.9 // indirect
github.com/pion/dtls/v2 v2.2.12 // indirect
github.com/pion/ice/v2 v2.3.36 // indirect
github.com/pion/dtls/v3 v3.0.4 // indirect
github.com/pion/ice/v4 v4.0.3 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.12 // indirect
github.com/pion/mdns/v2 v2.0.7 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/sctp v1.8.33 // indirect
github.com/pion/sctp v1.8.34 // indirect
github.com/pion/sdp/v3 v3.0.9 // indirect
github.com/pion/srtp/v2 v2.0.20 // indirect
github.com/pion/stun v0.6.1 // indirect
github.com/pion/transport/v2 v2.2.10 // indirect
github.com/pion/turn/v2 v2.1.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // 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/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/wlynxg/anet v0.0.3 // indirect
github.com/wlynxg/anet v0.0.5 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/image v0.23.0 // indirect
golang.org/x/mod v0.22.0 // indirect
Expand Down
90 changes: 22 additions & 68 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
send_peerconnectionchannel "github.com/3DRX/webrtc-ros-bridge/sender/peer_connection_channel"
send_roschannel "github.com/3DRX/webrtc-ros-bridge/sender/ros_channel"
send_signalingchannel "github.com/3DRX/webrtc-ros-bridge/sender/signaling_channel"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"github.com/tiiuae/rclgo/pkg/rclgo/types"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sensor_msgs_msg "github.com/3DRX/webrtc-ros-bridge/rclgo_gen/sensor_msgs/msg"
"github.com/pion/interceptor"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"github.com/tiiuae/rclgo/pkg/rclgo"
"github.com/tiiuae/rclgo/pkg/rclgo/types"
)
Expand Down
11 changes: 4 additions & 7 deletions receiver/peer_connection_channel/webm_saver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@ import (
"unsafe"

sensor_msgs_msg "github.com/3DRX/webrtc-ros-bridge/rclgo_gen/sensor_msgs/msg"
"github.com/pion/interceptor/pkg/jitterbuffer"
"github.com/pion/rtp"
"github.com/pion/rtp/codecs"
"github.com/pion/webrtc/v3/pkg/media/samplebuilder"
"github.com/pion/webrtc/v4/pkg/media/samplebuilder"
"github.com/tiiuae/rclgo/pkg/rclgo/types"
)

type WebmSaver struct {
vp8Builder *samplebuilder.SampleBuilder
videoTimestamp time.Duration

h264JitterBuffer *jitterbuffer.JitterBuffer
lastVideoTimestamp uint32
codecCtx C.vpx_codec_ctx_t
codecCreated bool
Expand All @@ -32,10 +30,9 @@ type WebmSaver struct {

func newWebmSaver(imgChan chan<- types.Message) *WebmSaver {
return &WebmSaver{
vp8Builder: samplebuilder.New(200, &codecs.VP8Packet{}, 90000),
h264JitterBuffer: jitterbuffer.New(),
imgChan: imgChan,
codecCreated: false,
vp8Builder: samplebuilder.New(200, &codecs.VP8Packet{}, 90000),
imgChan: imgChan,
codecCreated: false,
}
}

Expand Down
2 changes: 1 addition & 1 deletion receiver/signaling_channel/signaling_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/3DRX/webrtc-ros-bridge/config"
"github.com/gorilla/websocket"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"golang.org/x/exp/rand"
)

Expand Down
4 changes: 2 additions & 2 deletions sender/peer_connection_channel/peer_connection_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/pion/mediadevices"
"github.com/pion/mediadevices/pkg/codec/vpx"
"github.com/pion/mediadevices/pkg/prop"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
"github.com/tiiuae/rclgo/pkg/rclgo"
"github.com/tiiuae/rclgo/pkg/rclgo/types"
)
Expand Down Expand Up @@ -120,7 +120,7 @@ func InitPeerConnectionChannel(
})
_, err := peerConnection.AddTransceiverFromTrack(
videoTrack,
webrtc.RtpTransceiverInit{
webrtc.RTPTransceiverInit{
Direction: webrtc.RTPTransceiverDirectionSendonly,
},
)
Expand Down
2 changes: 1 addition & 1 deletion sender/signaling_channel/signaling_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/3DRX/webrtc-ros-bridge/config"
"github.com/gorilla/websocket"
"github.com/pion/webrtc/v3"
"github.com/pion/webrtc/v4"
)

type Action struct {
Expand Down
Loading