Gir now uses analyzed objects to generate documentation, and to know
exactly what is available. Additionally, this allows more bindings to
be generated.
The previous commit reinstantiated `girs_dir`, and this commit applies
the rename to `girs_directories` and adds the new/missing
`gst-gir-files` directory where GStreamer-specific `.gir` files live.
This reverts commit 7f9fcb09e2.
`generator.py` is in the process of being moved to a generic place in
the `gir` repository for reuse across crates. This means `-d` cannot be
passed for our GStreamer-specific `gst-gir-files` directory anymore, and
should be configured from `Gir.toml` instead.
All these params are marked const in gstreamer-base 1.20 but their
results will only show here when the resulting g-ir files are imported.
For now the mutability is overridden in Gir.toml, and this commit should
be reverted when the 1.20 bindings are imported.
GLMemory input/output objects cannot be passed as mutable:
to_glib_none_mut checks if the miniobject is writable, even though the
underlying implementation should really only care about whether the
_data_ owned by this miniobject is.
(This temporary GLMemory object references its parent buffer object
that is also referenced externally, resulting in two references making
the object itself immutable)
Furthermore take care of automatically calling `add_rgba_pad_templates`
in `class_init` if `ADD_RGBA_PAD_TEMPLATES` is set to `true` (the
default).
Also enable all dependencies used by this type. Copying
AllocationParams is possible without borrowing the source mutable.
The offset and size parameters of `memcpy` are unchecked and may result
in out-of-bounds reads/writes, which is why this function is marked as
`unsafe`.
This class only contains two functions with a version requirement of at
least 1.16, but the class is used by GLFilter without any version
restrictions.
As collected with:
xmlstarlet sel -t -v "//_:field[@name = \"parent_class\"]/_:type/@name" gir-files/GstGL-1.0.gir | uniq
This adds GstBase.BaseTransform for GLBaseFilter and GLFilter, and
Gst.Element for gst::panic_to_error.
We were already using `gir -d` and especially now that our files are
separated across two directories that are relative to the directory
containing Gir.toml this only becomes cumbersome. Besides `gir` lacks
functionality to normalize the path, leading to ie.
gstreamer-gl/egl/sys/../../../gir-files in the version comment as a
result.
These functions have been checked to never return NULL. The overrides
can hopefully be gone again when C contains better annotations and
trust_return_value_nullability is enabled.