mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +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>
|
2005-07-10 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
|
* 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);
|
pop_messages (bus, 9);
|
||||||
|
|
||||||
|
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
|
||||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
||||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
||||||
|
|
|
@ -2321,6 +2321,8 @@ gst_element_get_bus (GstElement * element)
|
||||||
gst_object_ref (result);
|
gst_object_ref (result);
|
||||||
GST_UNLOCK (element);
|
GST_UNLOCK (element);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (element, "got bus %" GST_PTR_FORMAT, result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,6 +226,7 @@ GST_START_TEST (test_message_state_changed_children)
|
||||||
|
|
||||||
pop_messages (bus, 9);
|
pop_messages (bus, 9);
|
||||||
|
|
||||||
|
ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
|
||||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
||||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
||||||
|
|
|
@ -296,6 +296,7 @@ check_intr (GstElement * pipeline)
|
||||||
gst_element_get_state (pipeline, NULL, NULL, NULL);
|
gst_element_get_state (pipeline, NULL, NULL, NULL);
|
||||||
g_print ("Pipeline paused.\n");
|
g_print ("Pipeline paused.\n");
|
||||||
|
|
||||||
|
gst_object_unref (bus);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -365,8 +366,10 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
||||||
revent = gst_bus_poll (bus, GST_MESSAGE_ANY, blocking ? -1 : 0);
|
revent = gst_bus_poll (bus, GST_MESSAGE_ANY, blocking ? -1 : 0);
|
||||||
|
|
||||||
/* if the poll timed out, only when !blocking */
|
/* if the poll timed out, only when !blocking */
|
||||||
if (revent == GST_MESSAGE_UNKNOWN)
|
if (revent == GST_MESSAGE_UNKNOWN) {
|
||||||
|
gst_object_unref (bus);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
message = gst_bus_pop (bus);
|
message = gst_bus_pop (bus);
|
||||||
g_return_val_if_fail (message != NULL, TRUE);
|
g_return_val_if_fail (message != NULL, TRUE);
|
||||||
|
@ -377,6 +380,7 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
||||||
("GOT EOS from element \"%s\".\n"),
|
("GOT EOS from element \"%s\".\n"),
|
||||||
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
|
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
|
||||||
gst_message_unref (message);
|
gst_message_unref (message);
|
||||||
|
gst_object_unref (bus);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case GST_MESSAGE_TAG:
|
case GST_MESSAGE_TAG:
|
||||||
if (tags) {
|
if (tags) {
|
||||||
|
@ -416,6 +420,7 @@ event_loop (GstElement * pipeline, gboolean blocking)
|
||||||
if (gerror)
|
if (gerror)
|
||||||
g_error_free (gerror);
|
g_error_free (gerror);
|
||||||
g_free (debug);
|
g_free (debug);
|
||||||
|
gst_object_unref (bus);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
case GST_MESSAGE_STATE_CHANGED:{
|
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))));
|
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
|
||||||
/* cut out of the event loop if check_intr set us to PAUSED */
|
/* cut out of the event loop if check_intr set us to PAUSED */
|
||||||
gst_message_unref (message);
|
gst_message_unref (message);
|
||||||
|
gst_object_unref (bus);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue