Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GstGL GLMixer processTextures function is generated as invalid function #175

Closed
BwackNinja opened this issue Dec 28, 2024 · 4 comments
Closed

Comments

@BwackNinja
Copy link

This seems to be a corner-case in code generation.

The virtual-method and method signatures for processTextures in GLMixer don't match. One expects a GstGLMemory out_tex, and the other expects GstBuffer out_buf. This results in generated code using outTex without declaring it.

Despite having the same name, processTextures(Buffer outbuf) and the virtual method processTextures(GLMemory outtex) aren't the same method. The one taking the Buffer should call gst_gl_mixer_process_textures, while the one taking the GLMemory is called within gst_gl_mixer_process_textures and is implemented/overriden by subclasses.

Looking through gstreamer git, this was introduced 12 years ago: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/89569276c563d3343417ea5e34bddcd0714131d7

@jwharm
Copy link
Owner

jwharm commented Dec 28, 2024

Thanks for the issue reports!

This one is a bug in GStreamer. You can work around it by editing the gir file: simply remove the invoker="process_textures" attribute from the <virtual-method> element.

I can't fix this in java-gi, unless I start second-guessing the invoker attribute, but I'd rather not.

@jwharm jwharm closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
@BwackNinja
Copy link
Author

Thanks for addressing these issues so quickly!

If this is a problem in the gir file and you have to patch similar issues even in the GObject and Gio gir files, should this be an issue opened upstream? I couldn't find a related issue in gobject-introspection or a reference to similar issues in other bindings. The rust bindings don't seem to parse the invoker attribute at all, which I believe is what limits subclassing support as referenced here: gtk-rs/gir#1463

Additionally or alternatively, checking whether the parameters match in VirtualMethod.invoker() and Method.invokerFor() should be enough for this as well as removing the corresponding patches for GObject and Gio.

@jwharm
Copy link
Owner

jwharm commented Jan 2, 2025

Agreed, checking if the parameters match is a reasonable check. I’ll try it out.

@jwharm jwharm reopened this Jan 2, 2025
@jwharm jwharm closed this as completed in fa6efa7 Jan 3, 2025
@jwharm
Copy link
Owner

jwharm commented Jan 3, 2025

The issue with GLMixer is now resolved, when the bindings are generated with the newest java-gi from the main branch.
I'm planning a new java-gi release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants