Commit graph

2608 commits

Author SHA1 Message Date
Marijn Suijten
8ab8f00005 examples/glupload: Allow EGL and Wayland features to coexist
If EGL and Wayland were both set the Wayland bit of code would never be
build-tested nor used.  Now if both are enabled try to acquire a
GLDisplay through both handles before bailing.  The methods can still be
tested in isolation by not enabling one or the other feature.
2021-04-10 20:20:49 +02:00
Marijn Suijten
28cfa91b40 examples/glupload: Close the window when Escape is pressed 2021-04-10 16:55:27 +02:00
Marijn Suijten
a310cf8842 examples: Remove features from [[bin]]
Solves the following warning:

    gstreamer-rs/examples/Cargo.toml: unused manifest key: bin.31.features

Enabling features when a single bin is built is not supported, and users
would have to manually select desired features anyway: -wayland cannot
be used in conjunction with -egl thanks to the cfg_if.
2021-04-10 16:51:50 +02:00
Marijn Suijten
d8cd01027e examples: Fix some typos 2021-04-10 13:42:04 +02:00
Lucas McGartland
1a7972246c gstreamer-editing-services: Add bindings for (Base)TransitionClip and OperationClip 2021-04-10 09:25:17 +03:00
Sebastian Dröge
8da8e31d63 examples: Update for gio::Application::run() API simplification 2021-04-08 10:36:05 +03:00
Sebastian Dröge
8d983066f5 gstreamer: Store ffi::GstCaps inside gst::Caps and equivalent for other miniobjects
Simplifies code and prepares for the next changes.
2021-04-03 17:43:50 +03:00
Sebastian Dröge
21ff418b0f gstreamer: Store ffi::GstCapsFeatures inside gst::CapsFeatures
Simplifies code and prepares for the next changes.
2021-04-03 17:35:22 +03:00
Sebastian Dröge
b6f6758454 gstreamer: Store ffi::GstStructure inside gst::Structure
Simplifies code and prepares for the next changes.
2021-04-03 17:35:10 +03:00
Sebastian Dröge
cd3d114d6c audio: Update to array-init 2.0 2021-04-02 12:07:27 +03:00
Marijn Suijten
6ec0e3ac4b Update gir and regenerate with extended gir-dirs comments
Gir now prints all directories and their hashes in the version file and
comments; useful now that gstreamer-rs is being generated from both
gir-files/ and gst-gir-files/ submodules.
2021-04-01 15:58:41 +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
Marijn Suijten
7328d7ada5 generator: Accept multiple girs-dirs and pass gst-gir-files to gir 2021-04-01 15:53:23 +02:00
Marijn Suijten
50a537b986 gst-gir-files: Add GStreamer-specific gir files back as submodule
Submodule from:
https://gitlab.freedesktop.org/gstreamer/gir-files-rs
2021-04-01 15:53:23 +02:00
Marijn Suijten
3df876a998 gir-files: Add back as submodule from gtk-rs
Instead of copying gir files over every once in a while, with
split-directory support (https://github.com/gtk-rs/gir/pull/1041) we can
now use the submodule directly from https://github.com/gtk-rs/gir-files.
2021-04-01 15:53:23 +02:00
Marijn Suijten
da0636a63c gir-files: Remove in favour of split ./gir-files and ./gst-gir-files
gir-files will be readded as a proper submodule from
https://github.com/gtk-rs/gir-files, and gst-gir-files as a submodule
from https://gitlab.freedesktop.org/gstreamer/gir-files-rs.
2021-04-01 15:53:23 +02:00
Marijn Suijten
a38561fbcd Update gir and regenerate with redundant #[cfg]/#[cfg_attr] removed
Also ignores `clippy::upper_case_acronyms` introduced with 1.51 which
can't be adhered to in bindings.
2021-04-01 15:53:18 +02:00
Bilal Elmoussaoui
b83b8c8675 ci: link to external dependencies instead of building them for docs 2021-03-31 09:06:35 +02:00
Sebastian Dröge
d69f8793d5 ci: Update minimum supported Rust version to 1.51
Various dependencies require that now for const generics.
2021-03-27 14:23:25 +02:00
Sebastian Dröge
762450bb53 check: Add Harness::pull_until_eos() 2021-03-25 20:12:51 +02:00
Sebastian Dröge
d66394f7c4 ci: Allow clippy::upper_case_acronyms
That would otherwise change a lot of API in confusing ways, e.g. RTSP -> Rtsp
and would be inconsistent with the naming in C.
2021-03-25 17:43:54 +02:00
Sebastian Dröge
c51a645ee2 ci: Update to Rust 1.51 2021-03-25 17:43:10 +02:00
Sebastian Dröge
e7e629e6e6 ci: Update to meson 0.57.1 2021-03-25 17:43:04 +02:00
Marijn Suijten
89ba883ea8 audio/video: Do not link v1_20 ffi functions when building docs
The sys crates have not been generated with 1.20 introspected gir files
yet, and break the documentation that is already compiling with the
v1_20 feature. Function body contents don't truly matter for the
documentation build anyway.
2021-03-24 13:43:45 +01:00
Marijn Suijten
534dcf3110 gstreamer-controller: Update from rustdoc-stripper to lgpl_docs
This crate was added right around the same date the conversion to the
`lgpl_docs` crate took place in 801998c7 ("Generate documentation from
the docs crate directly") and hence likely missed out.

Fixes: 4120ded4 ("Add gstreamer-controller")
2021-03-24 13:43:45 +01:00
Marijn Suijten
75ba9eaf24 docs: Generate docs for gstreamer-controller
Docs generated using:

    ./gir/target/release/gir -m doc -c gstreamer-controller/Gir.toml -d gir-files -o unused

Followed by `mv gstreamer-controller/docs/gstreamer-controller docs/`.
The `-o` option is required but ignored in favour of a toml
`doc_target_path` config option.
2021-03-24 13:43:45 +01:00
Marijn Suijten
a0358ada40 ci: Always build-test the documentation (dox feature)
Quite a few issues slipped in over time because the docs are only
extended with `embed-lgpl-docs` and provided as artifact as part of a
manual action, that isn't clicked often.
2021-03-24 13:43:44 +01:00
Sebastian Dröge
fb01529f9f gstreamer-net: Update for removed Option wrapping in gio 2021-03-18 18:25:25 +02:00
Marijn Suijten
f4553e3d01 player,webrtc: Remove flags file that is not generated anymore
Doing a clean run with all `auto` folders removed results in these files
not being regenerated; they are empty and unreferenced from lib.rs.
2021-03-15 21:09:59 +01:00
Marijn Suijten
f4ad451956 sdp: Use .ok() instead of manual match on Ok and Err
Using `.ok()` is more concise when loosing error context in favour of a
simple `None` value.

Automatic replacement SSR pattern in rust-analyzer:

    {let $a = $b;match $c {Ok($d) => Some($e), Err(_) => None }} ==>> {$b.ok()}

Note that rust-analyzer does not support:
- duplicate labels (ie. $c should be equal to $a, and $e equal to $d);
- statement lists yet, hence both sides are wrapped in braces.

But it performs the desired operation well enough here.
2021-03-15 21:07:17 +01:00
Sebastian Dröge
15505cc5b8 Re-export interface ImplExt traits from the preludes 2021-03-14 14:06:30 +02:00
Sebastian Dröge
27385104d8 Update for glib interface API changes 2021-03-14 10:45:52 +02:00
Sebastian Dröge
5cf6cd2e1d webrtc: Expose the v1_14_1 feature that enables the WebRTCFECType
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/317
2021-03-13 11:43:19 +02:00
Sebastian Dröge
4804da1273 gstreamer-base/basesrc: Use the correct pointer for retrieving the allocated buffer in BaseSrc::alloc 2021-03-09 18:06:06 +02:00
Sebastian Dröge
ea239c587e Store panic information not in a custom instance struct but in the instance data provided by the subclassing infrastructure
This scales better as there will only be only such data instead of two
or more when having deeper class hierarchies with multiple Rust
elements, and also makes it unnecessary to use a special instance struct
so the default works well.
2021-03-09 16:36:35 +02:00
Sebastian Dröge
6fa48890bc Update for the subclassing glib bindings API changes 2021-03-09 16:04:32 +02:00
Sebastian Dröge
bcec97373f gstreamer: Update to num-rational 0.4 2021-03-09 11:17:53 +02:00
Sebastian Dröge
0b61713398 gstreamer/uri_handler: Update for glib bindings API changes 2021-03-09 11:17:15 +02:00
Sebastian Dröge
a311591310 Regenerate with latest gir 2021-03-08 12:25:37 +02:00
Sebastian Dröge
f059d75d48 Update gir 2021-03-08 12:23:27 +02:00
Sebastian Dröge
0803dd411e Update for glib subclass API cleanup 2021-03-08 12:18:24 +02:00
Sebastian Dröge
b8c20c07ce Update for new #[glib::object_subclass] attribute macro 2021-03-07 13:08:06 +02:00
Marijn Suijten
c58f2b09d2 gl/sys/gir: New buffer/memory get_type functions are only in 1.20
G-IR cannot read or represent `Since:` annotations on get_type()-like
functions, despite these being available in the source. This adds the
type requirements manually following its implementation in [1],
considering it will not be backported to 1.18.x [2]. If `get_type` is
used in manual bindings after 1.20 releases this version requirement is
easily caught.

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/999
[2]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1010
2021-03-02 10:20:11 +01:00
Sebastian Dröge
932b8f813d gstreamer/pad: Add support for removing pad probes from the probe callback
While this allows to remove the pad probe multiple times, which would
cause a g_warning(), this is not actually making the situation worse
than before while making some code patterns easier to implement:

  - Probes could already be removed twice by return
    gst::PadProbeReturn::Remove and then calling pad.remove_probe()
  - Probes could be removed from a different pad than where they were
    added

As such let's go with the simple solution here for now and allow giving
owned access to the probe id from the probe callback.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/286
2021-02-28 19:08:59 +02:00
Sebastian Dröge
8b71f5331a examples/tutorials: Update for new Bus::connect_message() API that takes signal details 2021-02-28 19:08:50 +02:00
Sebastian Dröge
5822785191 Regenerate with latest gir 2021-02-28 18:30:54 +02:00
Sebastian Dröge
6d6438b179 Update gir 2021-02-28 18:27:43 +02:00
Sebastian Dröge
a316d610eb gstreamer: Update for glib::Type API changes 2021-02-25 12:49:47 +02:00
Sebastian Dröge
cc6a51e73d examples: Improve custom-meta example to pass initialization into the init function via the params parameter 2021-02-24 14:20:45 +00:00
Sebastian Dröge
efb249f7b9 tutorials: Change from set_property_with_value() to set_property_from_value() 2021-02-23 12:11:48 +02:00