Skip to content

gst-libs: Sync up enumeration functions with the respective type name

Followup for gstreamer-rs!581 (merged)

In order to properly generate functions on enumerations these functions should be associated to the given type in gir files (residing under <enumeration> rather than as free functions in the global scope). That's currently not the case because of a name mismatch.

This MR fixes that case for gst_video_color_transfer_ functions which should instead use gst_video_transfer_function_.

TODO

Check other enum functions

There are perhaps more functions that need the same treatment. If the approach presented in this MR is accepted - and leftover TODOs are flushed out - we should go over the entire API and make sure it's consistent in this regard.

Deprecation for "unintroduced" functions

Given that 1.18 is not out yet which introduces some of these functions (gst_video_color_transfer_to_iso, gst_video_color_transfer_from_iso), perhaps we can drop the old name entirely?

For the other functions I assume the current approach of forwarding to the new name is desired?

Documentation on deprecated functions

Instead of keeping duplicate documentation (I have currently left only arguments in place) is the rename-to enough to forward users to read it on the renamed function?

Support for methods

Most of these associated functions can be methods in supported languages (eg. Rust) but do not get the first argument of the enumeration type set as instance-parameter. This is a likely issue for https://gitlab.gnome.org/GNOME/gobject-introspection as this is properly supported on on classes, records and such.
Feel free to pick this one up.


Note that some files were not accepted by the indent precommit hook, creating unrelated noise in this commit. I can split that out in a separate commit if necessary.

Edited by Marijn Suijten

Merge request reports