use message type names

Original commit message from CVS:
use message type names
This commit is contained in:
Thomas Vander Stichele 2005-09-29 18:25:50 +00:00
parent d2c83dc282
commit 8c2deca31b
4 changed files with 13 additions and 5 deletions

2
common

@ -1 +1 @@
Subproject commit 7caeee4b949b4388927fec7fcf25f767429bde30 Subproject commit 5cd4217979c25fc1fcbb82282e4ad6cbdea9e6cf

View file

@ -1523,8 +1523,8 @@ gst_bin_send_event (GstElement * element, GstEvent * event)
static GstBusSyncReply static GstBusSyncReply
bin_bus_handler (GstBus * bus, GstMessage * message, GstBin * bin) bin_bus_handler (GstBus * bus, GstMessage * message, GstBin * bin)
{ {
GST_DEBUG_OBJECT (bin, "[msg %p] handling child message of type %d", GST_DEBUG_OBJECT (bin, "[msg %p] handling child message of type %s",
message, GST_MESSAGE_TYPE (message)); message, gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
switch (GST_MESSAGE_TYPE (message)) { switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_EOS:{ case GST_MESSAGE_EOS:{

View file

@ -455,11 +455,18 @@ gst_bus_pop (GstBus * bus)
g_return_val_if_fail (GST_IS_BUS (bus), NULL); g_return_val_if_fail (GST_IS_BUS (bus), NULL);
GST_DEBUG_OBJECT (bus, "%d messages on the bus",
g_queue_get_length (bus->queue));
g_mutex_lock (bus->queue_lock); g_mutex_lock (bus->queue_lock);
message = g_queue_pop_head (bus->queue); message = g_queue_pop_head (bus->queue);
g_mutex_unlock (bus->queue_lock); g_mutex_unlock (bus->queue_lock);
GST_DEBUG_OBJECT (bus, "pop on bus, got message %p", message); if (message)
GST_DEBUG_OBJECT (bus, "pop on bus, got message %p, %s", message,
gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
else
GST_DEBUG_OBJECT (bus, "pop on bus, no message");
return message; return message;
} }

View file

@ -226,7 +226,8 @@ gst_message_new (GstMessageType type, GstObject * src)
message = (GstMessage *) gst_mini_object_new (GST_TYPE_MESSAGE); message = (GstMessage *) gst_mini_object_new (GST_TYPE_MESSAGE);
GST_CAT_INFO (GST_CAT_MESSAGE, "creating new message %p %d", message, type); GST_CAT_INFO (GST_CAT_MESSAGE, "creating new message %p %s", message,
gst_message_type_get_name (type));
message->type = type; message->type = type;
if (src) { if (src) {