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

Pion/RTP 1.7.1 broke mediaDevices and likely other stuff? #151

Open
tomandersen opened this issue Sep 7, 2021 · 4 comments
Open

Pion/RTP 1.7.1 broke mediaDevices and likely other stuff? #151

tomandersen opened this issue Sep 7, 2021 · 4 comments

Comments

@tomandersen
Copy link

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
e8906ad

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
Copy link
Author

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

@tomandersen
Copy link
Author

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!

@Sean-Der
Copy link
Member

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.

@projetoarduino
Copy link

projetoarduino commented Sep 24, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants