gst-plugins-rs/video/gtk4
Jan Beich 8d6751c88d gtk4: unbreak wayland, x11egl, x11glx features on non-Linux
As the features are non-default leave the responsibility to filter by
platform to consumers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1191>
2023-04-22 12:58:29 +00:00
..
examples Make sure to keep around and drop bus watches after usage in all the examples 2023-04-14 12:46:43 +03:00
src gtk4: unbreak wayland, x11egl, x11glx features on non-Linux 2023-04-22 12:58:29 +00:00
build.rs Add a GTK4 paintable sink plugin 2021-10-13 12:28:51 +03:00
Cargo.toml Update minimum supported Rust version to 1.66 2023-02-20 11:09:01 +02:00
LICENSE-MPL-2.0 git: replace LICENSE file symlinks with copies 2023-04-04 14:26:37 +01:00
README.md video/gtk4: Add a flatpak snippet example in the README 2023-02-22 22:15:40 +02:00

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"
            ]
        }
    ]
}