more debug info

Original commit message from CVS:
more debug info
This commit is contained in:
Thomas Vander Stichele 2004-07-03 15:30:19 +00:00
parent 28662da648
commit d707aa6316
3 changed files with 28 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2004-07-03 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstelement.c: (gst_element_get_compatible_pad_template),
(gst_element_get_compatible_pad_filtered):
* gst/gstthread.c: (gst_thread_main_loop):
more debugging
2004-07-02 David Schleef <ds@schleef.org>
* gst/gstinfo.h: wrap #pragmas in #ifdefs for the correct compiler

View file

@ -1580,7 +1580,8 @@ gst_element_get_compatible_pad_template (GstElement * element,
padlist = gst_element_get_pad_template_list (element);
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
"Looking for a suitable pad template...");
"Looking for a suitable pad template in %s out of %d templates...",
GST_ELEMENT_NAME (element), g_list_length (padlist));
while (padlist) {
GstPadTemplate *padtempl = (GstPadTemplate *) padlist->data;
@ -1591,6 +1592,8 @@ gst_element_get_compatible_pad_template (GstElement * element,
* Check direction (must be opposite)
* Check caps
*/
GST_CAT_LOG (GST_CAT_CAPS,
"checking pad template %s", padtempl->name_template);
if (padtempl->direction != compattempl->direction) {
GST_CAT_DEBUG (GST_CAT_CAPS,
"compatible direction: found %s pad template \"%s\"",
@ -1612,6 +1615,11 @@ gst_element_get_compatible_pad_template (GstElement * element,
padlist = g_list_next (padlist);
}
if (newtempl)
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
"Returning new pad template %p", newtempl);
else
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "No compatible pad template found");
return newtempl;
}
@ -1716,8 +1724,8 @@ gst_element_get_compatible_pad_filtered (GstElement * element, GstPad * pad,
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
"finding pad in %s compatible with %s:%s", GST_ELEMENT_NAME (element),
GST_DEBUG_PAD_NAME (pad));
"finding pad in %s compatible with %s:%s and filter %" GST_PTR_FORMAT,
GST_ELEMENT_NAME (element), GST_DEBUG_PAD_NAME (pad), filtercaps);
/* let's use the real pad */
pad = (GstPad *) GST_PAD_REALIZE (pad);
@ -1729,8 +1737,12 @@ gst_element_get_compatible_pad_filtered (GstElement * element, GstPad * pad,
while (pads) {
GstPad *current = GST_PAD (pads->data);
GST_CAT_LOG (GST_CAT_ELEMENT_PADS, "examing pad %s:%s",
GST_DEBUG_PAD_NAME (current));
if (GST_PAD_PEER (current) == NULL &&
gst_pad_can_link_filtered (pad, current, filtercaps)) {
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
"found existing unlinked pad %s:%s", GST_DEBUG_PAD_NAME (current));
return current;
}
pads = g_list_next (pads);
@ -1752,13 +1764,15 @@ gst_element_get_compatible_pad_filtered (GstElement * element, GstPad * pad,
foundpad = gst_element_request_compatible_pad (element, templ);
gst_object_unref (GST_OBJECT (templ));
if (foundpad)
if (foundpad) {
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS,
"found existing request pad %s:%s", GST_DEBUG_PAD_NAME (foundpad));
return foundpad;
}
GST_CAT_INFO_OBJECT (GST_CAT_ELEMENT_PADS, element,
"Could not find a compatible pad to link to %s:%s",
GST_DEBUG_PAD_NAME (pad));
return NULL;
}

View file

@ -584,6 +584,8 @@ gst_thread_main_loop (void *arg)
while (status && GST_FLAG_IS_SET (thread, GST_THREAD_STATE_SPINNING)) {
g_mutex_unlock (thread->lock);
status = gst_bin_iterate (GST_BIN (thread));
if (!status)
GST_DEBUG_OBJECT (thread, "iterate returned false");
if (GST_FLAG_IS_SET (thread, GST_THREAD_MUTEX_LOCKED)) {
GST_FLAG_UNSET (thread, GST_THREAD_MUTEX_LOCKED);
} else {