-
Notifications
You must be signed in to change notification settings - Fork 863
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
No connection status feedback on connecting side (srt-live-transmit / stransmit) #410
Comments
Hard to speculate anything without grabbing the details. Please try to collect debug logs and maybe pcap. Then it will be seen whether any packets are running around. At least I can't see any problem with these commands. |
Hello @gissleh , |
I have no issues sending/receiving data, so I'm not sure how a pcap would help. The problem is that there is no sure way to know the connection status of a client This may not be a bug, but my use case for stream contribution via SRT would benefit from more information about connectivity. |
Hey @rndi. That does not happen. I added |
I see. Probably this is because of the following line: |
I tried with adding |
@mdi, could you look into why adding |
This is still the case as of the latest master branch commit. Even if the flags mentioned are set to 0x7fffffff in all three places in srt-live-transmit, the connecting side only gets status 6 when it fails to connect. |
In the non-blocking mode the ERR epoll flag is updated on a socket, the m_bConnected field is set to false and that's actually all that happens (e.g. the socket remains in Also, if the socket was pending for connection and was found as ready to write, it should be then used in |
What about polling the socket state after the epoll if block in srt-live-transmit? It is a bit ugly, and probably not the most performant, but the numbers do change in the test code below when the connection state does. if (src != nullptr && tar != nullptr) {
cerr << srt_getsockstate(src.get()->GetSRTSocket()) << ' ' << srt_getsockstate(tar.get()->GetSRTSocket()) << endl;
} |
Any updates on this? I have tested with a recent pull of master, and there's still no connection feedback. |
Hi @gissleh,
As we see, none of these conditions is satisfied. So this is basically a limitation of the sample application, not the SRT library itself. We have a low priority for this right now. What level of priority is it for your tasks? |
I am still evaluating SRT for stream contribution. If I'm not entirely on board with using epoll anyway, which I think is why |
@gissleh However, the issue you've opened, is a bug, that we will fix, but, as I've already wrote, with low priority. So please do not close it. If you share the details of your solution or a task you are solving, we might suggest proper tools for you. |
I get a segfault when running Where I want to use SRT is to get a UDP MPEGTS stream from a location where video is captured and encoded into a format suitable for sending over the internet, and have it arrive in a datacenter for further encoding and distribution. Low and consistent latency and resiliency to underlying network conditions are important. SRT and the on-site encoder will most often reside on the same machine. |
@gissleh, yes, sorry. There was a crash after the connection is closed. Should be fixed now.
So your workflow is the following, right? |
I tried your branch again. That is the workflow, yes. I have seen the problems caused by the shortcuts Linux seems to take on localhost UDP (unicast and multicast). I also saw a noticeable reduction of errors by having a simple thread-based blocking UDP reader (udp read thread -> message queue -> stdout writer thread) in front of I am currently looking into SRT as a free software solution to work with existing tooling, but the company I work for will reach out on more official channels if that changes. |
Great, thanks for reporting back!
Yes, by using UDP inbetween you partially loose the reliability. You would never know if you have lost some data or not. |
There is no feedback from
srt-live-transmit
when the connection status of the session changes on the non-listening side of the transmission.There is some output on the listening side. It even says "Accepted..." if there's mismatching passphrase settings, even though it does print out other errors regarding that.
But there's nothing on the other connecting side, not even with the
-v
option passedSwitching the target/source roles around changes nothing.
Are there limitations in the protocol that makes this difficult? I have tried to dig around in the code, but so far haven't found anywhere in the code that's explicitly called upon connection.
The text was updated successfully, but these errors were encountered: