mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 09:04:15 +00:00
use gst_element_factory_get_metadata to replace obsolete API
This commit is contained in:
parent
8da71fea1f
commit
5fad6e86d7
3 changed files with 9 additions and 4 deletions
|
@ -171,7 +171,8 @@ rsndec_factory_filter (GstPluginFeature * feature, RsnDecFactoryFilterCtx * ctx)
|
||||||
|
|
||||||
factory = GST_ELEMENT_FACTORY (feature);
|
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 */
|
/* only decoders can play */
|
||||||
if (strstr (klass, "Decoder") == NULL)
|
if (strstr (klass, "Decoder") == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -211,7 +212,8 @@ rsndec_factory_filter (GstPluginFeature * feature, RsnDecFactoryFilterCtx * ctx)
|
||||||
|
|
||||||
if (can_sink) {
|
if (can_sink) {
|
||||||
GST_DEBUG ("Found decoder element %s (%s)",
|
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));
|
gst_plugin_feature_get_name (feature));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,8 @@ gst_auto_video_convert_element_filter (GstPluginFeature * feature,
|
||||||
if (G_UNLIKELY (!GST_IS_ELEMENT_FACTORY (feature)))
|
if (G_UNLIKELY (!GST_IS_ELEMENT_FACTORY (feature)))
|
||||||
return FALSE;
|
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 */
|
/* only select color space converter */
|
||||||
if (strstr (klass, "Filter") &&
|
if (strstr (klass, "Filter") &&
|
||||||
strstr (klass, "Converter") && strstr (klass, "Video")) {
|
strstr (klass, "Converter") && strstr (klass, "Video")) {
|
||||||
|
|
|
@ -508,7 +508,9 @@ print_element_info (GstElement * element, guint c2w, guint c3w, guint c4w)
|
||||||
|
|
||||||
g_print (" | %-*s", c3w,
|
g_print (" | %-*s", c3w,
|
||||||
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)));
|
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 )) );
|
// "Audio Resampler" g_print( " | %-*s", c3w, gst_element_factory_get_longname( gst_element_get_factory( element )) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue