After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778349 - decodebin2 GstAutoplugSelectResult type doesn't exported
decodebin2 GstAutoplugSelectResult type doesn't exported
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-08 16:07 UTC by y.bandou
Modified: 2017-02-08 18:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description y.bandou 2017-02-08 16:07:57 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".
Comment 1 Sebastian Dröge (slomo) 2017-02-08 16:20:03 UTC
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.
Comment 2 Olivier Blin 2017-02-08 18:23:23 UTC
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);
Comment 3 Sebastian Dröge (slomo) 2017-02-08 18:32:33 UTC
Yes, something like that should work.