[gst-devel] Stopping playback

Stefan Kost ensonic at hora-obscura.de
Thu Feb 8 20:01:13 CET 2007


hi,
Christoffer Nyborg wrote:
> Hi
> 
> I'm writing an application where I might need to interrupt playback.
> From what I've read I'm supposed to change the state with
> gst_element_set_state (pipeline, GST_STATE_NULL);
> but I'm unable to because
> g_main_loop_run (loop);
> is blocking. How can I solve this? Can I throw the call
> g_main_loop_run (loop);
> into another thread or something?
>
Once the mainloop run, all signal handlers will be triggered. E.g. if you run a
UI, you can do the
gst_element_set_state (pipeline, GST_STATE_NULL);
call, when the user presses a button. If you do a commandline application, you
have to handle that on your own.
> 
> Regards
> Christoffer Nyborg
> 
Stefan




More information about the gstreamer-devel mailing list