24 releases

0.12.3 Mar 21, 2024
0.11.4 Feb 13, 2024
0.11.3 Dec 18, 2023
0.11.2 Nov 11, 2023
0.0.0 Oct 13, 2021

#109 in Video

Download history 568/week @ 2024-01-03 416/week @ 2024-01-10 478/week @ 2024-01-17 558/week @ 2024-01-24 334/week @ 2024-01-31 508/week @ 2024-02-07 877/week @ 2024-02-14 654/week @ 2024-02-21 496/week @ 2024-02-28 662/week @ 2024-03-06 562/week @ 2024-03-13 909/week @ 2024-03-20 698/week @ 2024-03-27 534/week @ 2024-04-03 1007/week @ 2024-04-10 521/week @ 2024-04-17

2,876 downloads per month
Used in 5 crates

MPL-2.0 license

83KB
1.5K SLoC

Gtk 4 Sink & Paintable

GTK 4 provides gtk::Video & gtk::Picture for rendering media such as videos. As the default gtk::Video widget doesn't offer the possibility to use a custom gst::Pipeline. The plugin provides a gst_video::VideoSink along with a gdk::Paintable that's capable of rendering the sink's frames.

The Sink can generate GL Textures if the system is capable of it, but it needs to be compiled with either wayland, x11glx or x11egl cargo features.

Flatpak Integration

To build and include the plugin in a Flatpak manifest, you can add the following snippet to your json manifest:

{
    "sdk-extensions": [
        "org.freedesktop.Sdk.Extension.rust-stable"
    ],
    "build-options": {
        "env": {
            "CARGO_HOME": "/run/build/cargo-c/cargo"
        },
        "append-path": "/usr/lib/sdk/rust-stable/bin",
    },
    "modules": [
        {
            "name": "cargo-c",
            "buildsystem": "simple",
            "build-commands": [
                "cargo install cargo-c --root /app"
            ],
            "build-options": {
                "build-args": [
                    "--share=network"
                ]
            },
            "cleanup": [
                "*"
            ]
        },
        {
            "name": "gst-plugins-rs",
            "buildsystem": "simple",
            "sources": [
                {
                    "type": "git",
                    "url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs",
                    "branch": "0.10"
                }
            ],
            "build-options": {
                "build-args": [
                    "--share=network"
                ]
            },
            "build-commands": [
                "cargo cinstall -p gst-plugin-gtk4 --prefix=/app"
            ]
        }
    ]
}

Dependencies

~21–32MB
~599K SLoC