[gst-devel] Why does this working gst-launch pipeline not work when compiled?

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Apr 13 21:33:06 CEST 2010


On Tue, 2010-04-13 at 11:18 -0800, Wes Miller wrote:

> One simple question still needs answered.  The example expects to get a
> "stop" sent in from a button click in the gui.  I don't have a gui - my
> stuff needs to run unseen -- so I need to know how to stop it cleanly, i.e.
> as if I'd coded a -e in the gst-launch command line.  It is possible to tell
> the loop to catch ctrl-c or will I need a C signal handler?  

See:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSrc.html#id484395

Basically:

  gst_element_send_event (pipeline, gst_event_new_eos ());

  ... wait for EOS to appear on pipeline's GstBus,
      then set_state to NULL

This is what gst-launch -e does (see gst-launch.c code).

Cheers 
 -Tim





More information about the gstreamer-devel mailing list