How to stop the pipeline gstreamer?

nghung270192 nghung270192 at
Thu Apr 11 00:17:39 PDT 2013

I'm a newbie of using gstreamer.
My code is used to display preview or next photo when i press button.

//created pipeline, elements and linked them
data.loop = g_main_loop_new (NULL, FALSE);  

 g_object_set (data.filesrc, "location", data.mang[i], NULL); 
// load a photo in folder.i will change, each i, it give different  photo

gst_element_set_state (data.pipeline, GST_STATE_PLAYING); 
g_main_loop_run (data.loop);

so I want to stop this pipeline to go back at starting of code  for i
change. how do i stop pipeline?
Thanks so much. 

View this message in context:
Sent from the GStreamer-devel mailing list archive at

More information about the gstreamer-devel mailing list