fix an old bug traversing pad template lists, and change _padtemplates to _pad_templates in new functions

Original commit message from CVS:
fix an old bug traversing pad template lists, and change _padtemplates to _pad_templates in new functions
This commit is contained in:
Andy Wingo 2003-11-11 12:34:15 +00:00
parent 7eca737099
commit ad008198e0
3 changed files with 13 additions and 11 deletions

View file

@ -1638,7 +1638,7 @@ gst_element_link_pads_filtered (GstElement *src, const gchar *srcpadname,
srctempl = (GstPadTemplate*) srctempls->data;
if (srctempl->presence == GST_PAD_REQUEST) {
for (l=desttempls; l; l=l->next) {
desttempl = (GstPadTemplate*) desttempls->data;
desttempl = (GstPadTemplate*) l->data;
if (desttempl->presence == GST_PAD_REQUEST &&
desttempl->direction != srctempl->direction) {
if (gst_caps_is_always_compatible (gst_pad_template_get_caps (srctempl),
@ -1654,7 +1654,9 @@ gst_element_link_pads_filtered (GstElement *src, const gchar *srcpadname,
GST_DEBUG_PAD_NAME (destpad));
return TRUE;
}
/* FIXME: we have extraneous request pads lying around */
/* it failed, so we release the request pads */
gst_element_release_request_pad (src, srcpad);
gst_element_release_request_pad (dest, destpad);
}
}
}

View file

@ -417,8 +417,8 @@ G_CONST_RETURN gchar * gst_element_factory_get_klass (GstElementFactory *factor
G_CONST_RETURN gchar * gst_element_factory_get_description (GstElementFactory *factory);
G_CONST_RETURN gchar * gst_element_factory_get_version (GstElementFactory *factory);
G_CONST_RETURN gchar * gst_element_factory_get_author (GstElementFactory *factory);
guint gst_element_factory_get_num_padtemplates (GstElementFactory *factory);
G_CONST_RETURN GList * gst_element_factory_get_padtemplates (GstElementFactory *factory);
guint gst_element_factory_get_num_pad_templates (GstElementFactory *factory);
G_CONST_RETURN GList * gst_element_factory_get_pad_templates (GstElementFactory *factory);
GstElement* gst_element_factory_create (GstElementFactory *factory,
const gchar *name);

View file

@ -373,30 +373,30 @@ gst_element_factory_get_author (GstElementFactory *factory)
return factory->details.author;
}
/**
* gst_element_factory_get_num_padtemplates:
* gst_element_factory_get_num_pad_templates:
* @factory: a #GstElementFactory
*
* Gets the number of padtemplates in this factory.
* Gets the number of pad_templates in this factory.
*
* Returns: the number of padtemplates
* Returns: the number of pad_templates
*/
guint
gst_element_factory_get_num_padtemplates (GstElementFactory *factory)
gst_element_factory_get_num_pad_templates (GstElementFactory *factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), 0);
return factory->numpadtemplates;
}
/**
* gst_element_factory_get_padtemplates:
* gst_element_factory_get_pad_templates:
* @factory: a #GstElementFactory
*
* Gets the #Glist of padtemplates for this factory.
* Gets the #Glist of pad templates for this factory.
*
* Returns: the padtemplates
*/
G_CONST_RETURN GList *
gst_element_factory_get_padtemplates (GstElementFactory *factory)
gst_element_factory_get_pad_templates (GstElementFactory *factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), NULL);