mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
gst/gstelement.c: add debug
Original commit message from CVS: * gst/gstelement.c: (gst_element_get_bus): add debug * tools/gst-launch.c: (check_intr), (event_loop): fix bus leaks
This commit is contained in:
parent
7d8c811095
commit
3127459e22
5 changed files with 18 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-07-10 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstelement.c: (gst_element_get_bus):
|
||||
add debug
|
||||
* tools/gst-launch.c: (check_intr), (event_loop):
|
||||
fix bus leaks
|
||||
|
||||
2005-07-10 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
|
||||
|
|
|
@ -226,6 +226,7 @@ GST_START_TEST (test_message_state_changed_children)
|
|||
|
||||
pop_messages (bus, 9);
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
||||
|
|
|
@ -2321,6 +2321,8 @@ gst_element_get_bus (GstElement * element)
|
|||
gst_object_ref (result);
|
||||
GST_UNLOCK (element);
|
||||
|
||||
GST_DEBUG_OBJECT (element, "got bus %" GST_PTR_FORMAT, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ GST_START_TEST (test_message_state_changed_children)
|
|||
|
||||
pop_messages (bus, 9);
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
||||
|
|
|
@ -296,6 +296,7 @@ check_intr (GstElement * pipeline)
|
|||
gst_element_get_state (pipeline, NULL, NULL, NULL);
|
||||
g_print ("Pipeline paused.\n");
|
||||
|
||||
gst_object_unref (bus);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -365,8 +366,10 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
|||
revent = gst_bus_poll (bus, GST_MESSAGE_ANY, blocking ? -1 : 0);
|
||||
|
||||
/* if the poll timed out, only when !blocking */
|
||||
if (revent == GST_MESSAGE_UNKNOWN)
|
||||
if (revent == GST_MESSAGE_UNKNOWN) {
|
||||
gst_object_unref (bus);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
message = gst_bus_pop (bus);
|
||||
g_return_val_if_fail (message != NULL, TRUE);
|
||||
|
@ -377,6 +380,7 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
|||
("GOT EOS from element \"%s\".\n"),
|
||||
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
|
||||
gst_message_unref (message);
|
||||
gst_object_unref (bus);
|
||||
return FALSE;
|
||||
case GST_MESSAGE_TAG:
|
||||
if (tags) {
|
||||
|
@ -416,6 +420,7 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
|||
if (gerror)
|
||||
g_error_free (gerror);
|
||||
g_free (debug);
|
||||
gst_object_unref (bus);
|
||||
return TRUE;
|
||||
}
|
||||
case GST_MESSAGE_STATE_CHANGED:{
|
||||
|
@ -432,6 +437,7 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
|||
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
|
||||
/* cut out of the event loop if check_intr set us to PAUSED */
|
||||
gst_message_unref (message);
|
||||
gst_object_unref (bus);
|
||||
return FALSE;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue