When I introduced the 'ser_de' feature, I couldn't find a way to
name it 'serde' while also make it pull the optional 'serde'
crate together with the other related dependencies.
With rustc >= 1.60 we can use 'dep:serde' to refer to the 'serde'
dependency as part of the 'serde' feature.
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.
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 function was named wrong before 1.20, and its return transfer type
changed from none to full. To provide
Note that, when 1.20 Gir files are imported, this `version` override in
gstreamer-video/Gir.toml wil come into effect and create a Display trait
for us (without version constraint). At that point the manual Display
impl should be removed, but the manual to_string implementation remains.
{Audio,Video}Endianness is an enumeration to represent the two possible
values in Rust but this enumeration does not exist as such in C, where
it is merely an integer with some constants defining possible values.
Capitalization is wrong in function and parameter/variable names:
warning: method `get_Kr_Kb` should have a snake case name
--> gstreamer-video/src/auto/enums.rs:515:12
|
515 | pub fn get_Kr_Kb(&self) -> Option<(f64, f64)> {
| ^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_kr_kb`
|
= note: `#[warn(non_snake_case)]` on by default
warning: variable `Kr` should have a snake case name
--> gstreamer-video/src/auto/enums.rs:518:21
|
518 | let mut Kr = mem::MaybeUninit::uninit();
| ^^ help: convert the identifier to snake case (notice the capitalization): `kr`
warning: variable `Kb` should have a snake case name
--> gstreamer-video/src/auto/enums.rs:519:21
|
519 | let mut Kb = mem::MaybeUninit::uninit();
| ^^ help: convert the identifier to snake case (notice the capitalization): `kb`
warning: variable `Kr` should have a snake case name
--> gstreamer-video/src/auto/enums.rs:525:17
|
525 | let Kr = Kr.assume_init();
| ^^ help: convert the identifier to snake case (notice the capitalization): `kr`
warning: variable `Kb` should have a snake case name
--> gstreamer-video/src/auto/enums.rs:526:17
|
526 | let Kb = Kb.assume_init();
| ^^ help: convert the identifier to snake case (notice the capitalization): `kb`
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.