From c4be4aa916458656e0496df427bf3a28de6dcebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 3 Oct 2006 19:13:36 +0000 Subject: [PATCH] gst/gstbus.c: More docs for the sync-message signal (mention that it is not emitted by default); log message structur... Original commit message from CVS: * gst/gstbus.c: (gst_bus_class_init), (gst_bus_post): More docs for the sync-message signal (mention that it is not emitted by default); log message structures of messages posted on the bus as well. --- ChangeLog | 7 +++++++ gst/gstbus.c | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 59d40ee49b..71ebe5352a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-03 Tim-Philipp Müller + + * gst/gstbus.c: (gst_bus_class_init), (gst_bus_post): + More docs for the sync-message signal (mention that it is not + emitted by default); log message structures of messages posted on + the bus as well. + 2006-10-03 Jan Schmidt * gst/gst.c: (ensure_current_registry_forking): diff --git a/gst/gstbus.c b/gst/gstbus.c index 00b5f9f440..a5a5bfd3f4 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -184,6 +184,13 @@ gst_bus_class_init (GstBusClass * klass) * * A message has been posted on the bus. This signal is emitted from the * thread that posted the message so one has to be careful with locking. + * + * This signal will not be emitted by default, you have to set up + * gst_bus_sync_signal_handler() as a sync handler if you want this + * signal to be emitted when a message is posted on the bus, like this: + * + * gst_bus_set_sync_handler (bus, gst_bus_sync_signal_handler, yourdata); + * */ gst_bus_signals[SYNC_MESSAGE] = g_signal_new ("sync-message", G_TYPE_FROM_CLASS (klass), @@ -319,8 +326,8 @@ gst_bus_post (GstBus * bus, GstMessage * message) g_return_val_if_fail (GST_IS_BUS (bus), FALSE); g_return_val_if_fail (GST_IS_MESSAGE (message), FALSE); - GST_DEBUG_OBJECT (bus, "[msg %p] posting on bus, type %s", - message, GST_MESSAGE_TYPE_NAME (message)); + GST_DEBUG_OBJECT (bus, "[msg %p] posting on bus, type %s, %" GST_PTR_FORMAT, + message, GST_MESSAGE_TYPE_NAME (message), message->structure); GST_OBJECT_LOCK (bus); /* check if the bus is flushing */