gst-plugins-rs/video/gtk4
Ivan Molodetskikh 4da3bbf1d3 gtk4: Premultiply alpha in GL textures
GTK expects GL textures to have premultiplied alpha. The ones we get
from GStreamer don't, leading to incorrect rendering of semitransparent
frames.

GTK 4.12 gained an API to set a different GL texture format, but it
won't help for older GTK versions. Plus, at the time of writing, it
causes a very slow download/upload path in GTK.

So, use a GTK GL shader node to premultiply the alpha without leaving
the GPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1328>
2023-09-20 13:52:34 +03:00
..
examples gtk4: Add python example 2023-07-05 14:41:21 +03:00
src gtk4: Premultiply alpha in GL textures 2023-09-20 13:52:34 +03:00
build.rs Add a GTK4 paintable sink plugin 2021-10-13 12:28:51 +03:00
Cargo.toml Update version to 0.9.11 2023-07-20 15:15:07 +03:00
LICENSE-MPL-2.0 git: replace LICENSE file symlinks with copies 2023-04-05 18:17:16 +03:00
README.md video/gtk4: Implement support for GLTextures when possible. 2022-12-12 13:34:22 +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.