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

Simulcast Routers #11

Open
billylindeman opened this issue Oct 9, 2022 · 0 comments · May be fixed by #12
Open

Simulcast Routers #11

billylindeman opened this issue Oct 9, 2022 · 0 comments · May be fixed by #12

Comments

@billylindeman
Copy link
Owner

billylindeman commented Oct 9, 2022

With the way simulcast is implemented in webrtc.rs, on the publisher side we will receive multiple track remotes with different .rid() values, so the current architecture needs to be changed to support simulcast.

What I'm envisioning is:

There will be a single MediaTrackRouter per stream-id held by the Session<>.
In the SessionEvent::TrackPublished handler, we can find or create the router, and then call add_layer(TrackRemote). This will preserve a 1-n relationship between MediaTrackRouter and MediaTrackSubscriber.

The router's broadcast queue will wrap the rtp::packet::Packet with information (like rid, keyframe, etc) and all this analysis will be done in the MediaTrackRouter::rtp_event_loop.

With this architecture, all logic around how to handle layer switching and keyframe syncing will be done inside the MediaTrackSubscriber. We already have plumbing in place to request keyframe on layer change, etc.

@billylindeman billylindeman linked a pull request Oct 9, 2022 that will close this issue
5 tasks
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 a pull request may close this issue.

1 participant