use gst_element_factory_get_metadata to replace obsolete API

This commit is contained in:
Mark Nauwelaerts 2012-09-15 19:08:33 +02:00
parent 8da71fea1f
commit 5fad6e86d7
3 changed files with 9 additions and 4 deletions

View file

@ -171,7 +171,8 @@ rsndec_factory_filter (GstPluginFeature * feature, RsnDecFactoryFilterCtx * ctx)
factory = GST_ELEMENT_FACTORY (feature);
klass = gst_element_factory_get_klass (factory);
klass =
gst_element_factory_get_metadata (factory, GST_ELEMENT_METADATA_KLASS);
/* only decoders can play */
if (strstr (klass, "Decoder") == NULL)
return FALSE;
@ -211,7 +212,8 @@ rsndec_factory_filter (GstPluginFeature * feature, RsnDecFactoryFilterCtx * ctx)
if (can_sink) {
GST_DEBUG ("Found decoder element %s (%s)",
gst_element_factory_get_longname (factory),
gst_element_factory_get_metadata (factory,
GST_ELEMENT_METADATA_LONGNAME),
gst_plugin_feature_get_name (feature));
}

View file

@ -69,7 +69,8 @@ gst_auto_video_convert_element_filter (GstPluginFeature * feature,
if (G_UNLIKELY (!GST_IS_ELEMENT_FACTORY (feature)))
return FALSE;
klass = gst_element_factory_get_klass (GST_ELEMENT_FACTORY_CAST (feature));
klass = gst_element_factory_get_metadata (GST_ELEMENT_FACTORY_CAST (feature),
GST_ELEMENT_METADATA_KLASS);
/* only select color space converter */
if (strstr (klass, "Filter") &&
strstr (klass, "Converter") && strstr (klass, "Video")) {

View file

@ -508,7 +508,9 @@ print_element_info (GstElement * element, guint c2w, guint c3w, guint c4w)
g_print (" | %-*s", c3w,
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
g_print (" | %-*s | \n", c4w, gst_element_factory_get_longname (factory));
g_print (" | %-*s | \n", c4w,
gst_element_factory_get_metadata (factory,
GST_ELEMENT_METADATA_LONGNAME));
// "Audio Resampler" g_print( " | %-*s", c3w, gst_element_factory_get_longname( gst_element_get_factory( element )) );