-
Notifications
You must be signed in to change notification settings - Fork 93
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
Reconnecting to stream #180
Comments
As far as I understand, this does not directly contradict the RFC |
Hi, thank you for submitting this. I added #183 to discuss what happens in RTCP when a stream drops. As for reconnecting the stream, I have to think and investigate this a little more before coming to a conclusion. I feel that modifying the most important API function is a bit intrusive (and potentially confusing) when this is mostly used to restarting streams when something has gone wrong. Still, I like the idea of possibly restarting the stream with the same SSRC if the end had to close temporarily (maybe preparing for crashes is not a good reason, but subscribing to an existing stream or something similar might be enough justification for this). So my points are:
I can also try to figure out something, but it may be a while before I have the time. BR, Joni |
|
@wowaser Ok, you have convinced me. Please add the implementation to here. Add a new RCC_ flag here. Name could as simple as RCC_SSRC This discussion does bring up the question that there should a proper way to also get the value of these variables. I added #184 to discuss this. This would deprecate the get_ssrc function in media_stream. BR, Joni |
Hello,
I have a problem reconnecting streams if one side crashes or exits uncontrollably (without notifying the other side). The situation is the following: I have unicast streams, one sender and one receiver, using RTCP.
When one side crashes and is restarted, the RTCP goes crazy. Functionally, RTP and RTCP still work, because they are connectionless. This is because when restarted, the stream gets new random SSRC and starts sending RR/SR and other RTCP packets with that SSRC.
![image](https://user-images.githubusercontent.com/70014877/205181821-e371f8ce-c05f-4b04-acd5-28902e4050ac.png)
![image](https://user-images.githubusercontent.com/70014877/205181919-4d3fd5fa-86b0-43ca-a9d5-8223eb1f19df.png)
If the receiver is restarted, the sender side spams this (the "new" incomplete participant does not have a socket allocated):
If the sender is restarted, the receiver side spams this:
In both cases, the RTCP thread on the receiver side never exits, even after destructors are called and everything goes out of scope.
There is currently no way to manage this. I think that a simple solution would be to give user the option to manually set stream SSRC when creating it. That way when the stream is restarted it does not get a new random SSRC, but essentially smoothly reconnects with a pre-defined one.
The text was updated successfully, but these errors were encountered: