mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
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>
This commit is contained in:
parent
8e4fd2c167
commit
8d6751c88d
2 changed files with 17 additions and 19 deletions
18
meson.build
18
meson.build
|
@ -252,17 +252,15 @@ if get_option('gtk4').allowed()
|
||||||
gtk4_features = []
|
gtk4_features = []
|
||||||
gl_winsys = gst_gl_dep.get_variable('gl_winsys').split()
|
gl_winsys = gst_gl_dep.get_variable('gl_winsys').split()
|
||||||
gl_platforms = gst_gl_dep.get_variable('gl_platforms').split()
|
gl_platforms = gst_gl_dep.get_variable('gl_platforms').split()
|
||||||
if host_system == 'linux'
|
if 'wayland' in gl_winsys
|
||||||
if 'wayland' in gl_winsys
|
gtk4_features += 'wayland'
|
||||||
gtk4_features += 'wayland'
|
endif
|
||||||
|
if 'x11' in gl_winsys
|
||||||
|
if 'egl' in gl_platforms
|
||||||
|
gtk4_features += 'x11egl'
|
||||||
endif
|
endif
|
||||||
if 'x11' in gl_winsys
|
if 'glx' in gl_platforms
|
||||||
if 'egl' in gl_platforms
|
gtk4_features += 'x11glx'
|
||||||
gtk4_features += 'x11egl'
|
|
||||||
endif
|
|
||||||
if 'glx' in gl_platforms
|
|
||||||
gtk4_features += 'x11glx'
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
plugins += {'gtk4': {
|
plugins += {'gtk4': {
|
||||||
|
|
|
@ -595,11 +595,11 @@ impl PaintableSink {
|
||||||
};
|
};
|
||||||
|
|
||||||
match gdk_context.type_().name() {
|
match gdk_context.type_().name() {
|
||||||
#[cfg(all(target_os = "linux", feature = "x11egl"))]
|
#[cfg(feature = "x11egl")]
|
||||||
"GdkX11GLContextEGL" => (),
|
"GdkX11GLContextEGL" => (),
|
||||||
#[cfg(all(target_os = "linux", feature = "x11glx"))]
|
#[cfg(feature = "x11glx")]
|
||||||
"GdkX11GLContextGLX" => (),
|
"GdkX11GLContextGLX" => (),
|
||||||
#[cfg(all(target_os = "linux", feature = "wayland"))]
|
#[cfg(feature = "wayland")]
|
||||||
"GdkWaylandGLContext" => (),
|
"GdkWaylandGLContext" => (),
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
"GdkMacosGLContext" => (),
|
"GdkMacosGLContext" => (),
|
||||||
|
@ -621,11 +621,11 @@ impl PaintableSink {
|
||||||
gdk_context.make_current();
|
gdk_context.make_current();
|
||||||
|
|
||||||
let res = match gdk_context.type_().name() {
|
let res = match gdk_context.type_().name() {
|
||||||
#[cfg(all(target_os = "linux", feature = "x11egl"))]
|
#[cfg(feature = "x11egl")]
|
||||||
"GdkX11GLContextEGL" => self.initialize_x11egl(gdk_display),
|
"GdkX11GLContextEGL" => self.initialize_x11egl(gdk_display),
|
||||||
#[cfg(all(target_os = "linux", feature = "x11glx"))]
|
#[cfg(feature = "x11glx")]
|
||||||
"GdkX11GLContextGLX" => self.initialize_x11glx(gdk_display),
|
"GdkX11GLContextGLX" => self.initialize_x11glx(gdk_display),
|
||||||
#[cfg(all(target_os = "linux", feature = "wayland"))]
|
#[cfg(feature = "wayland")]
|
||||||
"GdkWaylandGLContext" => self.initialize_waylandegl(gdk_display),
|
"GdkWaylandGLContext" => self.initialize_waylandegl(gdk_display),
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
"GdkMacosGLContext" => self.initialize_macosgl(gdk_display),
|
"GdkMacosGLContext" => self.initialize_macosgl(gdk_display),
|
||||||
|
@ -675,7 +675,7 @@ impl PaintableSink {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(target_os = "linux", feature = "x11egl"))]
|
#[cfg(feature = "x11egl")]
|
||||||
fn initialize_x11egl(
|
fn initialize_x11egl(
|
||||||
&self,
|
&self,
|
||||||
display: gdk::Display,
|
display: gdk::Display,
|
||||||
|
@ -725,7 +725,7 @@ impl PaintableSink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(target_os = "linux", feature = "x11glx"))]
|
#[cfg(feature = "x11glx")]
|
||||||
fn initialize_x11glx(
|
fn initialize_x11glx(
|
||||||
&self,
|
&self,
|
||||||
display: gdk::Display,
|
display: gdk::Display,
|
||||||
|
@ -774,7 +774,7 @@ impl PaintableSink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(target_os = "linux", feature = "wayland"))]
|
#[cfg(feature = "wayland")]
|
||||||
fn initialize_waylandegl(
|
fn initialize_waylandegl(
|
||||||
&self,
|
&self,
|
||||||
display: gdk::Display,
|
display: gdk::Display,
|
||||||
|
|
Loading…
Reference in a new issue