In gir it was brought up [1] that some traits (in particular
`*ExtManual`) are exported from the crate root in addition to the
prelude, cluttering the environment unnecessarily. This commit removes
all these reexports, leaving those in prelude (that were already there)
only.
After this commit everything matching `Ext(Manual)?\b` in `lib.rs` sits
within `pub mod prelude {};`.
[1]: https://github.com/gtk-rs/gir/pull/1111
`generator.py` can now be used to perform documentation generation and
embedding in one go, simplifying the entire process while at the same
time getting rid of intermediate `docs.md` being checked in to the
repository. For this the CI needs the submodules with `gir` and the
`.gir` files.
The generator (the script that invokes `gir` for all `Gir.toml` crates)
is now shared between all projects that utilize `gir` to simplify
collaboration, instead of having to copy-paste improvements back and
forth. All GStreamer-rs specifics (path to `gst-gir-files`) has been
taken care of by using `girs_directories` in `Gir.toml` instead like
`gtk(4)-rs`.
The `lgpl-docs` and documentation embedding step is now solely invoked
from `./gir/generator.py` in the CI, and does not need the embed/purge
build features anymore.
The generator is now solely in charge of the output path. Besides, only
few crates were inconsistently defining this path while the rest was
leaving it up to a default or the path specified on the cmdline.
The `lgpl-docs` crate and all precompiled (easy to get outdated!)
docmentation files are removed in favour of being generated at runtime
by the improved generator, both during local development as well as in
the CI.
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.
grcov 0.8.0 now has cobertura support so we no longer need to to export
to lcov format and then convert.
Extract the summary from the generated html so the metric matches the
one from the html report (for some reason the cobertura ones are
differents).
The new gitlab summary parsing regexp is now:
<abbr .*>(\d+.\d+) %<\/abbr>
We can't return a plain reference to something stored inside the future
as that would go out of scope after `await`. Instead return a struct
that wraps the `gst::Promise`, derefs to a structure and keeps the
promise alive as long as needed.
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.
This includes mut overrides to prevent the caller from borrowing memory
as mutable. That enforces all kinds of ownership restrictions inside
the miniobject logic when only the underlying data for this memory needs
to be mutable.
Copy functions have been marked unsafe because tex_id might not be valid
and result in UB.
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.