-
Hi everyone, I have an SRT source, and my program (server) is supposed to receive the stream with Gstreamer, decode it, process it and send the resulting video stream to other clients when they request it. This is a brief description of the order of operations:
What I have nowAs of now I implemented this workflow, and it works to some degree. What is missing is that once I establish the SRT connection in point 2, the server immediately starts to receive buffers and, if no client connects to the server, I briefly start to get error messages like the following:
which later sometimes bring to
and a subsequent crash of my server. The problem here is that the server starts to receive buffers from the SRT source as soon as the connection is done, and whene the queues in my pipeline fill up, packets start to be dropped and the errors appear. If I start the server, the SRT source and the clients in rapid succession, none of these errors appear, the queues mitigate this problem. What I would like to haveI would hope to "block" SRT reception until I decide that I am ready to consume buffers. Now, I think that it is not strictly possible with SRT and I am fine with that, but I am asking this here to also understand if my reasoning is sound and if someone has already solved this use case. A solution that I tried is blocking the srtsrc element in gstreamer when no client is present, but the errors stil appear as the internal buffers are filled with packets and then dropped. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Frankly, I can't speak for GStreamer, as we were not part of the development for these elements in GStreamer. I've been already through many problems like that and I've seen that most of the streaming applications expect from the medium something like from UDP: the stream may already run, but if the application doesn't read anything, data simply fall on the floor. Unfortunately SRT doesn't work this way and if this way of working is expected in particular app scenario, an appropriate adapting code must be provided to "simulate" that behavior. I'm not sure how |
Beta Was this translation helpful? Give feedback.
Frankly, I can't speak for GStreamer, as we were not part of the development for these elements in GStreamer.
I've been already through many problems like that and I've seen that most of the streaming applications expect from the medium something like from UDP: the stream may already run, but if the application doesn't read anything, data simply fall on the floor. Unfortunately SRT doesn't work this way and if this way of working is expected in particular app scenario, an appropriate adapting code must be provided to "simulate" that behavior.
I'm not sure how
srtsrc
and others have been actually written in GStreamer, but at least I can tell you that that if it doesn't take this little pro…