mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +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
|
||||
_has_class (GstElement * element, const gchar * classname)
|
||||
{
|
||||
GstElementFactory *factory;
|
||||
const gchar *klass;
|
||||
GstElementClass *klass;
|
||||
const gchar *value;
|
||||
|
||||
factory = gst_element_get_factory (element);
|
||||
klass = gst_element_factory_get_klass (factory);
|
||||
klass = GST_ELEMENT_GET_CLASS (element);
|
||||
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 */
|
||||
|
|
Loading…
Reference in a new issue