gst/gstbus.c: More docs for the sync-message signal (mention that it is not emitted...
authorTim-Philipp Müller <tim@centricular.net>
Tue, 3 Oct 2006 19:13:36 +0000 (19:13 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 3 Oct 2006 19:13:36 +0000 (19:13 +0000)
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
gst/gstbus.c

index 59d40ee..71ebe53 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-03  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * 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  <thaytan@mad.scientist.com>
 
        * gst/gst.c: (ensure_current_registry_forking):
index 00b5f9f..a5a5bfd 100644 (file)
@@ -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:
+   * <programlisting>
+   * gst_bus_set_sync_handler (bus, gst_bus_sync_signal_handler, yourdata);
+   * </programlisting>
    */
   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 */