Marijn Suijten
132477f51f
cargo.toml: Add v1_20 feature to all crates
2020-12-12 13:17:20 +01:00
Marijn Suijten
0ff16c589f
Regenerate sys Cargo.toml with 1.20 version
2020-12-12 13:17:03 +01:00
Marijn Suijten
bc5b44ddad
gstreamer: new_from_g_date_time only returns NULL if arg is NULL
2020-12-12 13:15:11 +01:00
Marijn Suijten
1d726d6a1e
gir.toml: Add 1.20 to extra_versions
2020-12-12 13:15:11 +01:00
Guillaume Gomez
fb56af8d84
Update from_glib calls and put them in unsafe blocks
2020-12-08 15:50:15 +01:00
Guillaume Gomez
959568f124
regen
2020-12-08 14:00:17 +01:00
Guillaume Gomez
9424eabd9a
Update gir submodule
2020-12-08 13:59:07 +01:00
Marijn Suijten
bb8e7c3e8f
audio/video: Fix more unused imports
...
TODO: How about use glib::translate::*;?
2020-12-07 12:12:16 +01:00
Marijn Suijten
82b4726bb7
impl FromStr: Forward implementation to autogenerated from_string()
2020-12-07 12:12:16 +01:00
Marijn Suijten
a7348023a0
video: Add test cases for enum to_string
2020-12-07 12:12:16 +01:00
Marijn Suijten
040772ab61
audio,video: Manual enum to_string returns 'static; add NULL check
2020-12-07 12:12:16 +01:00
Marijn Suijten
9ff39bae6f
audio,video: Use autogenerated Display impl
2020-12-07 12:12:16 +01:00
Marijn Suijten
c215acb7f9
audio,video: Delete manual implementations for now-autogenerated enum funcs
2020-12-07 12:12:16 +01:00
Marijn Suijten
15d8774e6b
Update gir to 1c1a8d7 and regenerate with associated enum/flag functions
2020-12-07 12:11:27 +01:00
Marijn Suijten
01ae47c90c
gstreamer: Manually implement StateChange::get_name on < v1_14
...
By setting the version to 1.8 and using `manual = true` an unconditional
trait implementation calling get_name is generated, while the
autogenerated version is omitted.
2020-12-07 12:09:39 +01:00
Marijn Suijten
1b1a99b320
audio,video: Use manual implementations for fns using *Endianness
...
{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.
2020-12-07 12:09:39 +01:00
Marijn Suijten
d7bc916dfa
ges: Mark fn name functions as not nullable to generate Display trait
2020-12-07 12:09:39 +01:00
Marijn Suijten
604902ed7c
audio,video: Ignore *Format::get_info
...
The result is not nullable, and this function call can be substituted by
*FormatInfo::from_format().
2020-12-07 12:09:39 +01:00
Marijn Suijten
18d6823dd8
gstreamer: Ignore Gst.Format::register; needs manual implementation
2020-12-07 12:09:39 +01:00
Marijn Suijten
c4e82ce7b9
gstreamer: Add EventTypeFlags to autogenerated
2020-12-07 12:09:39 +01:00
Marijn Suijten
8a309b39f2
gstreamer: Add Glib.Quark to manual list and sort
2020-12-07 12:09:39 +01:00
Marijn Suijten
f260fa4f8d
gstreamer/event: Use autogenerated EventType::get_name
2020-12-07 12:09:39 +01:00
Marijn Suijten
c95bd4f47a
video: Implement get_kr_kb manually to fix capitalization
...
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`
2020-12-07 12:09:39 +01:00
Marijn Suijten
12c74d681b
audio: Disable fn fill_silence with broken glib translation
...
This function is already manually defined in AudioFormatInfo and
shouldn't reside under AudioFormat.
2020-12-07 12:09:39 +01:00
Marijn Suijten
736f58a631
audio,video: Mark to_string functions on "unknown"-enum as manual
2020-12-07 12:09:39 +01:00
Marijn Suijten
57bc1c7f42
audio,video,gl,webrtc: Mark manually-confirmed to_string fns as non-NULL
...
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.
2020-12-07 12:09:39 +01:00
Marijn Suijten
d9769aeb6a
audio/video: Add missing FromGlibPtrNone<*const> for FormatInfo
2020-12-07 12:09:39 +01:00
Marijn Suijten
0763d2645d
video: Reuse Self::Err in from_str
2020-12-07 12:09:39 +01:00
Marijn Suijten
2447664df6
Replace Result<(), fmt::Error> with fmt::Result
2020-12-07 12:09:39 +01:00
Marijn Suijten
9f0befa033
gstreamer: macro_use is for use
statements, not macro calls
2020-12-07 12:09:39 +01:00
Sebastian Dröge
f6700f1ff1
gstreamer-base/adapter: Replace various error cases with Rust assertions
...
These are assertions on the C side too and are programmer errors, not
something that can be handled gracefully.
2020-12-07 10:48:28 +02:00
Sebastian Dröge
1199e89dca
gstreamer-base/adapter: Add error checking at the bindings level
...
Instead of running into (inconsistent even) assertions inside the C
code.
Also don't return uninitialized data and signed offsets from the
masked_scan() functions.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/298
2020-12-06 20:11:18 +02:00
Sebastian Dröge
15722ec5d2
gstreamer/datetime: Check invariants on the bindings side instead of asserting in the C code
...
Newer versions of GStreamer (1.20 and above) will not assert any longer
but handle it more gracefully, so let's do the same here for all
versions.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/297
2020-12-06 19:23:32 +02:00
Marijn Suijten
584a87163f
video/video_meta: get_plane_size now takes a size-annotated array ptr
2020-12-04 19:37:10 +01:00
Marijn Suijten
5afca49a7b
gstreamer: Propagate nullability changes into manual code
2020-12-04 19:37:07 +01:00
Marijn Suijten
88321a4d61
Gir.toml: Remove unnecessary non-nullable return annotations
2020-12-04 19:37:07 +01:00
Marijn Suijten
92df13eeb1
Regenerate with trusted nullability
2020-12-04 19:37:06 +01:00
Marijn Suijten
ceeaf97793
gst,base,check,net: Trust return value nullability
2020-12-04 19:36:22 +01:00
Marijn Suijten
47102b0e76
Regenerate with fresh gir files
2020-12-04 19:34:09 +01:00
Marijn Suijten
217dfdff10
gir-files: Import from gstreamer-bad 1.18.~2 at 2f2e8a93
2020-12-04 19:34:09 +01:00
Marijn Suijten
1c22ab66ee
gir-files: Import from gstreamer-base 1.18.~2 at ee38a96c8
2020-12-04 19:34:09 +01:00
Marijn Suijten
59a4f06d17
gir-files: Import from gstreamer 1.18.~2 at 865cfb8ea
...
Includes fixed null annotations
2020-12-04 19:34:07 +01:00
Marijn Suijten
275425ae9f
gir-files: Import from gstreamer-bad 1.18.1 at e5c3c106a
2020-12-03 19:38:26 +01:00
Marijn Suijten
5744d33ec7
gir-files: Import from gstreamer 1.18.1 at 29a8099d1
...
This complements an earlier import for gstreamer-base 1.18.1.
2020-12-03 19:38:26 +01:00
Guillaume Desmottes
8b9ef8b109
video: add alignment API to VideoMeta
2020-12-03 16:39:40 +01:00
Guillaume Desmottes
c529d4d4ae
video: add VideoInfo::align_full()
2020-12-03 16:39:40 +01:00
Guillaume Desmottes
e404d4f213
video: VideoInfo::align(): return a Result
2020-12-03 16:39:40 +01:00
Guillaume Desmottes
7cc57f4164
video: implement Eq and PartialEq on VideoAlignment
2020-12-03 16:39:35 +01:00
Guillaume Desmottes
6fbe7a1739
video: add VideoMeta::get_plane_{height,size}
...
Fix #299
2020-12-03 12:15:51 +01:00
Sebastian Dröge
dd23ac7093
gstreamer-gl: Fix/extend cargo metadata and add README.md for new EGL/Wayland/X11 sub-crates
2020-11-29 11:42:24 +02:00