GNOME Bugzilla – Bug 778349
decodebin2 GstAutoplugSelectResult type doesn't exported
Last modified: 2017-02-08 18:32:33 UTC
I am trying to use the "autoplug-select" signal of decodebin The callback return a GstAutoplugSelectResult type, which appears nowhere in the gst public header files. The type is defined in the private header "gstplay-enum.h".
This is expected, it's plugin specific API. You either hardcode those values in your application (they're part of the API and won't ever change), or you can use the GEnum API to work with them at runtime.
This is part of the public API and documentation of decodebin, so there should be a way to use it without hardcoding values or copying header files. Is there a recommended way to use the GEnum API? Is the following fine? GType type = g_type_from_name ("GstAutoplugSelectResult"); GEnumClass *enum_class = g_type_class_ref (type); GEnumValue *eval = g_enum_get_value_by_name (enum_class, "GST_AUTOPLUG_SELECT_TRY"); g_type_class_unref (enum_class);
Yes, something like that should work.