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>
Gir now prints all directories and their hashes in the version file and
comments; useful now that gstreamer-rs is being generated from both
gir-files/ and gst-gir-files/ submodules.
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.
This scales better as there will only be only such data instead of two
or more when having deeper class hierarchies with multiple Rust
elements, and also makes it unnecessary to use a special instance struct
so the default works well.
While this allows to remove the pad probe multiple times, which would
cause a g_warning(), this is not actually making the situation worse
than before while making some code patterns easier to implement:
- Probes could already be removed twice by return
gst::PadProbeReturn::Remove and then calling pad.remove_probe()
- Probes could be removed from a different pad than where they were
added
As such let's go with the simple solution here for now and allow giving
owned access to the probe id from the probe callback.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/286
Make it an actual bitflags type instead of just an u64 alias and add all
the constants. As it's not defined as bitflags in C this needs to be
done manually.
This should be analogous to C struct initalizers where all unspecified
fields are initialized to zero. Without mut this reads a bit nicer as
well.
Note that two out of three structs have all members specified, hence
need no zero-initialization of the remainder at all.
Parameter mutability has been fixed (and reverted, hence overridden with
const=true)for this function in gstreamer; it can now be automatically
generated.
- Add support for precision, padding and alignment.
- Format the invalid time using dashes (`--:--:--.---------`) instead of
a technically valid `99:99:99.999999999`
The latter is something C's `GST_TIME_FORMAT` can't do, though something
obviously invalid like `-1👎-1.000000000` would be possible.