rtp icon indicating copy to clipboard operation
rtp copied to clipboard

Pion/RTP 1.7.1 broke mediaDevices and likely other stuff?

Open tomandersen opened this issue 4 years ago • 4 comments
trafficstars

Your environment.

  • Version: Release or SHA
  • Browser: include version
  • Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context

Linux/Mac latest, go 1.16 and go 1.17 Pion/webrtc 3.0.32 Pion/[email protected]

What did you do?

Tried to compile go build -a

github.com/pion/mediadevices/pkg/codec github.com/pion/mediadevices

github.com/pion/mediadevices

../codon/tmp/cache/go-path/pkg/mod/github.com/pion/[email protected]/track.go:342:33: cannot use mtu (type int) as type uint16 in argument to rtp.NewPacketizer ../codon/tmp/cache/go-path/pkg/mod/github.com/pion/[email protected]/track.go:462:33: cannot use mtu (type int) as type uint16 in argument to rtp.NewPacketizer

It wont work, as the interface in Pion/RTP for NewPacketizer switched and Pion/MediaDevices did not keep up. 1.7.0 func NewPacketizer(mtu int, pt uint8, ssrc uint32, payloader Payloader, sequencer Sequencer, clockRate uint32) Packetizer {

1.7.1 made the mtu argument a uint16 - see this https://github.com/pion/rtp/commit/e8906add970eeba43d123bf3bdbe4dbaf03ae578

So I needed to drop my version of RTP back to 1.7.0

Changing the argument on an exported function in a minor version release - is that a good thing?

It was kinda funny that it all ran on my local machine (mac go 1.17) but a build on Heroku failed.

tomandersen avatar Sep 07 '21 19:09 tomandersen

I think that maybe I should put a PR on mediaDevices ? I'm thinking of trying that.

tomandersen avatar Sep 13 '21 20:09 tomandersen

I think I see https://github.com/pion/mediadevices/runs/3402391987 has details about what needs to ba changed in medicDevices to catch up to Pion RTP 1.7.1 and later.

I'm not a go library expert!

tomandersen avatar Sep 13 '21 20:09 tomandersen

Hey @tomandersen

Sorry about the breakage! I think you just need to cast int -> uint16.

If you can start a PR I am happy to help get everything else updated.

Sean-Der avatar Sep 14 '21 14:09 Sean-Der

Any new about this issue ? I have the same problem her.

projetoarduino avatar Sep 24 '21 17:09 projetoarduino