mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
debug updates and a padtemplate counter added
Original commit message from CVS: debug updates and a padtemplate counter added
This commit is contained in:
parent
45f05bf6ed
commit
fc1645131b
3 changed files with 14 additions and 5 deletions
|
@ -237,20 +237,26 @@ gst_element_get_pad (GstElement *element, gchar *name)
|
|||
|
||||
g_return_val_if_fail (element != NULL, NULL);
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
// if there aren't any pads, well, we're not likely to find one
|
||||
if (!element->numpads)
|
||||
return NULL;
|
||||
|
||||
/* look through the list, matching by name */
|
||||
GST_DEBUG(GST_CAT_ELEMENT_PADS,"searching for pad '%s' in element %s\n",
|
||||
name,gst_element_get_name(element));
|
||||
|
||||
// look through the list, matching by name
|
||||
walk = element->pads;
|
||||
while (walk) {
|
||||
if (!strcmp ((GST_PAD(walk->data))->name, name))
|
||||
if (!strcmp ((GST_PAD(walk->data))->name, name)) {
|
||||
GST_DEBUG(GST_CAT_ELEMENT_PADS,"found pad '%s'\n",name);
|
||||
return GST_PAD(walk->data);
|
||||
}
|
||||
walk = g_list_next (walk);
|
||||
}
|
||||
|
||||
GST_DEBUG(GST_CAT_ELEMENT_PADS,"no such pad '%s'\n",name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,6 +173,7 @@ struct _GstElementFactory {
|
|||
GstElementDetails *details; /* pointer to details struct */
|
||||
|
||||
GList *padtemplates;
|
||||
guint16 numpadtemplates;
|
||||
};
|
||||
|
||||
GtkType gst_element_get_type (void);
|
||||
|
|
|
@ -118,6 +118,7 @@ gst_elementfactory_new (gchar *name, GtkType type,
|
|||
factory->type = type;
|
||||
factory->details = details;
|
||||
factory->padtemplates = NULL;
|
||||
factory->numpadtemplates = 0;
|
||||
|
||||
_gst_elementfactories = g_list_prepend (_gst_elementfactories, factory);
|
||||
|
||||
|
@ -215,6 +216,7 @@ gst_elementfactory_add_padtemplate (GstElementFactory *factory,
|
|||
g_return_if_fail(temp != NULL);
|
||||
|
||||
factory->padtemplates = g_list_append (factory->padtemplates, temp);
|
||||
factory->numpadtemplates++;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue