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.
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.
Similar to Rusts return and try, just use exceptions and pretty-print
them at the highest level (instead of presenting the user with a
stacktrace that's harder to read than the error alone).
Since the addition of doc regeneration - which also spawns a gir process
for every non-sys crate - the process is now incredibly slow and not
well suited for iterative development:
./generator.py --no-fmt 26.25s user 0.79s system 99% cpu 27.044 total
All gir processes are currently ran in serial (the generator waits for
one to complete before spawning the next process) even though there are
no inter-dependencies. Simply spawning all processes at once and
collecting their results + printing them in order after everything has
been spawned yields a significant speedup:
./generator.py --no-fmt 37.99s user 0.88s system 3285% cpu 1.183 total
Note: this is on a 32-core ThreadRipper. The improvement is more modest
on machines with less cores, and also depends on IO speed. A 4-core i5,
before and after:
./generator.py --no-fmt 30.24s user 0.76s system 99% cpu 31.055 total
./generator.py --no-fmt 57.78s user 0.88s system 763% cpu 7.685 total
That's still a sizable gain for simply not blocking on other tasks
anymore.
Since https://github.com/gtk-rs/gtk-rs/pull/447, supposedly the native
function is never returning a `NULL` `Application` hence it makes little
sense to handle an "unreachable" error here.
See https://github.com/gtk-rs/gtk-rs/pull/449. This struct remains
vital in GStreamer code to tie a type to an (untyped) SendValue, so that
the underlying value can be retrieved without having to guess its type.
That type is anyway stored in a private member T::TagType.
Co-authored-by: Marijn Suijten <marijns95@gmail.com>