Python: get all values of a GObject.GEnum

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Python: get all values of a GObject.GEnum

Ralf Sippl
In C, this works:

values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
(from
https://cgit.freedesktop.org/gstreamer/gstreamer/tree/tools/gst-inspect.c#n581).

In Python, this

value_type = param.value_type
if value_type.is_a(GObject.GEnum):
    values = GObject.TypeClass.ref(value_type).values

fails with an AttributeError: 'TypeClass' object has no attribute 'values'

What is the Python mapping of G_ENUM_CLASS (g_type_class_ref(...))?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel