gst-plugins-rs/video/gtk4/Cargo.toml
Sebastian Dröge 803550111a gtk4: Improve handling of RGBA GL textures in GTK
GTK 4.14 comes with a new GL renderer that does not support GL shader
nodes anymore, so the conversion from non-premultiplied alpha to
premultiplied alpha has to happen differently.

For GTK 4.14 or newer we use the correct format directly when building the
texture, but only if a GLES3+ context is used. In that case the NGL renderer is
used by GTK, which supports non-premultiplied formats correctly and fast.

For GTK 4.10-4.12, or 4.14 and newer if a GLES2 context is used, we use a
self-mask to pre-multiply the alpha.

For GTK before 4.10, we use a GL shader and hope that it works.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1452>
2024-02-08 12:35:26 +02:00

72 lines
2.3 KiB
TOML

[package]
name = "gst-plugin-gtk4"
version.workspace = true
authors = ["Bilal Elmoussaoui <bil.elmoussaoui@gmail.com>", "Jordan Petridis <jordan@centricular.com>", "Sebastian Dröge <sebastian@centricular.com>"]
repository.workspace = true
license = "MPL-2.0"
edition.workspace = true
rust-version.workspace = true
description = "GStreamer GTK 4 Sink element and Paintable widget"
[dependencies]
gtk.workspace = true
gdk-wayland = { workspace = true, features = ["v4_4"], optional = true}
gdk-x11 = { workspace = true, features = ["v4_4"], optional = true}
gst = { workspace = true, features = ["v1_16"] }
gst-base.workspace = true
gst-video.workspace = true
gst-gl = { workspace = true, features = ["v1_16"], optional = true }
gst-gl-wayland = { workspace = true, features = ["v1_16"], optional = true }
gst-gl-x11 = { workspace = true, features = ["v1_16"], optional = true }
gst-gl-egl = { workspace = true, features = ["v1_16"], optional = true }
async-channel = "2.0.0"
once_cell.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
gtk = { workspace = true, features = ["v4_6"] }
gst-gl = { workspace = true, features = ["v1_16"] }
[target.'cfg(target_os = "windows")'.dependencies]
gtk = { workspace = true, features = ["v4_6"] }
gst-gl = { workspace = true, features = ["v1_20"] }
gdk-win32 = { workspace = true, features = ["v4_4"]}
windows-sys = { version = "0.52", features = ["Win32_Graphics_OpenGL", "Win32_Foundation", "Win32_Graphics_Gdi"] }
[lib]
name = "gstgtk4"
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
[build-dependencies]
gst-plugin-version-helper.workspace = true
[features]
default = []
static = []
wayland = ["gtk/v4_6", "gdk-wayland", "gst-gl", "gst-gl-wayland"]
x11glx = ["gtk/v4_6", "gdk-x11", "gst-gl", "gst-gl-x11"]
x11egl = ["gtk/v4_6", "gdk-x11", "gst-gl", "gst-gl-egl"]
winegl = ["gdk-win32/egl", "gst-gl-egl"]
capi = []
doc = ["gst/v1_18"]
gtk_v4_10 = ["gtk/v4_10"]
gtk_v4_12 = ["gtk/v4_12", "gtk_v4_10"]
gtk_v4_14 = ["gtk/v4_14", "gtk_v4_12"]
[package.metadata.capi]
min_version = "0.9.21"
[package.metadata.capi.header]
enabled = false
[package.metadata.capi.library]
install_subdir = "gstreamer-1.0"
versioning = false
import_library = false
[package.metadata.capi.pkg_config]
requires_private = "gstreamer-1.0, gstreamer-base-1.0, gstreamer-video-1.0, gtk4, gobject-2.0, glib-2.0, gmodule-2.0"