Trigger replay or new source on EOS

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Aug 1 07:36:56 PDT 2013


On Wed, 2013-07-31 at 15:00 -0400, gdrht at xmlink.net wrote:

Hi,

> For a show demo we are using gst-launch to display a couple of filesrc
> clips and a RTP camera source. 
> 
> Is there a method to trigger a replay or a new source upon EOS of the filesrc content?
> Because the RTP camera continues providing data the filesrc content ends, the associated
> displays blank but the pipeline does not stop. 
> 
> One possible approach considered would be to have the script kill the pipeline after a time
> delay matching the shorter of the file content and then restart it. It seems there should be
> a better way!

You can set the "message-forward" property to TRUE on your
pipeline/bins. Then the bins will not "aggregate" messages like EOS
(i.e. wait until they have got an EOS message from all sinks).

Alternatively, you can probably install event probes on the sinks' sink
pad to see when an EOS event passes through, and then do whatever you
want (i.e. post an application message for your main application thread
to pick up and do something).

Cheers
 -Tim



More information about the gstreamer-devel mailing list