forked from mirrors/gstreamer-rs
5fdd56747f
`GstGLDisplayWayland` calls GstGLDisplayEGL::from_gl_display()` under the hood (which calls `GstGLDisplayEGL::from_native()`, which calls `eglGetPlatformDisplay()`) to retrieve the underlying `EGLDisplay` handle, which thus far seems to be the same value as `glutin`. However, newer `glutin 0.31` passes attributes to this function resulting in a different handle, causing all kinds of trouble further down the line when sharing resources between `glutin` and `gstreamer-rs` that both operate on a distinct `EGLDisplay`. Furthermore `GstGLDisplayEGL` thinks that it uniquely owns the handle returned by `eglGetPlatformDisplay()` and _does not_ set `.foreign_display = TRUE` (which `GstGLDisplayEGL::with_egl_display()` would), causing it to call `eglTerminate()` as soon as the `GstGLDisplay` is destroyed, leaving `glutin` dysfunctional. To solve all of this, simply remove this wrongly-behaving class from the example as it is not suitable for sharing an `EGLDisplay` with `glutin`. It might however be interesting to create a different example that showcases how to use raw window handles instead of EGL/GLX handles, however only Wayland and any platform on EGL like Android, via `GstGLDisplayEGL::from_native()`, support this. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1336>
41 lines
1.4 KiB
Bash
Executable file
41 lines
1.4 KiB
Bash
Executable file
#! /bin/bash
|
|
|
|
set -ex
|
|
|
|
rustc --version
|
|
cargo --version
|
|
cargo clippy --version
|
|
|
|
# Keep features in sync with run-cargo-test.sh
|
|
get_features() {
|
|
crate=$1
|
|
case "$crate" in
|
|
gstreamer-audio|gstreamer-editing-services|gstreamer-gl|gstreamer-pbutils|gstreamer-rtp|gstreamer-rtsp|gstreamer-video|gstreamer)
|
|
echo "--features=serde,v1_24"
|
|
;;
|
|
gstreamer-validate)
|
|
echo ""
|
|
;;
|
|
*)
|
|
echo "--features=v1_24"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
for crate in gstreamer* gstreamer-gl/{egl,wayland,x11}; do
|
|
if [ -e "$crate/Cargo.toml" ]; then
|
|
FEATURES=$(get_features "$crate")
|
|
|
|
echo "Running clippy on $crate with $FEATURES"
|
|
|
|
cargo clippy --locked --color=always --manifest-path "$crate/Cargo.toml" $FEATURES --all-targets -- $CLIPPY_LINTS
|
|
fi
|
|
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-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
|
|
cargo clippy --locked --color=always --manifest-path tutorials/Cargo.toml --all-targets --all-features -- $CLIPPY_LINTS
|