mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 19:41:09 +00:00
Add GLDisplayWayland in gstreamer-gl-sys
This commit is contained in:
parent
0687fdc2a8
commit
2f49b935df
6 changed files with 153 additions and 6 deletions
|
@ -58,3 +58,16 @@ cfg_condition = "feature = \"x11\""
|
||||||
name = "GstGL.GLDisplayX11Class"
|
name = "GstGL.GLDisplayX11Class"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
cfg_condition = "feature = \"x11\""
|
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\""
|
||||||
|
|
|
@ -2656,8 +2656,73 @@ through the provided API</doc>
|
||||||
<doc xml:space="preserve">any display type</doc>
|
<doc xml:space="preserve">any display type</doc>
|
||||||
</member>
|
</member>
|
||||||
</bitfield>
|
</bitfield>
|
||||||
|
<class name="GLDisplayWayland" c:symbol-prefix="gl_display_wayland" c:type="GstGLDisplayWayland" parent="GLDisplay" glib:type-name="GstGLDisplayWayland" glib:get-type="gst_gl_display_wayland_get_type" glib:type-struct="GLDisplayWaylandClass">
|
||||||
|
<doc xml:space="preserve">the contents of a #GstGLDisplayWayland are private and should only be accessed
|
||||||
|
through the provided API</doc>
|
||||||
|
<constructor name="new" c:identifier="gst_gl_display_wayland_new">
|
||||||
|
<doc xml:space="preserve">Create a new #GstGLDisplayWayland from the wayland display name. See wl_display_connect()
|
||||||
|
for details on what is a valid name.</doc>
|
||||||
|
<return-value transfer-ownership="full">
|
||||||
|
<doc xml:space="preserve">a new #GstGLDisplayWayland or %NULL</doc>
|
||||||
|
<type name="GLDisplayWayland" c:type="GstGLDisplayWayland*"/>
|
||||||
|
</return-value>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
|
||||||
|
<doc xml:space="preserve">a display name</doc>
|
||||||
|
<type name="utf8" c:type="const gchar*"/>
|
||||||
|
</parameter>
|
||||||
|
</parameters>
|
||||||
|
</constructor>
|
||||||
|
<constructor name="new_with_display" c:identifier="gst_gl_display_wayland_new_with_display">
|
||||||
|
<doc xml:space="preserve">Creates a new display connection from a wl_display Display.</doc>
|
||||||
|
<return-value transfer-ownership="full">
|
||||||
|
<doc xml:space="preserve">a new #GstGLDisplayWayland</doc>
|
||||||
|
<type name="GLDisplayWayland" c:type="GstGLDisplayWayland*"/>
|
||||||
|
</return-value>
|
||||||
|
<parameters>
|
||||||
|
<parameter name="display" transfer-ownership="none" nullable="1" allow-none="1">
|
||||||
|
<doc xml:space="preserve">an existing, wayland display</doc>
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</parameter>
|
||||||
|
</parameters>
|
||||||
|
</constructor>
|
||||||
|
<field name="parent">
|
||||||
|
<type name="GLDisplay" c:type="GstGLDisplay"/>
|
||||||
|
</field>
|
||||||
|
<field name="display">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</field>
|
||||||
|
<field name="registry">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</field>
|
||||||
|
<field name="compositor">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</field>
|
||||||
|
<field name="subcompositor">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</field>
|
||||||
|
<field name="shell">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</field>
|
||||||
|
<field name="foreign_display" readable="0" private="1">
|
||||||
|
<type name="gboolean" c:type="gboolean"/>
|
||||||
|
</field>
|
||||||
|
<field name="_padding" readable="0" private="1">
|
||||||
|
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</array>
|
||||||
|
</field>
|
||||||
|
</class>
|
||||||
|
<record name="GLDisplayWaylandClass" c:type="GstGLDisplayWaylandClass" glib:is-gtype-struct-for="GLDisplayWayland">
|
||||||
|
<field name="object_class">
|
||||||
|
<type name="GLDisplayClass" c:type="GstGLDisplayClass"/>
|
||||||
|
</field>
|
||||||
|
<field name="_padding">
|
||||||
|
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||||
|
<type name="gpointer" c:type="gpointer"/>
|
||||||
|
</array>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
<class name="GLDisplayX11" c:symbol-prefix="gl_display_x11" c:type="GstGLDisplayX11" parent="GLDisplay" glib:type-name="GstGLDisplayX11" glib:get-type="gst_gl_display_x11_get_type" glib:type-struct="GLDisplayX11Class">
|
<class name="GLDisplayX11" c:symbol-prefix="gl_display_x11" c:type="GstGLDisplayX11" parent="GLDisplay" glib:type-name="GstGLDisplayX11" glib:get-type="gst_gl_display_x11_get_type" glib:type-struct="GLDisplayX11Class">
|
||||||
<doc xml:space="preserve">the contents of a #GstGLDisplayX11 are private and should only be accessed
|
<doc xml:space="preserve">the contents of a #GstGLDisplayX11 are private and should only be accessed
|
||||||
through the provided API</doc>
|
through the provided API</doc>
|
||||||
|
|
|
@ -27,11 +27,19 @@ xmlstarlet ed --pf --inplace \
|
||||||
--value GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS \
|
--value GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS \
|
||||||
GstGL-1.0.gir
|
GstGL-1.0.gir
|
||||||
|
|
||||||
# Remove GstDisplayWayland
|
# replace wayland structures to gpointers
|
||||||
xmlstarlet ed --pf --inplace \
|
xmlstarlet ed --pf --inplace \
|
||||||
--delete '//_:class[@name="GLDisplayWayland"]' \
|
--update '//*[@c:type="wl_display*"]/@c:type' \
|
||||||
--delete '//_:record[@name="GLDisplayWaylandClass"]' \
|
--value gpointer \
|
||||||
GstGL-1.0.gir
|
--update '//*[@c:type="wl_registry*"]/@c:type' \
|
||||||
|
--value gpointer \
|
||||||
|
--update '//*[@c:type="wl_compositor*"]/@c:type' \
|
||||||
|
--value gpointer \
|
||||||
|
--update '//*[@c:type="wl_subcompositor*"]/@c:type' \
|
||||||
|
--value gpointer \
|
||||||
|
--update '//*[@c:type="wl_shell*"]/@c:type' \
|
||||||
|
--value gpointer \
|
||||||
|
GstGL-1.0.gir
|
||||||
|
|
||||||
# Change X11's Display* and xcb_connection_t* pointers to gpointer
|
# Change X11's Display* and xcb_connection_t* pointers to gpointer
|
||||||
xmlstarlet ed --pf --inplace \
|
xmlstarlet ed --pf --inplace \
|
||||||
|
|
|
@ -27,6 +27,7 @@ tempdir = "0.3"
|
||||||
dox = []
|
dox = []
|
||||||
egl = []
|
egl = []
|
||||||
x11 = []
|
x11 = []
|
||||||
|
wayland = []
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "gstreamer_gl_sys"
|
name = "gstreamer_gl_sys"
|
||||||
|
|
|
@ -549,6 +549,24 @@ impl ::std::fmt::Debug for GstGLDisplayPrivate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
#[repr(C)]
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
|
pub struct GstGLDisplayWaylandClass {
|
||||||
|
pub object_class: GstGLDisplayClass,
|
||||||
|
pub _padding: [gpointer; 4],
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
impl ::std::fmt::Debug for GstGLDisplayWaylandClass {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstGLDisplayWaylandClass @ {:?}", self as *const _))
|
||||||
|
.field("object_class", &self.object_class)
|
||||||
|
.field("_padding", &self._padding)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "x11", feature = "dox"))]
|
#[cfg(any(feature = "x11", feature = "dox"))]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
|
@ -1172,6 +1190,34 @@ impl ::std::fmt::Debug for GstGLDisplayEGL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
#[repr(C)]
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
|
pub struct GstGLDisplayWayland {
|
||||||
|
pub parent: GstGLDisplay,
|
||||||
|
pub display: gpointer,
|
||||||
|
pub registry: gpointer,
|
||||||
|
pub compositor: gpointer,
|
||||||
|
pub subcompositor: gpointer,
|
||||||
|
pub shell: gpointer,
|
||||||
|
pub foreign_display: gboolean,
|
||||||
|
pub _padding: [gpointer; 4],
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
impl ::std::fmt::Debug for GstGLDisplayWayland {
|
||||||
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
|
f.debug_struct(&format!("GstGLDisplayWayland @ {:?}", self as *const _))
|
||||||
|
.field("parent", &self.parent)
|
||||||
|
.field("display", &self.display)
|
||||||
|
.field("registry", &self.registry)
|
||||||
|
.field("compositor", &self.compositor)
|
||||||
|
.field("subcompositor", &self.subcompositor)
|
||||||
|
.field("shell", &self.shell)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "x11", feature = "dox"))]
|
#[cfg(any(feature = "x11", feature = "dox"))]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
|
@ -1667,6 +1713,16 @@ extern "C" {
|
||||||
#[cfg(any(feature = "egl", feature = "dox"))]
|
#[cfg(any(feature = "egl", feature = "dox"))]
|
||||||
pub fn gst_gl_display_egl_get_from_native(type_: GstGLDisplayType, display: uintptr_t) -> gpointer;
|
pub fn gst_gl_display_egl_get_from_native(type_: GstGLDisplayType, display: uintptr_t) -> gpointer;
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// GstGLDisplayWayland
|
||||||
|
//=========================================================================
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
pub fn gst_gl_display_wayland_get_type() -> GType;
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
pub fn gst_gl_display_wayland_new(name: *const c_char) -> *mut GstGLDisplayWayland;
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
pub fn gst_gl_display_wayland_new_with_display(display: gpointer) -> *mut GstGLDisplayWayland;
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// GstGLDisplayX11
|
// GstGLDisplayX11
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
|
@ -266,6 +266,10 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
#[cfg(any(feature = "egl", feature = "dox"))]
|
#[cfg(any(feature = "egl", feature = "dox"))]
|
||||||
("GstGLDisplayEGLClass", Layout {size: size_of::<GstGLDisplayEGLClass>(), alignment: align_of::<GstGLDisplayEGLClass>()}),
|
("GstGLDisplayEGLClass", Layout {size: size_of::<GstGLDisplayEGLClass>(), alignment: align_of::<GstGLDisplayEGLClass>()}),
|
||||||
("GstGLDisplayType", Layout {size: size_of::<GstGLDisplayType>(), alignment: align_of::<GstGLDisplayType>()}),
|
("GstGLDisplayType", Layout {size: size_of::<GstGLDisplayType>(), alignment: align_of::<GstGLDisplayType>()}),
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
("GstGLDisplayWayland", Layout {size: size_of::<GstGLDisplayWayland>(), alignment: align_of::<GstGLDisplayWayland>()}),
|
||||||
|
#[cfg(any(feature = "wayland", feature = "dox"))]
|
||||||
|
("GstGLDisplayWaylandClass", Layout {size: size_of::<GstGLDisplayWaylandClass>(), alignment: align_of::<GstGLDisplayWaylandClass>()}),
|
||||||
#[cfg(any(feature = "x11", feature = "dox"))]
|
#[cfg(any(feature = "x11", feature = "dox"))]
|
||||||
("GstGLDisplayX11", Layout {size: size_of::<GstGLDisplayX11>(), alignment: align_of::<GstGLDisplayX11>()}),
|
("GstGLDisplayX11", Layout {size: size_of::<GstGLDisplayX11>(), alignment: align_of::<GstGLDisplayX11>()}),
|
||||||
#[cfg(any(feature = "x11", feature = "dox"))]
|
#[cfg(any(feature = "x11", feature = "dox"))]
|
||||||
|
|
Loading…
Reference in a new issue