diff --git a/ci/run-cargo-test.sh b/ci/run-cargo-test.sh index b58bd4fcd..9781c6d60 100755 --- a/ci/run-cargo-test.sh +++ b/ci/run-cargo-test.sh @@ -23,7 +23,7 @@ done if [ -n "$EXAMPLES_TUTORIALS" ]; then # Keep in sync with examples/Cargo.toml # List all features except windows/win32 - EXAMPLES_FEATURES="--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition,gl,gst-gl-x11,gst-gl-wayland,gst-gl-egl,allocators,gst-play,gst-player,ges,image,cairo-rs,gst-video/v1_18" + EXAMPLES_FEATURES="--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition,gl,gst-gl-x11,gst-gl-egl,allocators,gst-play,gst-player,ges,image,cairo-rs,gst-video/v1_18" cargo build --locked --color=always --manifest-path examples/Cargo.toml --bins --examples "$EXAMPLES_FEATURES" cargo build --locked --color=always --manifest-path tutorials/Cargo.toml --bins --examples --all-features diff --git a/ci/run-clippy.sh b/ci/run-clippy.sh index 6fd4b462b..8ae00b0d9 100755 --- a/ci/run-clippy.sh +++ b/ci/run-clippy.sh @@ -34,7 +34,7 @@ done # Keep in sync with examples/Cargo.toml # List all features except windows/win32 -EXAMPLES_FEATURES="--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition,gl,gst-gl-x11,gst-gl-wayland,gst-gl-egl,allocators,gst-play,gst-player,ges,image,cairo-rs,gst-video/v1_18" +EXAMPLES_FEATURES="--features=rtsp-server,rtsp-server-record,pango-cairo,overlay-composition,gl,gst-gl-x11,gst-gl-egl,allocators,gst-play,gst-player,ges,image,cairo-rs,gst-video/v1_18" # And also run over all the examples/tutorials cargo clippy --locked --color=always --manifest-path examples/Cargo.toml --all-targets "$EXAMPLES_FEATURES" -- $CLIPPY_LINTS diff --git a/examples/Cargo.toml b/examples/Cargo.toml index dd1363663..4fcd4cb68 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -11,7 +11,6 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gst-gl = { package = "gstreamer-gl", path = "../gstreamer-gl", optional = true } gst-gl-egl = { package = "gstreamer-gl-egl", path = "../gstreamer-gl/egl", optional = true } -gst-gl-wayland = { package = "gstreamer-gl-wayland", path = "../gstreamer-gl/wayland", optional = true } gst-gl-x11 = { package = "gstreamer-gl-x11", path = "../gstreamer-gl/x11", optional = true } gst-app = { package = "gstreamer-app", path = "../gstreamer-app" } gst-audio = { package = "gstreamer-audio", path = "../gstreamer-audio" } @@ -61,7 +60,6 @@ overlay-composition = ["pango", "pangocairo", "cairo-rs"] gl = ["gst-gl", "gl_generator", "glutin"] gst-gl-x11 = ["dep:gst-gl-x11"] gst-gl-egl = ["dep:gst-gl-egl"] -gst-gl-wayland = ["dep:gst-gl-wayland"] allocators = ["gst-allocators", "memmap2", "memfd", "uds"] [[bin]] diff --git a/examples/src/glupload.rs b/examples/src/glupload.rs index 3f8776ead..852b36c8c 100644 --- a/examples/src/glupload.rs +++ b/examples/src/glupload.rs @@ -332,12 +332,12 @@ impl App { let windowed_context = unsafe { windowed_context.make_current().map_err(|(_, err)| err)? }; - #[cfg(any(feature = "gst-gl-x11", feature = "gst-gl-wayland"))] + #[cfg(any(feature = "gst-gl-x11"))] let inner_window = windowed_context.window(); let shared_context: gst_gl::GLContext; if cfg!(target_os = "linux") { - #[cfg(any(feature = "gst-gl-x11", feature = "gst-gl-wayland"))] + #[cfg(any(feature = "gst-gl-x11"))] use glutin::platform::unix::WindowExtUnix; use glutin::platform::{unix::RawHandle, ContextTraitExt}; @@ -345,47 +345,19 @@ impl App { let (gl_context, gl_display, platform) = match unsafe { windowed_context.raw_handle() } { - #[cfg(any(feature = "gst-gl-egl", feature = "gst-gl-wayland"))] + #[cfg(any(feature = "gst-gl-egl"))] RawHandle::Egl(egl_context) => { - let mut gl_display = None; - - #[cfg(feature = "gst-gl-egl")] - if let Some(display) = unsafe { windowed_context.get_egl_display() } { - gl_display = Some( + let gl_display = + if let Some(display) = unsafe { windowed_context.get_egl_display() } { unsafe { gst_gl_egl::GLDisplayEGL::with_egl_display(display as usize) } .unwrap() - .upcast::(), - ) - }; - - #[cfg(feature = "gst-gl-wayland")] - if let Some(display) = inner_window.wayland_display() { - let gl_display = gl_display.insert( - unsafe { - gst_gl_wayland::GLDisplayWayland::with_display(display as usize) - } - .unwrap() - .upcast::(), - ); - - // If using a Wayland display, resolving that to an EGL display _should_ - // result in the same handle that glutin found (both via eglGetPlatformDisplay(EXT)()). - #[cfg(feature = "gst-gl-egl")] - { - let gl_display = - gst_gl_egl::GLDisplayEGL::from_gl_display(gl_display).unwrap(); - assert_eq!( - unsafe { windowed_context.get_egl_display() } - .expect("Wayland clients use EGL"), - gl_display.handle() as *const std::ffi::c_void, - "GLDisplayWayland must use the same EGLDisplay as glutin!" - ); - } - }; + } else { + panic!("EGL window without EGL Display") + }; ( egl_context as usize, - gl_display.expect("Could not retrieve GLDisplay through EGL context and/or Wayland display"), + gl_display.upcast::(), gst_gl::GLPlatform::EGL, ) } @@ -394,7 +366,7 @@ impl App { let gl_display = if let Some(display) = inner_window.xlib_display() { unsafe { gst_gl_x11::GLDisplayX11::with_display(display as usize) }.unwrap() } else { - panic!("X11 window without X Display"); + panic!("X11 window without X Display") }; (