Commit graph

394 commits

Author SHA1 Message Date
Sebastian Dröge ea136515cf Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1190>
2023-01-15 20:17:11 +02:00
Sebastian Dröge 37bfb78fdc Change some assertions to debug assertions
These assertions can only trigger because of bugs in the bindings
implementation or in the C code and not because of bugs in calling code,
so using debug assertions is perfectly fine for them and reduces the
number of assertions inlined everywhere in release builds.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1188>
2023-01-14 17:13:46 +02:00
Sebastian Dröge f235dc987d Inline various trivial functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1177>
2023-01-11 11:33:54 +02:00
Sebastian Dröge f07727ee6d Use uninitialized stack memory for out parameters instead of zeroed memory if applicable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1187>
2023-01-11 09:06:38 +00:00
Sebastian Dröge ba1d8c5ce6 gstreamer: Move initialization panic into a separate function
This keeps the number of duplicated panics all over the codebase lower
and reduces generated code size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1184>
2023-01-05 21:33:14 +02:00
Sebastian Dröge 8d30bcbf4b Use IntoGlibPtr trait instead of to_glib_full() where appropriate to reduce unnecessary refcounting/copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1183>
2023-01-05 12:09:57 +02:00
Sebastian Dröge a028e807df gstreamer: Autogenerate some more API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:25:17 +02:00
Sebastian Dröge 567ce0a3bf Group and merge imports in all manual code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:25:17 +02:00
Sebastian Dröge 45c145ad50 Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:25:17 +02:00
Sebastian Dröge cbd3035a5b gstreamer: Implement gst::Segment via glib::wrapper!
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1180>
2023-01-03 10:41:35 +00:00
Sebastian Dröge d6cc452cf3 Use PhantomData as Stash::Storage if nothing has to be stored except for a lifetime
This reduces the size of all stashes from two pointers to one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1171>
2022-12-20 17:07:39 +00:00
Sebastian Dröge 3764bf75f8 Regenerate with latest GStreamer gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1170>
2022-12-16 22:09:29 +02:00
Sebastian Dröge 7012fa638e Regenerate with latest gir/gir-files/gst-gir-files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1159>
2022-12-09 17:37:01 +02:00
Sebastian Dröge 0b013001b7 Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1156>
2022-11-26 15:01:10 +02:00
Sebastian Dröge cbfc19ccfc Regenerate with latest GStreamer gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1153>
2022-11-21 13:29:38 +02:00
Sebastian Dröge 1fb531bba2 base: Add manual bindings for new 1.22 typefind helper API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1153>
2022-11-21 13:23:38 +02:00
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 9ba448427d Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1148>
2022-11-12 17:40:16 +02:00
Sebastian Dröge 32c432655f Regenerate with latest GStreamer gir files 2022-11-08 18:15:34 +02:00
Sebastian Dröge 01e24d2018 Fix various new clippy warnings 2022-11-01 11:10:57 +02:00
Sebastian Dröge 90b8ee2022 Move from imp.instance() to imp.obj()
It's doing the same thing and is shorter.
2022-10-23 23:06:44 +03:00
François Laignel 87ea535bc1 gst/log: accept non-ref obj in macros 2022-10-23 20:44:38 +02:00
Sebastian Dröge bf7c770457 Regenerate with latest gir files 2022-10-22 20:22:10 +03:00
Sebastian Dröge 67e3183922 Regenerate with latest gir and gir-files 2022-10-18 18:16:51 +03:00
Sebastian Dröge 7d10f9f4c8 Regenerate with latest gir/gir-files 2022-10-12 15:05:07 +03:00
François Laignel 8e2c621a9f gst/lib: cleanup format re-exports 2022-10-10 15:10:10 +02:00
Sebastian Dröge f17781e188 Change *Impl trait methods to only take &self and not Self::Type in addition 2022-10-10 15:01:07 +03:00
Sebastian Dröge dcd53bd16e Regenerate with latest gir 2022-10-07 20:30:24 +03:00
Sebastian Dröge dec112d0a8 Regenerate with latest gir/gir-files/gst-gir-files 2022-09-13 12:13:07 +03:00
Sebastian Dröge efe13948cc ci: Update gst-gir-files and bring autogenerated code in sync 2022-09-04 20:51:07 +03:00
Sebastian Dröge 44d899a0eb Regenerate with latest gir / gir-files / gst-gir-files 2022-08-31 11:13:08 +03:00
Sebastian Dröge 76f01516e3 Regenerate with latest GStreamer gir files 2022-08-19 19:42:05 +03:00
Sebastian Dröge fbad0fd0bc Regenerate with latest gir / gir-files / gst-gir-files 2022-08-14 14:02:50 +03:00
Sebastian Dröge b5920ee729 Regenerate with latest gir 2022-07-18 13:25:36 +03:00
François Laignel fe319af598 Implement FormattedValue on any candidate type
The trait FormattedValue was only implemented on types which
could implement the full range of values for a Format. In order
to declare a function which could take both the intrinsic type
of any Format (e.g. `ClockTime`) as well the full range of values
(e.g. `Option<ClockTime>`), the argument was declared:

```rust
    impl Into<GenericFormattedValue>,
```

This commit implements `FormattedValue` for any type representing
a format. E.g.: both `ClockTime` and `Option<ClockTime>` will now
implement `FormattedValue`. The trait `FormattedValueFullRange`
is implemented on types which can be built from any raw value.

These changes are intended to help for the implementation of a
means to enforce format conformity at compilation time for
functions with multiple formatted value arguments.

The following signatures were found to be incorrect and are fixed:

- `message::StepDone`: forced the type for `amount` and `duration`
  to be of the same type, when `duration` is expected to be of the
  `Time` format.
- `query::Convert::set`: the two arguments were forced to the same
  type, so potentialy the same format, unless a
  `GenericFormattedValue` was used.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1059
2022-07-11 19:45:52 +02:00
Sebastian Dröge 4dade30f0d Fix/silence a couple new clippy warnings 2022-06-30 13:08:33 +00:00
Sebastian Dröge 90aaa32957 Regenerate 2022-06-30 08:46:06 +03:00
Sebastian Dröge 20ac231146 gstreamer: Allow borrowing Segments from Values without copying 2022-06-27 22:28:49 +03: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
Sebastian Dröge 310ff531fb base: Fix memory leak if BaseSrc/PushSrc parent class is not filling the provided buffer as it should 2022-06-24 11:13:06 +03:00
Sebastian Dröge 6b47d646c0 base: Add support for returning buffer lists from BaseSrc/PushSrc subclasses 2022-06-24 11:13:06 +03:00
Philippe Renon 8f1c94f45d Regenerate with latest gir 2022-05-20 17:48:40 +02:00
Guillaume Gomez c1d3ed5eac Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
Sebastian Dröge a16c3888e5 Return base class pads by reference instead of strong reference
Avoids unnecessary reference counting and the caller can get a strong
reference easily by calling clone().
2022-05-05 14:18:03 +03:00
Mathieu Duponchelle 80b0b378fc base classes: expose accessors for static pads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1023>
2022-05-04 17:15:07 +02:00
Sebastian Dröge 4a28a188d9 Regenerate with latest gir/gir-files 2022-05-03 15:37:25 +03:00
Sebastian Dröge 8d001d8b16 Stop using glib::SendUnique
It is being removed because it does not add a lot of value.
2022-04-09 11:37:53 +03: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 b36b63c60a Regenerate with latest gir files 2022-04-06 09:38:34 +03:00
Sebastian Dröge 23e4d1efa8 Regenerate with latest GStreamer gir files 2022-04-05 19:49:05 +00:00
Jan Alexander Steffens (heftig) 44b2eba600
Update gir 2022-03-30 22:36:53 +02:00
Sebastian Dröge 2943c310cd base: Fix signature of Aggregator::connect_samples_selected()
The first argument is not a random aggregator type but the type that was
used to connect to the signal.
2022-03-22 19:00:32 +02:00
Sebastian Dröge 609a744d6c Regenerate autogenerated bindings 2022-03-17 18:05:13 +02:00
François Laignel 972c4e75ac remove gst_ prefix for log macros
It's quite quite common to use similar macros in the form `log::debug!`
or `glib::clone!`. This MR renames the gst log macros so that we can
`gst::debug!` instead of `gst_debug!` and whithout the need for
`use gst::gst_debug`.
2022-02-21 18:56:06 +01:00
Sebastian Dröge 47ae1c8658 Regenerate with latest gir files 2022-02-04 12:35:01 +02:00
Sebastian Dröge deced8b3b8 Regenerate with latest GStreamer gir files 2022-01-29 18:17:26 +02:00
Sebastian Dröge 26f2ed30ae Regenerate with latest gst-gir-files 2022-01-25 13:10:58 +02:00
Sebastian Dröge 13eb483444 Regenerate everything with latest gir 2022-01-24 19:29:18 +02:00
Sebastian Dröge 5e2249d368 message/query/event: Implement views in a more consistent way
Co-authored-by: Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
2022-01-19 13:29:59 +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
Sebastian Dröge 9eb479cf78 Regenerate everything 2022-01-12 15:40:36 +02:00
Guillaume Gomez 27dd305cb4 Regen to get #[must_use] attributes generated 2022-01-04 19:02:58 +01:00
Sebastian Dröge bbcd221e8d Change from impl_() to imp() 2021-12-28 17:50:06 +02:00
Luca BRUNO c30eff771a
Regenerate with latest gir (gboolean return codes) 2021-12-14 11:43:30 +00:00
Sebastian Dröge 9bf5f641ff Regenerate with latest gir 2021-12-12 17:54:20 +02:00
Luca BRUNO d1cc8d1298
Regenerate with latest gir (assert safe gerror) 2021-12-07 12:07:45 +00:00
Sebastian Dröge 5a75f3bf8e Don't post error messages in subclasses on propose/decide_allocation() errors and BaseParse::set_sink_caps()
Instead just log the error and return false.
2021-12-06 18:41:39 +02:00
Sebastian Dröge 7d968d78bb Silence false needless_option_as_deref clippy warnings
See https://github.com/rust-lang/rust-clippy/issues/8047
2021-12-02 17:52:23 +02:00
Jimmi Holst Christensen 14dadf4c62 aggregator: Implement set_position 2021-11-24 13:21:23 +01:00
Bilal Elmoussaoui 86b07ce5b9 regen per emit_by_name changes 2021-11-21 09:35:36 +01:00
Sebastian Dröge 7c1ed9ff4d Regenerate with latest gir
Updates to use system-deps 6
2021-11-18 16:32:17 +02:00
Bilal Elmoussaoui e61b83f592 regenerate with not renamed libs on ffi crates 2021-11-17 12:00:06 +01:00
Sebastian Dröge e74f54a64f Regenerate with latest gst-gir-files 2021-11-16 20:18:31 +02:00
Bilal Elmoussaoui 0d391d5031 regenerate with latest gir 2021-11-16 15:47:44 +01:00
Sebastian Dröge dd9e12822f Regenerate with latest gir 2021-11-13 11:05:09 +02:00
Bilal Elmoussaoui d788a10856 re-generate with per crate min version 2021-11-11 12:26:29 +01:00
Bilal Elmoussaoui 213020165a manual changes post ObjectExt improvements 2021-11-08 14:42:59 +01:00
Bilal Elmoussaoui 0d009bca31 regen with latest gir 2021-11-08 14:42:59 +01:00
François Laignel 82b7239379 regen: NONE as associated consts 2021-11-04 18:42:06 +01:00
Sebastian Dröge cdfe4b3d67 Remove unneeded std::convert::TryFrom/TryInto and std::str::FromStr imports 2021-10-31 18:20:31 +02:00
Sebastian Dröge d785bf8c3a Regenerate with latest gir 2021-10-31 11:47:34 +02:00
Sebastian Dröge 12fec484c7 Simplify IsSubclassable trait impls 2021-10-23 11:27:46 +03:00
Sebastian Dröge dc7e705f44 base: decide_query in Aggregator/BaseTransform propose_allocation() is nullable 2021-10-16 15:36:20 +03:00
Sebastian Dröge f6cf6c8863 Improve subclass decide_allocation() / propose_allocation() API
The queries passed in are always allocation queries, so don't require
implementors to match on that first.
2021-10-16 14:24:08 +03:00
Sebastian Dröge 7e71c74505 base: Add support for propose_allocation()/decide_allocation() in the base classes 2021-10-16 14:24:08 +03:00
Sebastian Dröge 1c7b4516f9 Regenerate everything with latest GStreamer gir files 2021-10-08 19:44:38 +03:00
Sanchayan Maity b13f2060dc Update prepare_output_buffer's type signature
Update prepare_output_buffer's type signature to correctly reflect
whether it gets to work with a writable or readable buffer.
2021-10-07 12:38:07 +05:30
Sebastian Dröge c4cbcecc7c Regenerate everything 2021-09-28 18:11:20 +03:00
Sebastian Dröge baccf52e43 Regenerate with latest gir 2021-09-28 15:46:37 +03:00
Sebastian Dröge f5f5fae815 Regenerate with latest gir and gtk-rs gir-files 2021-09-28 12:55:58 +03:00
Sebastian Dröge 14edcf9aaf Regenerate with latest gir 2021-09-22 12:02:53 +03:00
Marijn Suijten 669bf52291 Use impl for AsRef trait bounds 2021-09-21 23:54:07 +02:00
Marijn Suijten 13165938ab Regen 2021-09-20 20:38:25 +02:00
Marijn Suijten e2a9f83f5b gir: Update and regenerate with impl Trait instead of named types
https://github.com/gtk-rs/gir/pull/1153
2021-09-20 20:19:04 +02:00
Sebastian Dröge c66287843f gstreamer-base: Allow filling a passed in buffer in PushSrc::create()
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/277
2021-09-19 13:59:05 +00:00
Sebastian Dröge 4b8f85c4c6 Regenerate with new gir and gir files 2021-09-19 13:12:58 +00:00
Guillaume Gomez c68b601c74 regen 2021-08-31 15:11:15 +02:00
Marijn Suijten adfb6e35a4 Update gir and regenerate with attributes removed from macro calls
See https://github.com/gtk-rs/gir/pull/1213.
2021-08-30 09:52:36 +02:00
Simonas Kazlauskas 782d84bede Remove the links annotations
The `links` annotation in `Cargo.toml` is intended to ensure that in the
crate graph there's at most one crate that's an implementation of
some sort concept.

This can make sense in some scenarios, most prominent of which is when
the crate defines `#[no_mangle]` symbols (e.g. by compiling a vendored C
library.) In that situation linking a binary that depends on two
versions of the library cannot work because of colliding symbol names.

There does not appear to be a similar reason to impose such a
restriction on the users of `gstreamer-sys` and similar, however. All of
these crates link to a system library, they do not define any
`#[no_mangle]` symbols nor they vendor and build C libraries as part of
their build process. All they do is linking to a system library.  Most
likely all the different versions of the bindings will link to the exact
same library too.

I haven't seen any global resources that these bindings use to ensure
soundness of the library, either.
2021-08-23 16:56:27 +00:00
Guillaume Gomez 26a6fba6e2 regen 2021-08-03 11:55:44 +02:00