Commit graph

1173 commits

Author SHA1 Message Date
Sebastian Dröge
8fb37c5134 gstreamer: Implement Deref<Target=[glib::SendValue]> for List and Array 2021-10-12 11:24:54 +03:00
Sebastian Dröge
1c7b4516f9 Regenerate everything with latest GStreamer gir files 2021-10-08 19:44:38 +03:00
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
Jan Alexander Steffens (heftig)
c05d2e24af
gstreamer/clock_time: Format Debug like Display
This allows us to drop `.to_string()` from the custom Debug
implementations, which now also no longer print as strings.
2021-09-23 02:19:41 +02:00
Sebastian Dröge
14edcf9aaf Regenerate with latest gir 2021-09-22 12:02:53 +03:00
Marijn Suijten
226419003d Use impl for some Into* trait bounds 2021-09-21 23:54:11 +02: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
a1c4a58180 Bind various new API 2021-09-19 13:12:58 +00:00
Sebastian Dröge
4b8f85c4c6 Regenerate with new gir and gir files 2021-09-19 13:12:58 +00:00
Sebastian Dröge
1856d47a06 gstreamer: Add bindings to MiniObject together with casting functionality
This is only possible with 1.20 because gst_mini_object_get_type() was
added then. Previous versions only provide bindings for the specific
types, like Caps, Event, etc.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/353
2021-09-19 13:12:58 +00:00
Sebastian Dröge
538ce91987 gstreamer: Provide getter for meta type in addition to meta API type 2021-09-19 15:45:58 +03:00
Sebastian Dröge
7c5303c492 gstreamer: Add support for gst::CustomMeta 2021-09-19 15:45:58 +03:00
Sebastian Dröge
80ee1edec5 gstreamer: Clean up meta code a bit 2021-09-19 15:45:58 +03:00
Jonas Platte
4b2f0a936b
Derive PartialOrd, Ord and Hash for PadProbeId 2021-09-15 20:12:03 +02:00
Sebastian Dröge
6b4f6ca45c gstreamer/device_provider: Add constructor for device provider metadata 2021-09-13 11:34:00 +03:00
Guillaume Gomez
c68b601c74 regen 2021-08-31 15:11:15 +02:00
Simonas Kazlauskas
db30c121a0 const ElementMetadata constructor
The usual use of this will be through the `ElementImpl::metadata`
method, which requires a `&'static` reference to `ElementMetadata` to be
returned, so we better make it easy to construct these (without forcing
people to resort to `Lazy`'n'stuff)
2021-08-31 09:10:31 +00: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
Marijn Suijten
12887f1931 gstreamer: Move attributes on macro-calls like cfg_if inside the macro
Attributes don't do anything when applied to macro invocations:

    warning: unused attribute `doc`
       --> gstreamer/src/lib.rs:146:29
        |
    146 | #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
        |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(unused_attributes)]` on by default
    note: the built-in attribute `doc` will be ignored, since it's applied to the macro invocation `cfg_if::cfg_if`
       --> gstreamer/src/lib.rs:147:1
        |
    147 | cfg_if::cfg_if! {
        | ^^^^^^^^^^^^^^

And, on line 294-295:

    warning: unused attribute `doc`
       --> gstreamer/src/lib.rs:294:33
        |
    294 |     #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
        |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
    note: the built-in attribute `doc` will be ignored, since it's applied to the macro invocation `cfg_if::cfg_if`
       --> gstreamer/src/lib.rs:295:5
        |
    295 |     cfg_if::cfg_if! {
        |     ^^^^^^^^^^^^^^

Fortunately these two `cfg_if`'s for the Unix and Windows bus already
apply unnecessary trickery that duplicates the `mod`s and `use`s in
order to get documenation for both no matter the target platform; we can
capitalize on that by removing the `cfg_if` altogether and instead
applying the `cfg` and `doc(cfg())` attributes directly.
2021-08-29 11:21:46 +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
Sebastian Dröge
ece84597fd Update CHANGELOG.md for 0.17.3 2021-08-23 09:11:50 +03:00
Marijn Suijten
068b078edf README: Replace shell with console codeblocks 2021-08-18 15:28:00 +02:00
Marijn Suijten
323c67dee4 README: Use symlink to point to gstreamer/README.md
These files are (supposed to be) identical.  This also synchronizes the
missing bits from README.md to gstreamer/README.md.
2021-08-18 15:14:33 +02:00
Sebastian Dröge
bdccaeee0d gstreamer: Manually implement Object::set_property_from_str() to be able to catch deserialization errors 2021-08-17 09:12:38 +03:00
Sebastian Dröge
43bfd1ae85 gstreamer: Add Value::deserialize_with_pspec() from 1.20 2021-08-17 08:53:53 +03:00
Sebastian Dröge
c5c9fd81e4 gstreamer: Value::deserialize() needs to take the target type as parameter
Otherwise it will always fail.
2021-08-17 08:53:52 +03:00
Jordan Petridis
2ded2837ba
tracer: add rustdoc-stripper-ignore-next annotations 2021-08-16 18:49:23 +03:00
Edward Hervey
f504493134 gstreamer: Add serde support for more enums and flags
PadDirection, PadPresence, URITYpe, Rank
2021-08-16 15:05:37 +02:00
Simonas Kazlauskas
cb475e0965 Bindings to GstTracer and GstTracerFactory
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/147
2021-08-16 14:38:22 +03:00
Simonas Kazlauskas
3ad9d3340b Make plugin date-time optional
It is described as optional in
https://gstreamer.freedesktop.org/documentation/gstreamer/gstplugin.html?gi-language=c#GstPluginDesc
and is also pretty difficult to provide for Rust plugins, I feel. For C
stuff the expectation is that build system would set something like
GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` which is
terrible.
2021-08-10 17:38:55 +03:00
Sebastian Dröge
f84fc0dc59 Update CHANGELOG.md for 0.17.2 2021-08-05 18:01:23 +03:00
Guillaume Gomez
26a6fba6e2 regen 2021-08-03 11:55:44 +02: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
Sebastian Dröge
386bd05817 Update CHANGELOG.md for 0.17.1 2021-07-13 09:20:57 +03:00
Olivier Crête
93c794b338 subclass: Declare minimum to be 1.19 for v1_20 2021-07-13 08:42:56 +03:00
Sebastian Dröge
b73b4428ba gstreamer/segment: Return a segment reference instead of the value itself from the getter 2021-07-12 14:22:09 +03:00
Vivia Nikolaidou
eb5df0ae26 event: Implement gap_flags 2021-07-09 16:27:41 +03:00
Vivia Nikolaidou
45f8035ccb structure, caps: Implement 1.20 serialize functions 2021-07-09 15:10:02 +03:00
Sebastian Dröge
edac1a1d3a gstreamer/element: Include ElementExtManual::request_pad_simple() in the docs too
Currently only the v1_20 ElementExt::request_pad_simple() appears in the
docs but it's available from the other trait in older versions.
2021-06-30 09:26:51 +00:00
François Laignel
c9b88afcb4 gstreamer-*/CHANGELOG.md use symlinks 2021-06-29 15:45:58 +02:00
François Laignel
393d8959bd CHANGELOG: mention fix-getters migration tools 2021-06-29 11:40:56 +02:00
Sebastian Dröge
a06cf66e6d Update versions to 0.18.0 2021-06-29 00:08:16 +03:00
Sebastian Dröge
35c2086e2a Update CHANGELOG.md for 0.17.0 2021-06-29 00:07:36 +03:00
Sebastian Dröge
c0904af4a7 Regenerate with latest gir-files 2021-06-28 18:34:03 +03:00
Sebastian Dröge
1cec94af1a gstreamer: Mark all kinds of miniobject memory management convenience functions as existing since 1.18.3
Previously they were only available as inline functions in the headers.
2021-06-28 17:54:48 +03:00
Sebastian Dröge
9123143b57 Regenerate 2021-06-24 08:58:46 +03:00
Guillaume Gomez
dfeb777513 regen 2021-06-21 23:07:45 +02:00
Sebastian Dröge
a94d84e780 Silence/fix various clippy warnings 2021-06-20 10:59:49 +03:00
Guillaume Gomez
64d1598336 regen 2021-06-13 20:52:12 +02:00
Sebastian Dröge
0a71e3c8da Regenerate with latest gir 2021-06-10 12:53:52 +03:00
François Laignel
e31ce9d07b Manual ClockTime updates 2021-06-04 22:09:38 +02:00
François Laignel
90bb458e64 Rework ClockTime & FormattedValues 2021-06-04 22:09:38 +02:00
François Laignel
8dda8def6e Manual try_from_glib shortcuts + unsafe 2021-06-04 22:09:38 +02:00
François Laignel
03e8e6d22f regen: use TryFromGlib::Option for ClockTime 2021-06-04 22:09:38 +02:00
François Laignel
532af96ef9 Gir.toml: use TryFromGlib::Option for ClockTime 2021-06-04 22:09:38 +02:00
Marijn Suijten
8226c94110 sys: Link all v1_20 sys crates against library 1.19 2021-06-04 11:51:00 +02:00
Marijn Suijten
510e4cd2b1 Regenerate with 1.19.1 updates 2021-06-04 11:51:00 +02:00
Marijn Suijten
aa60c40c61 gst/gir: Generate new flags since 1.19.1 2021-06-04 10:26:24 +02:00
Marijn Suijten
7d13ecf1aa gst,gl: Drop superfluous enum/flag member versions (since 1.19.1)
https://github.com/gtk-rs/gir/pull/1180 now parses these from `.gir`
directly, and `1.19.1` now includes the version for a few more of these
enums.
2021-06-03 21:24:12 +02:00
Marijn Suijten
bdc26746b6 treewide/gir: Mark Gst.Structure as ref instead of ref-mut mode
The only bindings using this type show up in v1.20 and use `&mut` which
lacks a matching `.to_glib_full()` implementation.
2021-06-03 20:35:35 +02:00
Marijn Suijten
9fd768425e Rename request_pad_simple to avoid 1.19.1 clash
Fixes: 3f442d977 ("prep for regen: relaxed get fn identification")
2021-06-03 20:35:35 +02:00
Marijn Suijten
3d8d1ffb19 Update gir and regenerate with automated enum/flag member versioning
https://github.com/gtk-rs/gir/pull/1180
2021-06-03 20:33:34 +02:00
Guillaume Gomez
b0fc500ed1 Generate missing doc aliases 2021-06-02 20:23:29 +02:00
Guillaume Gomez
abf82e6f7a Replace raw constants with the FFI constants 2021-06-02 20:23:01 +02:00
Guillaume Gomez
96266ff922 Generate missing doc aliases 2021-06-02 17:35:30 +02:00
Marijn Suijten
7fcd560d18 Update gir and regenerate
- Doc aliases for types;
- ffi constants for bitflags too;
- Completely overhauled docs generation under the hood (only emitting
  valid links, more types receive documentation now).
2021-06-02 09:47:51 +02:00
Marijn Suijten
170f7214eb Regen with extended Gir.toml 2021-06-01 13:40:52 +00:00
Marijn Suijten
4f479326f3 gstreamer/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
Guillaume Gomez
5ba79976a9 Generate missing doc aliases for newtypes 2021-06-01 15:15:59 +02:00
Sebastian Dröge
849a524b09 element: Make caps in link_filtered() / link_pads_filtered() mandatory
Instead of passing `None`, the non-filtered variants of the functions
can be used.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/328
2021-05-30 17:30:22 +00:00
Sebastian Dröge
34f3e7710c Point to the new documentation location everywhere 2021-05-29 19:00:50 +03:00
Bilal Elmoussaoui
b2083d0973 gir-files: drop broken commit & regen 2021-05-28 14:16:15 +02:00
Marijn Suijten
0f73912133 gstreamer/gir: Remove duplicate function configurations
Found this ambiguity in https://github.com/gtk-rs/gir/pull/1164.
2021-05-28 13:24:49 +02:00
Marijn Suijten
eaed54e279 Update gir and regenerate with simplified trait bounds
Trait bounds moved from `where T: Foo` directly into the type parameter
definition at `<T: Foo>`: https://github.com/gtk-rs/gir/pull/1160.
2021-05-27 00:02:42 +02:00
Sebastian Dröge
88c4f70195 Regenerate with latest gir 2021-05-23 16:27:57 +00:00
Guillaume Gomez
dcd0695567 Improve conversion code for enum variants 2021-05-23 13:15:27 +02:00
Guillaume Gomez
7e892b507f Add missing doc aliases on variants 2021-05-23 13:06:57 +02:00
Marijn Suijten
540062b97c Add missing doc aliases to manual code
Using the same script as [1], called with:

    python3 add_doc_alias.py gstreamer*/**/src

[1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
2021-05-19 22:36:18 +02:00
Sebastian Dröge
b02f2acae5 gstreamer: Update for try_from_glib() having become an unsafe function
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/337
2021-05-19 11:47:11 +03:00
Sebastian Dröge
11a85449e7 gstreamer/uri_handler: Only assign to GError**s if they're not NULL 2021-05-15 10:41:34 +03:00
Guillaume Gomez
6fdf35846e Update repository URL for gtk-rs "core" crates 2021-05-12 21:21:18 +02:00
François Laignel
65fd79f973 ParamSpec: conform to glib naming for constructors 2021-05-06 21:40:19 +02:00
Marijn Suijten
e8c90c9186 gstreamer/lib: Prevent fn deinit() docs from being stripped 2021-05-05 12:23:40 +02:00
Marijn Suijten
d50d7b4a95 Update gir and regenerate
This version adds a `--strip-docs` flag to `generator.py`, used in
conjunction with `--strip-docs --embed-docs` to clean documentation
first before re-embedding it (otherwise the same text would show up
multiple times).  It is also used in the CI to check that no
documentation disappears on stripping, ie. all documentation is properly
annotated with `// rustdoc-stripper-ignore-next`.
2021-05-05 12:23:40 +02:00
Sebastian Dröge
aa3cc48756 Fix new 1.52 clippy warnings 2021-05-05 12:02:03 +03:00
François Laignel
5505715cc4 Manual code updates for *Return types 2021-05-04 11:33:51 +00:00
François Laignel
2364361f6b regen: use TryFromGlib for *Return types 2021-05-04 11:33:51 +00:00
François Laignel
4b2e001f8e Gir.toml: use TryFromGlib for *Return types 2021-05-04 11:33:51 +00:00
François Laignel
49583597ed manual code: fix-getters-def doc aliases 2021-05-03 20:46:57 +02:00
François Laignel
01b6d342a4 regen: prop alias + connect_*_notify signal + add fn doc alias 2021-05-03 20:46:56 +02:00
François Laignel
7b0a3487c8 gstreamer/ControlSource: fix explicit getter rename 2021-05-03 20:45:26 +02:00
Marijn Suijten
1eb0c483fe gstreamer: Fix some clippy::use_self warnings 2021-04-30 10:58:36 +02:00
Marijn Suijten
980304ce36 Replace T::type_data with Self::type_data for clippy::use_self 2021-04-30 10:02:55 +02:00