How are you trying to stop it? If you want to stop the entire pipeline, just
send an EOS event to the pipeline element. This will eventually flow down
the pipeline, and it will be picked up by the bus listener. Note that the
pipeline must be playing for the EOS to travel downstream.
// Pipeline creation
GstBus * bus = gst_element_get_bus(pipeline);
int bus_watch_id = gst_bus_add_watch(bus, event_listener, user_data);
// Wherever you want to stop the pipeline, call this, then wait for the
event to travel downstream
gst_element_send_event(pipeline, gst_event_new_eos());
// In the event listener, you can listen for the EOS
switch(GST_MESSAGE_TYPE(msg)) {
...
case GST_MESSAGE_EOS:
g_print("EOS received!");
g_main_loop_quit(loop);
}
No need to set message-forwarding unless you want to receive events from a
particular element, I guess if you only want to stop part of a pipeline.
--
Sent from:
http://gstreamer-devel.966125.n4.nabble.com/_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel