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

Allow to use user defined Track #39

Merged
merged 1 commit into from
Feb 13, 2020
Merged

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented Feb 12, 2020

Add WithTrackGenerator option to specify TrackGenerator.
This allows user to replace Track by user defined one that
has WriteSample() and Codec() interface.

So that we can get encoded media streams directly from MediaDevices.

Add WithTrackGenerator option to specify TrackGenerator.
This allows user to replace Track by user defined one that
has WriteSample() and Codec() interface.
Copy link
Member

@lherman-cs lherman-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -21,14 +21,19 @@ type Tracker interface {
OnEnded(func(error))
}

type LocalTrack interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually kinda discussed this with Sean about this. I believe right now pion/webrtc is moving to 3.0, https://github.com/pion/webrtc/tree/v3, and he's open to adding some breaking changes. So, I was wondering if we should make a change in pion/webrtc to convert Track to be an interface. That way we can simply reuse the interface from pion/webrtc and simplify this file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, for now, we can definitely keep this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, it would be very nice to have it in pion/webrtc in v3.

@lherman-cs lherman-cs merged commit bca2542 into master Feb 13, 2020
@lherman-cs lherman-cs deleted the allow-user-defined-track branch February 13, 2020 06:24
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

Successfully merging this pull request may close these issues.

2 participants