re-listening tcpserversrc?

MaZderMind ml at mazdermind.de
Tue Feb 19 12:09:28 UTC 2019


Hi fightling :)

Am 19.02.19 um 12:53 schrieb fightling:
> I'm already catching EOS messages by:
> 
>    self.pipeline.bus.connect("message::eos", self.on_eos)
As far as I understand, the bus is a way for an external Thread to be
notified of Events flowing down the Stream.
When you recieve the Message on the Bus(-Thread), is has already by sent
of the src and processed in the Streaming-Thread driven by the tcpserversrc.

In order to be able to drop the EOS-Event you could use a Pad-Probe
(https://gstreamer.freedesktop.org/documentation/design/probes.htm).

See here for an example how this could be done in python:
https://github.com/voc/voctomix/blob/master/example-scripts/gstreamer/source-nostream-music-from-folder.py#L155-L164

> but when I quit ffmpeg by Ctrl+C I get no EOS.
Here are the relevant lines from gsttcpserversrc.c:
https://github.com/GStreamer/gst-plugins-base/blob/4187242/gst/tcp/gsttcpserversrc.c#L231-L236

Running Voctomix with an Environment-Variable of
`GST_DEBUG=tcpserversrc:5` should give more information about what's
actually happening.

> I tried to use a gst.watchdog which works. Now I'm stuck at restarting
> the relevant part of the pipeline. I don't really want to restart the
> whole pipeline because there are some other incoming connections I want
> to hold. Actually I have several different sources. Some live (decklink)
> and some from ffmpeg over TCP. Live sources shall continue running while
> a tcp-source shall be restartable.
In
https://github.com/voc/voctomix/blob/master/example-scripts/gstreamer/source-nostream-music-from-folder.py#L170-L172
I stopped and restarted only a single Element of the Pipeline (here: an
uridecodebin). The same should be possible with a tcpseversrc.

Best regards,
MaZderMind


More information about the gstreamer-devel mailing list