-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Avoid including SSRC in single media offers #2395
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2395 +/- ##
==========================================
- Coverage 77.74% 77.62% -0.12%
==========================================
Files 87 87
Lines 9311 9297 -14
==========================================
- Hits 7239 7217 -22
- Misses 1646 1647 +1
- Partials 426 433 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Nice catch! Thanks for the PR @streamer45 I believe something else is broken here. For Simulcast we can't put a SSRC in the MediaSection since we will have multiple. Are you able to write a test of |
@Sean-Der I believe we have: webrtc/peerconnection_media_test.go Line 1213 in 9dd2c42
Maybe I could build on that to cover the changes in here. Let me know. |
@streamer45 that would be fantastic! I don’t fully understand what is broken, but if you have a failing test would help a lot. |
@Sean-Der Let me know if there's anything else needed to move this forward. Thanks :) |
Shit, sorry I missed this @streamer45! I have some time off work and will be able to work on this now |
@streamer45 Nope nothing is needed. I just got caught up in day job. With this repro I have everything I need. I don't know exactly what is wrong/the fix. I should have a full understanding tonight and understand how to move forward. |
Everytime we receieve a new SSRC we probe it and try to determine the proper way to handle it. In most cases a Track explicitly declares a SSRC and a OnTrack is fired. In two cases we don't know the SSRC ahead of time * Undeclared SSRC in a single media section (pion#880) * Simulcast The Undeclared SSRC processing code would run before Simulcast. If a Simulcast Offer/Answer only contained one Media Section we would never fire the OnTrack. We would assume it was a failed Undeclared SSRC processing. This commit fixes the behavior.
Thank you so much for this PR @streamer45! That was a gnarly issue, lots of niche parts interacting :) This is the commit I am landing.
I am sorry I have been so slow on Pion lately. I am going to be working on it more. I would love to have you involved more also. If you have any feedback on the project (and how I can make it better I would love to hear) I am going to drive down our PRs/Issues and cut a new release. |
Thanks Sean, appreciate the explanation there and the extra work on this 🙌 |
Description
Sending simulcast tracks from a pion sender to a pion receiver is failing unless there are other medias added:
I admit I am not well versed in SDP semantics so please let me know if there's more to this that we should consider. The proposed changes are incredibly dumb as we are simply checking if there are multiple media sections and if not we avoid adding the ssrc attribute.
Reference issue
This is strictly related to #2299 which I guess is also a working solution although I am thinking that if we are being strict on the receiving side we should probably do the same on the sending side.