[gstreamer-bugs] [Bug 562170] New: GstBus watch does not receive EOS or SEGMENT_DONE events
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Mon Nov 24 12:17:06 PST 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=562170
GStreamer | gstreamer (core) | Ver: 0.10.21
Summary: GstBus watch does not receive EOS or SEGMENT_DONE events
Product: GStreamer
Version: 0.10.21
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: justin at affinix.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Some events are not delivered to a watcher when using a non-default
GMainContext, like this:
GMainContext *mainContext = g_main_context_new();
GMainLoop *mainLoop = g_main_loop_new(mainContext, FALSE);
...
GSource *source = gst_bus_create_watch(bus);
g_source_attach(source, mainContext);
g_source_set_callback(source, (GSourceFunc)cb_bus_call, data, NULL);
Many events are received once the pipeline runs, just not EOS or SEGMENT_DONE.
If, instead, the default context is used, then it works fine:
GMainLoop *mainLoop = g_main_loop_new(NULL, FALSE);
GMainContext *mainContext = g_main_loop_get_context(mainLoop);
...
GSource *source = gst_bus_create_watch(bus);
g_source_attach(source, mainContext);
g_source_set_callback(source, (GSourceFunc)cb_bus_call, data, NULL);
The callback will receive all of the other events as usual, but this time EOS
and SEGMENT_DONE will also be delivered too.
An extensive workaround is to write your own GSource, which is described here:
http://article.gmane.org/gmane.comp.video.gstreamer.devel/21665
I currently use the above method with success, but probably GStreamer should be
fixed too.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=562170.
More information about the Gstreamer-bugs
mailing list