generate gstreamer-gl-sys
This is a subtask for https://github.com/sdroege/gstreamer-rs/issues/126
Some notes:
Regarding the question which gl bindings use, the answer is gl-rs, and more specifically, gl_generator, which creates customs GL bindings at build time. That's what gleam uses.
When I want to generated the sys from GstGL-1.0.gir, no matter what work-mode
I choose in Gir_GstGL.toml, the gir tool will always throw an exception:
GirXml: gir-files/GstGL-1.0.gir:3201:13: Missing type name
There are a lot of parameters types without name: all the GL related and xlib Display
and xcb_connection_t
. The later I solved them with pointer
as name (perhaps we should handle that in the GstGL annotations), but the ones related with GL types are the problem.
As far as I have tinkered with gir
I haven't found a way to workaround this. I even added fake names, but it breaks (obviously) later with
thread 'main' panicked at 'Incomplete library, unresolved: ["GL.bitfield", "GL.boolean", "GL.char", "GL.clampf", "GL.eglImageOES", "GL.enum", "GL.float", "GL.int", "GL.int64", "GL.intptr", "GL.sizei", "GL.sizeiptr", "GL.sync", "GL.ubyte", "GL.uint", "GL.uint64"]', gir/src/library_postprocessing.rs:55:13
Those types should be resolved by gl_generater, but I haven't figured out how, and I'm suspecting that gir
won't be usable and the bindings must be written by hand