Commit graph

33 commits

Author SHA1 Message Date
Sebastian Dröge fa5491e6b3 Use borrowed miniobject/structure types in more places
When the function does not keep around an additional reference of the
value this is correct and more flexible for callers.

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/420

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1152>
2022-11-21 12:40:37 +02:00
Sebastian Dröge d80227e566 Trust nullability annotations everywhere 2022-10-18 18:15:01 +03:00
François Laignel 069c6a2c01 Rename feature 'ser_de' as 'serde'
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.
2022-09-12 19:36:30 +02:00
Sebastian Dröge 4651c9db4d Update minimum supported version to 1.14
This is the version that is available in Ubuntu 18.04.
2022-04-07 12:45:47 +03:00
Vivienne Watermeier 1274a59472 video: update navigation API for recent changes
Add support for the new send_event_simple and event_get/set_coordinates
functions, as well as touchscreen events and modifier state. See:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2010
2022-04-05 19:49:05 +00:00
Sebastian Dröge fbe0728da5 video: Add bindings for VideoAggregator 2022-03-22 19:00:32 +02:00
Sebastian Dröge 3080c37897 video: Ignore new navigation event constructors
And add doc aliases for the already existing manual implementations of
them.
2022-03-17 11:06:26 +02:00
Thibault Saunier 56dfe0fe59 video: Add GstNavigation interface "subclassing" support 2021-12-24 14:18:52 -03:00
Sebastian Dröge 8f3ed6d289 Add checks for the Gir.tomls
... and fix all the failures.
2021-12-03 20:27:50 +00:00
Sebastian Dröge 1eba9b64e5 video: Add bindings for ColorBalance / ColorBalanceChannel 2021-11-15 20:38:06 +00:00
Sebastian Dröge d785bf8c3a Regenerate with latest gir 2021-10-31 11:47:34 +02:00
Sebastian Dröge 71e58bfec2 Add some newly added API 2021-10-08 19:43:47 +03:00
Sebastian Dröge a1c4a58180 Bind various new API 2021-09-19 13:12:58 +00:00
François Laignel 532af96ef9 Gir.toml: use TryFromGlib::Option for ClockTime 2021-06-04 22:09:38 +02:00
Marijn Suijten af6efa3efe video/gir: Enable 1.19.1 VideoAggregatorParallelConvertPad generation 2021-06-03 20:36:04 +02:00
Marijn Suijten 899a1f6ea4 video/gir: Enable 1.19.1 VideoDecoderRequestSyncPointFlags generation 2021-06-03 20:36:02 +02:00
Marijn Suijten 9b22b09efe gir: Remove unnecessary member annotations 2021-06-03 20:25:38 +02:00
Marijn Suijten 800ad5fc4a video/gir: Document manually implemented types and functions 2021-06-01 13:40:52 +00:00
Marijn Suijten 1e58dd553c treewide: Add missing external external types to manual list
Gir now uses analyzed objects to generate documentation, and to know
exactly what is available.  Additionally, this allows more bindings to
be generated.
2021-06-01 13:40:52 +00:00
François Laignel 4b2e001f8e Gir.toml: use TryFromGlib for *Return types 2021-05-04 11:33:51 +00:00
Marijn Suijten 7ede94fec8 Replace all girs_dir with girs_directories and add gst-gir-files dir
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.
2021-04-23 22:01:23 +02:00
Marijn Suijten 666ea908a5 Revert "Gir.toml: Drop unused/renamed girs_dir in favour of gir -d"
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.
2021-04-23 21:59:33 +02:00
Marijn Suijten 7f9fcb09e2 Gir.toml: Drop unused/renamed girs_dir in favour of gir -d
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.
2021-04-01 15:53:23 +02:00
Sebastian Dröge 0ea48e9894 gstreamer-video: Add support for VideoOrientation interface and VideoOrientationMethod enum 2021-02-19 18:42:38 +02:00
Marijn Suijten 85e46f39f3 video: Provide manual to_string and display for VideoChromaSite
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.
2020-12-12 20:28:37 +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 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 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 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 9577965782 sys/Gir.toml: Drop default target_path in current directory 2020-11-28 11:07:48 +01:00
François Laignel ec220201e7 gstreamer-video: regenerate 2020-11-05 12:40:44 +01:00
Sebastian Dröge f657a56947 Move Gir.toml into the corresponding subdirectories 2020-10-30 18:06:01 +02:00
Renamed from Gir_GstVideo.toml (Browse further)