rtp
rtp copied to clipboard
Pion/RTP 1.7.1 broke mediaDevices and likely other stuff?
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.
I think that maybe I should put a PR on mediaDevices ? I'm thinking of trying that.
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!
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.
Any new about this issue ? I have the same problem her.