mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 17:52:29 +00:00
encodebin: use new method
Use the new element class method to get the metadata from an element. Not all elements might have an elementfactory.
This commit is contained in:
parent
1be10803ba
commit
6688eea15c
1 changed files with 5 additions and 5 deletions
|
@ -921,13 +921,13 @@ no_template:
|
||||||
static gboolean
|
static gboolean
|
||||||
_has_class (GstElement * element, const gchar * classname)
|
_has_class (GstElement * element, const gchar * classname)
|
||||||
{
|
{
|
||||||
GstElementFactory *factory;
|
GstElementClass *klass;
|
||||||
const gchar *klass;
|
const gchar *value;
|
||||||
|
|
||||||
factory = gst_element_get_factory (element);
|
klass = GST_ELEMENT_GET_CLASS (element);
|
||||||
klass = gst_element_factory_get_klass (factory);
|
value = gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
|
||||||
|
|
||||||
return strstr (klass, classname) != NULL;
|
return strstr (value, classname) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME : Add handling of streams that don't need encoding */
|
/* FIXME : Add handling of streams that don't need encoding */
|
||||||
|
|
Loading…
Reference in a new issue