gl: Add X11/EGL/Wayland API back based on separate -sys crates

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
This commit is contained in:
Marijn Suijten 2020-11-25 11:49:59 +01:00
parent f66727297a
commit 55badab13d
14 changed files with 342 additions and 72 deletions

View file

@ -9,6 +9,9 @@ members = [
"gstreamer-controller/sys", "gstreamer-controller/sys",
"gstreamer-editing-services/sys", "gstreamer-editing-services/sys",
"gstreamer-gl/sys", "gstreamer-gl/sys",
"gstreamer-gl/egl/sys",
"gstreamer-gl/wayland/sys",
"gstreamer-gl/x11/sys",
"gstreamer-mpegts/sys", "gstreamer-mpegts/sys",
"gstreamer-net/sys", "gstreamer-net/sys",
"gstreamer-pbutils/sys", "gstreamer-pbutils/sys",
@ -28,6 +31,9 @@ members = [
"gstreamer-controller", "gstreamer-controller",
"gstreamer-editing-services", "gstreamer-editing-services",
"gstreamer-gl", "gstreamer-gl",
"gstreamer-gl/egl",
"gstreamer-gl/wayland",
"gstreamer-gl/x11",
"gstreamer-net", "gstreamer-net",
"gstreamer-pbutils", "gstreamer-pbutils",
"gstreamer-player", "gstreamer-player",

View file

@ -31,9 +31,6 @@ gstreamer-rs-lgpl-docs = { path = "../docs", optional = true }
[features] [features]
default = [] default = []
dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "gst-video/dox"] dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-base/dox", "gst-video/dox"]
egl = ["ffi/egl"]
x11 = ["ffi/x11"]
wayland = ["ffi/wayland"]
embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"] embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"] purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-video/v1_16", "ffi/v1_16"] v1_16 = ["gst/v1_16", "gst-base/v1_16", "gst-video/v1_16", "ffi/v1_16"]

View file

@ -186,24 +186,6 @@ status = "generate"
[object.function.return] [object.function.return]
nullable_return_is_error = "Failed to create window" nullable_return_is_error = "Failed to create window"
[[object]]
name = "GstGL.GLDisplayEGL"
status = "generate"
final_type = true
cfg_condition = "feature = \"egl\""
[[object]]
name = "GstGL.GLDisplayX11"
status = "generate"
final_type = true
cfg_condition = "feature = \"x11\""
[[object]]
name = "GstGL.GLDisplayWayland"
status = "generate"
final_type = true
cfg_condition = "feature = \"wayland\""
[[object]] [[object]]
name = "GstGL.GLWindow" name = "GstGL.GLWindow"
status = "generate" status = "generate"

View file

@ -0,0 +1,37 @@
[package]
name = "gstreamer-gl-egl"
version = "0.17.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>",
"Víctor M. Jáquez L. <vjaquez@igalia.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer GLEGL library"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
license = "MIT/Apache-2.0"
readme = "README.md"
homepage = "https://gstreamer.freedesktop.org"
documentation = "https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer_gl/"
keywords = ["gstreamer", "multimedia", "audio", "video", "gnome"]
build = "../build.rs"
edition = "2018"
[dependencies]
libc = "0.2"
ffi = { package = "gst-glegl-sys", path = "sys" }
glib = { git = "https://github.com/gtk-rs/gtk-rs" }
gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] }
gst-gl = { package = "gstreamer-gl", path = "../" }
[build-dependencies]
gstreamer-rs-lgpl-docs = { path = "../../docs", optional = true }
[features]
default = []
dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"]
embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"]
v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"]
[package.metadata.docs.rs]
features = ["embed-lgpl-docs"]

53
gstreamer-gl/egl/Gir.toml Normal file
View file

@ -0,0 +1,53 @@
[options]
girs_dir = "../../gir-files"
library = "GstGLEGL"
version = "1.0"
min_cfg_version = "1.14"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
"GstVideo",
"GstGL",
]
generate = [
"GstGLEGL.GLDisplayEGL",
]
manual = [
"GLib.Error",
"GLib.Thread",
"GObject.Object",
"Gst.Object",
"Gst.FlowReturn",
"Gst.PadDirection",
"GstGL.GLDisplay",
]
[[object]]
name = "Gst.Structure"
status = "manual"
ref_mode = "ref-mut"
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Query"
status = "manual"
ref_mode = "ref"

View file

@ -0,0 +1,22 @@
[options]
girs_dir = "../../../gir-files"
library = "GstGLEGL"
min_cfg_version = "1.14"
version = "1.0"
work_mode = "sys"
extra_versions = [
"1.18",
"1.16",
]
external_libraries = [
"GLib",
]
generate = [
"GstGLEGL.GLDisplayEGL",
]
[external_libraries]
gstreamer-gl = "GstGL"

View file

@ -28,9 +28,6 @@ tempfile = "3"
[features] [features]
dox = [] dox = []
egl = []
x11 = []
wayland = []
v1_16 = [] v1_16 = []
v1_18 = ["v1_16"] v1_18 = ["v1_16"]

View file

@ -11,7 +11,6 @@ extra_versions = [
] ]
ignore = [ ignore = [
"GstGL.GL_DISPLAY_EGL_NAME",
"GstGL.GL_COLOR_CONVERT_VIDEO_CAPS", "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS",
"GstGL.GL_COLOR_CONVERT_FORMATS", "GstGL.GL_COLOR_CONVERT_FORMATS",
"GstGL.GL_MEMORY_VIDEO_FORMATS_STR", "GstGL.GL_MEMORY_VIDEO_FORMATS_STR",
@ -27,53 +26,6 @@ gstreamer="Gst"
gstreamer-base="GstBase" gstreamer-base="GstBase"
gstreamer-video="GstVideo" gstreamer-video="GstVideo"
[[object]]
name = "GstGL.GLDisplayEGL"
status = "generate"
cfg_condition = "feature = \"egl\""
[[object.function]]
pattern = ".*"
cfg_condition = "feature = \"egl\""
[[object]]
name = "GstGL.GLDisplayEGLClass"
status = "generate"
cfg_condition = "feature = \"egl\""
#[[object]]
#name = "GstGL.GL_DISPLAY_EGL_NAME"
#status = "manual"
#cfg_condition = "feature = \"egl\""
# [[object.constant]]
# pattern = ".*"
# cfg_condition = "feature = \"egl\""
#[[object]] #[[object]]
#name = "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS" #name = "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS"
#status = "manual" #status = "manual"
[[object]]
name = "GstGL.GLDisplayX11"
status = "generate"
cfg_condition = "feature = \"x11\""
[[object.function]]
pattern = ".*"
cfg_condition = "feature = \"x11\""
[[object]]
name = "GstGL.GLDisplayX11Class"
status = "generate"
cfg_condition = "feature = \"x11\""
[[object]]
name = "GstGL.GLDisplayWayland"
status = "generate"
cfg_condition = "feature = \"wayland\""
[[object.function]]
pattern = ".*"
cfg_condition = "feature = \"wayland\""
[[object]]
name = "GstGL.GLDisplayWaylandClass"
status = "generate"
cfg_condition = "feature = \"wayland\""

View file

@ -0,0 +1,37 @@
[package]
name = "gstreamer-gl-wayland"
version = "0.17.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>",
"Víctor M. Jáquez L. <vjaquez@igalia.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer GL Wayland library"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
license = "MIT/Apache-2.0"
readme = "README.md"
homepage = "https://gstreamer.freedesktop.org"
documentation = "https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer_gl/"
keywords = ["gstreamer", "multimedia", "audio", "video", "gnome"]
build = "../build.rs"
edition = "2018"
[dependencies]
libc = "0.2"
ffi = { package = "gst-gl-wayland-sys", path = "sys" }
glib = { git = "https://github.com/gtk-rs/gtk-rs" }
gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] }
gst-gl = { package = "gstreamer-gl", path = "../" }
[build-dependencies]
gstreamer-rs-lgpl-docs = { path = "../../docs", optional = true }
[features]
default = []
dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"]
embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"]
v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"]
[package.metadata.docs.rs]
features = ["embed-lgpl-docs"]

View file

@ -0,0 +1,53 @@
[options]
girs_dir = "../../gir-files"
library = "GstGLWayland"
version = "1.0"
min_cfg_version = "1.14"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
"GstVideo",
"GstGL",
]
generate = [
"GstGLWayland.GLDisplayWayland",
]
manual = [
"GLib.Error",
"GLib.Thread",
"GObject.Object",
"Gst.Object",
"Gst.FlowReturn",
"Gst.PadDirection",
"GstGL.GLDisplay",
]
[[object]]
name = "Gst.Structure"
status = "manual"
ref_mode = "ref-mut"
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Query"
status = "manual"
ref_mode = "ref"

View file

@ -0,0 +1,22 @@
[options]
girs_dir = "../../../gir-files"
library = "GstGLWayland"
min_cfg_version = "1.14"
version = "1.0"
work_mode = "sys"
extra_versions = [
"1.18",
"1.16",
]
external_libraries = [
"GLib",
]
generate = [
"GstGLWayland.GLDisplayWayland",
]
[external_libraries]
gstreamer-gl = "GstGL"

View file

@ -0,0 +1,37 @@
[package]
name = "gstreamer-gl-x11"
version = "0.17.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>",
"Víctor M. Jáquez L. <vjaquez@igalia.com>"]
categories = ["api-bindings", "multimedia"]
description = "Rust bindings for GStreamer GL X11 library"
repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
license = "MIT/Apache-2.0"
readme = "README.md"
homepage = "https://gstreamer.freedesktop.org"
documentation = "https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer_gl/"
keywords = ["gstreamer", "multimedia", "audio", "video", "gnome"]
build = "../build.rs"
edition = "2018"
[dependencies]
libc = "0.2"
ffi = { package = "gst-glx11-sys", path = "sys" }
glib = { git = "https://github.com/gtk-rs/gtk-rs" }
gst = { package = "gstreamer", path = "../../gstreamer", features = ["v1_14"] }
gst-gl = { package = "gstreamer-gl", path = "../" }
[build-dependencies]
gstreamer-rs-lgpl-docs = { path = "../../docs", optional = true }
[features]
default = []
dox = ["v1_18", "ffi/dox", "glib/dox", "gst/dox", "gst-gl/dox"]
embed-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
purge-lgpl-docs = ["gstreamer-rs-lgpl-docs"]
v1_16 = ["gst/v1_16", "gst-gl/v1_16", "ffi/v1_16"]
v1_18 = ["gst/v1_18", "gst-gl/v1_18", "ffi/v1_18", "v1_16"]
[package.metadata.docs.rs]
features = ["embed-lgpl-docs"]

53
gstreamer-gl/x11/Gir.toml Normal file
View file

@ -0,0 +1,53 @@
[options]
girs_dir = "../../gir-files"
library = "GstGLX11"
version = "1.0"
min_cfg_version = "1.14"
work_mode = "normal"
concurrency = "send+sync"
generate_safety_asserts = true
single_version_file = true
generate_display_trait = false
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
"GstVideo",
"GstGL",
]
generate = [
"GstGLX11.GLDisplayX11",
]
manual = [
"GLib.Error",
"GLib.Thread",
"GObject.Object",
"Gst.Object",
"Gst.FlowReturn",
"Gst.PadDirection",
"GstGL.GLDisplay",
]
[[object]]
name = "Gst.Structure"
status = "manual"
ref_mode = "ref-mut"
[[object]]
name = "Gst.Buffer"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.Query"
status = "manual"
ref_mode = "ref"

View file

@ -0,0 +1,22 @@
[options]
girs_dir = "../../../gir-files"
library = "GstGLX11"
min_cfg_version = "1.14"
version = "1.0"
work_mode = "sys"
extra_versions = [
"1.18",
"1.16",
]
external_libraries = [
"GLib",
]
generate = [
"GstGLX11.GLDisplayX11",
]
[external_libraries]
gstreamer-gl = "GstGL"