gir has been fixed to omit all unnecessary imports from objects, enums
and flags which currently are the only offenders of this linter warning.
Hence disallow this warning from now on which is anyway not applied to
every crate - like gstreamer-gl - where such issues have been uncovered.
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`
The next version of gir is going to generate doc(cfg()) attributes on
many symbols to show feature-dependence hints. While autogenerated sys
crates get this attribute in their own (generated) lib.rs file the safe
wrapper crates do not have such an autogenerated lib.rs file.
The VideoCodecFrame and VideoCodecState is C API is unfortunatelly unsafe
by design. So we workarounded it by ensuring the decoder stream lock was
hold while user has a writable reference on those objects.
Based on previous work from Thibault Saunier and Philippe Normand.
Fixes#161
There's a VideoTimeCode type that represents any kind of timecodes,
including invalid ones, and which allows to change each field
individually. And ValidVideoTimeCode that has all fields
validated and that can be used with most of the API.
In C, validation of the timecodes is left to the user and most functions
assert on getting passed valid timecodes.