Commit graph

79 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
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
Vivia Nikolaidou 32fbb04fa4 gstreamer-video: Add VideoCapsBuilder 2022-07-20 11:06:21 +00:00
Sebastian Dröge c9d07219c8 Store whether GStreamer was initialized in an AtomicBool
Avoids a function call in the normal case.
2022-06-27 10:28:28 +03:00
Vivienne Watermeier 1b22be2e15 Add De/Serialization for most bitflag types
Represents combinations of flags with a '+' separated string of nicks,
or an empty string for no flags set.

Note that most flag types will ignore any flags using multiple bits when
serializing, since in most cases these flags cover all used bits.
2022-05-06 09:05:52 +00: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
Sebastian Dröge eed648831d video: Add various VideoFormatInfo/VideoInfo/VideoFrame helper API 2022-04-04 15:50:09 +03:00
Sebastian Dröge fbe0728da5 video: Add bindings for VideoAggregator 2022-03-22 19:00:32 +02:00
Sebastian Dröge 605c633579 Ignore clippy::non_send_fields_in_send_ty lint
It's useless in its current shape and wrongly triggering on all types.

See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-13 23:38:11 +02:00
Thibault Saunier fc452036d2 navigation: Add support for event creation and simplify the API
And also allow implement serialization with serde (behind a feature) to
allow sending navigation event through the network (for example from a
browser with a WebRTC data channel).
2021-12-24 14:19:08 -03:00
Thibault Saunier 56dfe0fe59 video: Add GstNavigation interface "subclassing" support 2021-12-24 14:18:52 -03:00
Sebastian Dröge 1eba9b64e5 video: Add bindings for ColorBalance / ColorBalanceChannel 2021-11-15 20:38:06 +00:00
Bilal Elmoussaoui 213020165a manual changes post ObjectExt improvements 2021-11-08 14:42:59 +01:00
Sebastian Dröge 7037f6d836 video: Rename VideoOverlayComposition iterator struct 2021-10-17 11:24:33 +03:00
Sebastian Dröge 4e235b0492 video: Add support for static HDR metadata
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/270
2021-09-25 14:49:33 +03:00
Guillaume Gomez e2264a3f3f Fix (new) clippy warnings 2021-08-03 10:08:32 +02:00
Guillaume Gomez a0d82ec741 Merge README files and crate documentation 2021-07-30 20:26:11 +02:00
Sebastian Dröge b1afc4804a Fix various needless-borrow clippy warnings 2021-07-30 13:19:24 +03:00
Marijn Suijten e52e4328b3 Allow clippy::use_self on auto module 2021-04-30 10:02:47 +02:00
Marijn Suijten e6a81edb3c prelude: Remove redundant reexports already provided by other preludes
For cleanliness the prelude module only needs to reexport preludes from
direct, "top-most" crates, which themselves take care of reexporting
preludes from its dependencies again.  This shaves off some code while
maintaining the same set of exports.
2021-04-29 11:44:35 +02:00
Marijn Suijten 827ff99965 lib: Only export traits (Ext and ExtManual) from prelude
In gir it was brought up [1] that some traits (in particular
`*ExtManual`) are exported from the crate root in addition to the
prelude, cluttering the environment unnecessarily.  This commit removes
all these reexports, leaving those in prelude (that were already there)
only.

After this commit everything matching `Ext(Manual)?\b` in `lib.rs` sits
within `pub mod prelude {};`.

[1]: https://github.com/gtk-rs/gir/pull/1111
2021-04-26 11:25:23 +02:00
Marijn Suijten fb55cdfeff Remove allow(unused_imports) from mod auto
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.
2021-01-30 15:49:49 +01:00
Sebastian Dröge 68839c0e79 Re-export all dependency crates and their preludes
This makes code in examples potentially simpler.
2020-12-20 19:40:34 +02:00
Guillaume Gomez ff5a36561a Fix license header situation 2020-12-15 11:53:31 +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
Guillaume Gomez 8f9d76bb8c Revert "Remove unnecessary dox feature"
This reverts commit 9dd8bd9095.
2020-11-27 14:37:49 +01:00
Guillaume Gomez 9dd8bd9095 Remove unnecessary dox feature 2020-11-25 15:54:02 +01:00
Sebastian Dröge d31badf9ac gstreamer-video: Update manual code to 2018 edition 2020-11-22 19:15:20 +02:00
Marijn Suijten e88994a0b7 use cfg_if to refactor some #[cfg()] / #[cfg(not())] pairs 2020-11-19 16:39:31 +01:00
Marijn Suijten bd75778fcb Add doc(cfg()) on all manual files 2020-11-19 16:39:31 +01:00
Marijn Suijten 3f373f623a Enable feature(doc_cfg) in all lib.rs
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.
2020-11-19 16:39:31 +01:00
Sebastian Dröge 501934a29b Allow unused imports in autogenerated code
These should not be there to begin with but they're hard to prevent.
2020-10-17 13:09:45 +03:00
Sebastian Dröge 5845038a63 video: Use correct version for interlaced caps feature 2020-07-03 13:00:07 +03:00
Sebastian Dröge 947ac8db5c Name functions returning a builder builder(), not new()
And also make the video event API more consistent with the normal event
API.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/269
2020-06-25 19:42:33 +03:00
Guillaume Desmottes 1d886727d9 video: sort VIDEO_FORMATS_ALL
Test also ensures that the formats list returned by
gst_video_formats_raw() is properly sorted when running with feature
1.18.
2020-06-09 09:26:32 +02:00
Mathieu Duponchelle 9f422c25d9 audio / video: export new formats iterators in preludes 2020-06-03 21:38:16 +02:00
Sebastian Dröge 9236ace284 video: Add VideoAffineTransformationMeta, CropMeta and RegionOfInterestMeta
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/218
2020-06-02 16:05:01 +03:00
Mathieu Duponchelle 02a43819a7 gstreamer-video: expose caps features 2020-05-22 21:31:45 +02:00
Sebastian Dröge 80c93dfddb video: Add Future variant of convert_sample_async()
Requires to be spawned on the GLib main context futures executor as the
function itself requires a GLib main context to call the callback.
2020-02-09 19:08:41 +02:00
Sebastian Dröge 53dd841006 video: Add VideoConverter bindings 2020-01-30 23:17:06 +02:00
Sebastian Dröge 7230aee069 Switch everything from lazy_static to once_cell::Lazy
Fewer macros, faster compile-time and the Lazy type will likely end up
in the standard library in a similar form to this.
2020-01-22 19:57:41 +02:00
Guillaume Gomez 9e30687d8e Fix glib reexports 2019-11-11 11:34:09 +01:00
Sebastian Dröge 452ea45c1b video: Actually export is_video_overlay_prepare_window_handle_message() function 2019-10-29 19:40:32 +02:00
Sebastian Dröge 2d2459ed52 Export traits from the crate level and ensure that all traits are in the preludes 2019-10-17 13:30:35 +03:00
Sebastian Dröge 52509b4b95 Remove subclassing feature and make it the default 2019-09-09 11:51:07 +03:00
Sebastian Dröge eddf4a61ff videoencoder/decoder: Add constants for the NEED_DATA custom flow returns 2019-08-14 20:22:55 +03:00
Sebastian Dröge e3282c27f1 video: Generate VideoBufferFlags and add a extension trait for setting/getting them on buffers 2019-07-16 11:51:23 +03:00
Sebastian Dröge b87ffa17bb Run rustfmt also over all the generated code 2019-06-18 13:12:00 +03:00
Sebastian Dröge 7a0bc76668 video: Add VideoEncoder bindings
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/160
2019-05-25 10:11:06 +02:00
Vivia Nikolaidou 4a8e860a9e gstreamer-video: Expose VideoBufferPool
Closes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/12
2019-05-24 10:32:57 +00:00