use gst_element_factory_get_metadata to replace obsolete API

This commit is contained in:
Mark Nauwelaerts 2012-09-15 18:43:39 +02:00
parent 3cf8b945ca
commit 2834dd0518
3 changed files with 9 additions and 6 deletions

View file

@ -284,7 +284,7 @@ cb_feature_filter (GstPluginFeature *feature,
return FALSE;
/* only parsers, demuxers and decoders */
klass = gst_element_factory_get_klass (GST_ELEMENT_FACTORY (feature));
klass = gst_element_factory_get_metadata (GST_ELEMENT_FACTORY (feature), GST_ELEMENT_METADATA_KLASS);
if (g_strrstr (klass, "Demux") == NULL &&
g_strrstr (klass, "Decoder") == NULL &&
g_strrstr (klass, "Parse") == NULL)

View file

@ -358,8 +358,8 @@ main (int argc,
g_print ("The '%s' element is a member of the category %s.\n"
"Description: %s\n",
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)),
gst_element_factory_get_klass (factory),
gst_element_factory_get_description (factory));
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_KLASS),
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_DESCRIPTION));
return 0;
}

View file

@ -1012,7 +1012,8 @@ print_element_list (gboolean print_all)
else
g_print ("%s: %s: %s\n", gst_plugin_get_name (plugin),
GST_OBJECT_NAME (factory),
gst_element_factory_get_longname (factory));
gst_element_factory_get_metadata (factory,
GST_ELEMENT_METADATA_LONGNAME));
#if 0
} else if (GST_IS_INDEX_FACTORY (feature)) {
GstIndexFactory *factory;
@ -1213,7 +1214,8 @@ print_plugin_features (GstPlugin * plugin)
factory = GST_ELEMENT_FACTORY (feature);
n_print (" %s: %s\n", GST_OBJECT_NAME (factory),
gst_element_factory_get_longname (factory));
gst_element_factory_get_metadata (factory,
GST_ELEMENT_METADATA_LONGNAME));
num_elements++;
#if 0
} else if (GST_IS_INDEX_FACTORY (feature)) {
@ -1361,7 +1363,8 @@ print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
GstCaps *caps = NULL;
guint i, num;
klass = gst_element_factory_get_klass (factory);
klass =
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_KLASS);
g_return_if_fail (klass != NULL);
if (strstr (klass, "Demuxer") ||