gst/gstbus.c: Improve debugging when dealing with _poll().

Original commit message from CVS:
* gst/gstbus.c: (poll_func):
Improve debugging when dealing with _poll().
This commit is contained in:
Wim Taymans 2007-09-26 18:06:42 +00:00
parent e216a00ca9
commit 1b3e413bba
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-09-26 Wim Taymans <wim.taymans@gmail.com>
* gst/gstbus.c: (poll_func):
Improve debugging when dealing with _poll().
2007-09-26 Tim-Philipp Müller <tim at centricular dot net> 2007-09-26 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstregistryxml.c: * gst/gstregistryxml.c:

View file

@ -834,17 +834,23 @@ typedef struct
static void static void
poll_func (GstBus * bus, GstMessage * message, GstBusPollData * poll_data) poll_func (GstBus * bus, GstMessage * message, GstBusPollData * poll_data)
{ {
GstMessageType type;
if (!g_main_loop_is_running (poll_data->loop)) { if (!g_main_loop_is_running (poll_data->loop)) {
GST_DEBUG ("mainloop %p not running", poll_data->loop); GST_DEBUG ("mainloop %p not running", poll_data->loop);
return; return;
} }
if (GST_MESSAGE_TYPE (message) & poll_data->events) { type = GST_MESSAGE_TYPE (message);
if (type & poll_data->events) {
g_return_if_fail (poll_data->message == NULL); g_return_if_fail (poll_data->message == NULL);
/* keep ref to message */ /* keep ref to message */
poll_data->message = gst_message_ref (message); poll_data->message = gst_message_ref (message);
GST_DEBUG ("mainloop %p quit", poll_data->loop); GST_DEBUG ("mainloop %p quit", poll_data->loop);
g_main_loop_quit (poll_data->loop); g_main_loop_quit (poll_data->loop);
} else {
GST_DEBUG ("type %08x does not match %08x", type, poll_data->events);
} }
} }