-
Notifications
You must be signed in to change notification settings - Fork 42
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
RTP matching rules: don't remove pt_table[packet.pt] #547
Comments
...because remember: "SSRCs can collide at any time because they are just 32 bits long !!!" so every RFC and RTP related spec must waste at least 10 lines to prevent this "probable" issue. |
Even more: this problem also happen when So, two things:
|
@robin-raymond This Issue appears to exist in your proposed matching algorithm if an SSRC were previously specified or was locked and is then changed (e.g. due to a conflict). So Step 4 below may not be correct:
|
Guys, there is a problem if we always store the PT values in the Many
So, the |
Friendly ping. |
@ibc You are correct. It is not an error for multiple RtpReceivers to utilize the same PT value, since they can receive the correct stream via the SSRC (or muxId). Note that in the original routing rules, a PT_table entry is only created if all of the parameters.encodings[i].ssrc is unset. So if multiple receivers were to specify the same PT, this would not be a problem as long as each specified an SSRC. However, if more than one receiver left all of the parameters.encodings[i].ssrc unset, then an error would result since pt_table[pt] is already set to a value other than receiver. This is in fact a problem because it means that two receivers had registered to receive packets with the same PT value, regardless of SSRC. Overall, I think this points out the complexity of the routing rules - and the difficulty of verifying that proposed changes do not result in regressions. It makes me wonder if we need to develop test cases that we run through whenever we propose changes. |
After implementing it, my conclusions are:
So this is a kind of "first-come first-served" or, in other words, just the first of many Some working test units here: https://github.com/ibc/mediasoup/blob/master/test/test_RtpReceiver.js#L23 |
@ibc I have consolidated all the proposed matching rule changes into PR #555 so we can review all of them in one place. One issue that is not yet addressed is handling of RTX/RED/FEC. As you say, ptTable should not be filled for RTX if encoding.rtx.ssrc is set and for FEC if encoding.fec.ssrc is set. For RED, ptTable should not be filled if encoding.ssrc is set for the RED codec. Need to revisit this if/when the object model changes. |
Robin believes that his algorithm doesn't exhibit this issue either. So we have assigned it to him :) |
Routing Rules PR in JSEP: rtcweb-wg/jsep#320 |
Thread in RTCWEB WG: https://mailarchive.ietf.org/arch/msg/rtcweb/QnN6PBpIM-U5Q1NKvr64b2l8Vms |
@ibc @robin-raymond In JSEP Section 7 rules, PT_Table entries are not removed, and there is no latching of SSRCs due to PT matches. JSEP Section 7 rules do fill the PT table even if SSRCs are specified, though the PT table is only consulted if there is no MID or SSRC match. There is no statement about errors if PTs are not unique, so maybe there needs to be some arbitration mechanism (e.g. first PT_Table entry wins, last entry wins, etc.). So the requests seem to be fulfilled: Fill pt_table always, even if ssrcs are given. Do you think that the JSEP Section 7 rules resolve this issue? |
Routing Rules update to address compatibility with Section 7 of https://tools.ietf.org/html/draft-ietf-rtcweb-jsep Addresses the following issues: #368, #546, #547
@ibc @robin-raymond - Can you check whether this issue is resolved by PR #602 (which is based on JSEP Section 7)? |
It looks to me like this Issue is addressed by the JSEP Section 7 rules. The proposed algorithm does not remove The proposed algorithm also supports "first-come first-served" allowing the first of many |
JSEP rules have changed: |
@ibc @robin-raymond @pthatcherg The JSEP Appendix B RTP matching rules appear to address this issue, correct? The proposed rules do not remove pt_table entries except if PT overlap is created by a call to receive(). |
I believe that this issue has ben resolved in the current draft. Please reopen if it is not fixed. |
Don't remove them. If the sender changes the SSRC (without signaling it to us) the RTP packet won't match any rule.
The text was updated successfully, but these errors were encountered: