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

Make Track an interface #1025

Closed
at-wat opened this issue Feb 13, 2020 · 2 comments
Closed

Make Track an interface #1025

at-wat opened this issue Feb 13, 2020 · 2 comments

Comments

@at-wat
Copy link
Member

at-wat commented Feb 13, 2020

To deal with a MediaStreamTrack coming from an another package like pion/mediadevices, Track would be better to be an interface something like:

type Track interface {
  ID() string
}
type LocalTrack interface {
  Track
  ReadRTP() (*rtp.Packet, error)
  ...
}
type RemoteTrack interface {
  Track
  WriteRTP(*rtp.Packet) error
  ...
}
type RTPSender interface {
  ReplaceTrack(LocalTrack) error
}
type RTPReceiver interface {
  ReplaceTrack(RemoteTrack) error
}

ref: pion/mediadevices#39 (comment)

It might require a lot of breaking changes, so it would be a v3 matter.

@Sean-Der
Copy link
Member

@at-wat 👍, my goal is to publish a new release this weekend. Then feel free to break anything/everything you want in master :)

If you wouldn't mind adding stuff to https://github.com/pion/webrtc/wiki/PlanningV3 that would be really helpful. I want to make sure our new changes interact well with.

  • Better Stats
  • NACK
  • Congestion Control
  • SVC/Simulcast

All of these are hurt by the current API. So would be awesome if we get it right the first time :)

@Sean-Der
Copy link
Member

I am covering here https://github.com/pion/webrtc/projects/17

/v3 has been complicated because of all the use cases I am trying to cover. I am sure we will come to a good solution, but need to get it all into one place.

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

No branches or pull requests

2 participants