GStreamer plugins written in Rust. *These plugins can be used by applications written in other programming languages as well of course, they are just like any other GStreamer plugins available on the system.*
Go to file
François Laignel 6163589ac7 ts/executor: replace tokio with smol-like implementation
The threadshare executor was based on a modified version of tokio
which implemented the throttling strategy in the BasicScheduler.
Upstream tokio codebase has significantly diverged from what it
was when the throttling strategy was implemented making it hard
to follow. This means that we can hardly get updates from the
upstream project and when we cherry pick fixes, we can't reflect
the state of the project on our fork's version. As a consequence,
tools such as cargo-deny can't check for RUSTSEC fixes in our fork.

The smol ecosystem makes it quite easy to implement and maintain
a custom async executor. This MR imports the smol parts that
need modifications to comply with the threadshare model and implements
a throttling executor in place of the tokio fork.

Networking tokio specific types are replaced with Async wrappers
in the spirit of [smol-rs/async-io]. Note however that the Async
wrappers needed modifications in order to use the per thread
Reactor model. This means that higher level upstream networking
crates such as [async-net] can not be used with our Async
implementation.

Based on the example benchmark with ts-udpsrc, performances seem on par
with what we achieved using the tokio fork.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/118

Related to https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/604
2021-12-25 11:25:56 +00:00
audio Fix or silence various new 1.57 clippy warnings 2021-11-30 16:31:50 +02:00
ci Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
generic ts/executor: replace tokio with smol-like implementation 2021-12-25 11:25:56 +00:00
net hlssink3: fix segment paths in playlist file 2021-12-09 12:38:35 +00:00
text Fix or silence various new 1.57 clippy warnings 2021-11-30 16:31:50 +02:00
tutorial Update for glib::Enum / glib::Boxed / glib::flags! macro renames 2021-11-22 11:04:26 +02:00
utils uriplaylistbin: add properties reporting the current state of the playlist 2021-12-22 15:26:17 +01:00
version-helper version-helper: Specify chrono's features 2021-11-18 19:06:10 +01:00
video Update for decide/propose_allocation() API changes 2021-12-06 19:11:24 +02:00
.gitignore .gitignore builddir 2021-06-03 09:19:31 +02:00
.gitlab-ci.yml ci: Remove the gstreamer directory if it exists already for the gst-build job 2021-12-20 10:51:41 +02:00
Cargo.toml add uriplaylistbin plugin 2021-11-29 10:55:01 +01:00
cargo_wrapper.py meson: fix out of tree build 2021-11-02 10:18:13 +01:00
deny.toml deny: Update 2021-12-18 10:08:48 +02:00
LICENSE-APACHE Change license from LGPLv2.1+ to Apache2/MIT 2017-02-16 17:52:27 +02:00
LICENSE-LGPLv2 Add gst-plugin-togglerecord 2017-12-05 09:56:58 +02:00
LICENSE-MIT Change license from LGPLv2.1+ to Apache2/MIT 2017-02-16 17:52:27 +02:00
LICENSE-MPL-2.0 Add a GTK4 paintable sink plugin 2021-10-13 12:28:51 +03:00
Makefile Clean up Makefile some more 2019-07-06 10:32:22 +03:00
meson.build add uriplaylistbin plugin 2021-11-29 10:55:01 +01:00
meson_options.txt Add a GTK4 paintable sink plugin 2021-10-13 12:28:51 +03:00
README.md README: newer cargo-c can now take the workspace name 2021-10-19 07:49:22 +00:00
update-version.sh Add update-version script 2020-04-15 20:39:31 +02:00

gst-plugins-rs crates.io pipeline status

Repository containing various GStreamer plugins and elements written in the Rust programming language.

The plugins build upon the GStreamer Rust bindings. Check the README.md of that repository also for details about how to set-up your development environment.

Plugins

You will find the following plugins in this repository:

  • generic

    • file: A Rust implementation of the standard filesrc and filesink elements

    • sodium: Elements to perform encryption and decryption using libsodium.

    • threadshare: Some popular threaded elements reimplemented using common thread-sharing infrastructure.

  • net

    • reqwest: An HTTP source element based on the reqwest library.

    • rusoto: A source and sink plugin to talk to the Amazon S3 object storage system, as well as an element wrapping the AWS Transcriber service using the Rusoto library.

  • audio

    • audiofx: Plugins to apply audio effects to a stream (such as adding echo/reverb, removing noise or normalization).

    • claxon: A FLAC decoder based on the Claxon library.

    • csound: A plugin to implement audio effects using the Csound library.

    • lewton: A Vorbis decoder based on the lewton library.

  • video

    • cdg: A parser and renderer for CD+G karaoke data.

    • closedcaption: Plugins to deal with several closed caption formats (MCC, SCC, EIA-608/CEA-608 and timed text).

    • dav1d: AV1 decoder based on the dav1d library.

    • ffv1: FFV1 decoder based on the ffv1 library.

    • flavors: FLV demuxer based on the flavors library.

    • gif: A GIF encoder based on the gif library.

    • hsv: Elements to work with video data in hue, saturation, value form.

    • png: PNG encoder based on the png library.

    • rav1e: AV1 encoder based on the rav1e library.

    • webp: WebP decoder based on the libwebp-sys-2 library.

  • text

    • json: A plugin to convert a stream of JSON objects to a higher level wrapped NDJSON output.

    • regex: A regular expression text filter plugin.

    • wrap: A plugin to perform text wrapping with hyphenation.

  • utils

    • fallbackswitch: Aggregator element that allows falling back to a different sink pad after a timeout.

    • togglerecord: Element to enable starting and stopping multiple streams together.

Building

gst-plugins-rs relies on cargo-c to generate shared and static C libraries. It can be installed using:

$ cargo install cargo-c

Then you can easily build and test a specific plugin:

$ cargo cbuild -p gst-plugin-cdg
$ GST_PLUGIN_PATH="target/x86_64-unknown-linux-gnu/debug:$GST_PLUGIN_PATH" gst-inspect-1.0 cdgdec

Replace x86_64-unknown-linux-gnu with your system's Rust target triple (rustc -vV).

The plugin can also be installed system-wide:

$ cargo cbuild -p gst-plugin-cdg --prefix=/usr
$ cargo cinstall -p gst-plugin-cdg --prefix=/usr

This will install the plugin to /usr/lib/gstreamer-1.0. You can use --libdir to pass a custom lib directory such as /usr/lib/x86_64-linux-gnu for example.

Note that you can also just use cargo directly to build Rust static libraries and shared C libraries. cargo-c is mostly useful to build static C libraries and generate pkg-config files.

LICENSE

gst-plugins-rs and all crates contained in here that are not listed below are licensed under either of

at your option.

gst-plugin-togglerecord is licensed under the Lesser General Public License (LICENSE-LGPLv2) version 2.1 or (at your option) any later version.

gst-plugin-csound is licensed under the Lesser General Public License (LICENSE-LGPLv2) version 2.1 or (at your option) any later version.

GStreamer itself is licensed under the Lesser General Public License version 2.1 or (at your option) any later version: https://www.gnu.org/licenses/lgpl-2.1.html

Contribution

Any kinds of contributions are welcome as a pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in gst-plugins-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.