Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayson Reis <santosdosreis@gmail.com>2023-06-22 19:48:46 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-07-05 12:31:40 +0300
commit16a1a6d4c55e5ece72286bcdf8fa706e5c744d64 (patch)
tree2533b680d4eefaaba55a0086c9b93e0e65d2f940
parent870f7fd89bb4af62450f227e28fadbc6b750a844 (diff)
gtk4: Make winegl code compilable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1266>
-rw-r--r--video/gtk4/src/sink/imp.rs23
1 files changed, 12 insertions, 11 deletions
diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs
index 399e48a7..ff3cf270 100644
--- a/video/gtk4/src/sink/imp.rs
+++ b/video/gtk4/src/sink/imp.rs
@@ -894,7 +894,7 @@ impl PaintableSink {
}
unsafe {
- let gst_gl_display =
+ let gst_display =
if let Some(display) = gst_gl::GLDisplay::with_type(gst_gl::GLDisplayType::WIN32) {
display
} else {
@@ -902,10 +902,10 @@ impl PaintableSink {
return None;
};
- gst_gl_display.filter_gl_api(gl_api);
+ gst_display.filter_gl_api(gl_api);
let wrapped_context =
- gst_gl::GLContext::new_wrapped(&gst_gl_display, gl_ctx, platform, gl_api);
+ gst_gl::GLContext::new_wrapped(&gst_display, gl_ctx, platform, gl_api);
let wrapped_context = match wrapped_context {
None => {
gst::error!(CAT, imp: self, "Failed to create wrapped GL context");
@@ -914,7 +914,7 @@ impl PaintableSink {
Some(wrapped_context) => wrapped_context,
};
- Some((gst_gl_display, wrapped_context))
+ Some((gst_display, wrapped_context))
}
}
@@ -947,18 +947,19 @@ impl PaintableSink {
let egl_display = d.egl_display().unwrap().as_ptr();
// TODO: On the binary distribution of GStreamer for Windows, this symbol is not there
- let gst_gl_display = gst_gl_egl::ffi::gst_gl_display_egl_from_gl_display(egl_display);
- if gst_gl_display.is_null() {
+ let gst_display =
+ gst_gl_egl::ffi::gst_gl_display_egl_from_gl_display(egl_display.cast());
+ if gst_display.is_null() {
gst::error!(CAT, imp: self, "Failed to get EGL display");
return None;
}
- let gst_gl_display: gst_gl::GLDisplay =
- from_glib_full(gst_gl_display as *mut gst_gl::ffi::GstGLDisplay);
+ let gst_display =
+ gst_gl::GLDisplay::from_glib_full(gst_display as *mut gst_gl::ffi::GstGLDisplay);
- gst_gl_display.filter_gl_api(gl_api);
+ gst_display.filter_gl_api(gl_api);
let wrapped_context =
- gst_gl::GLContext::new_wrapped(&gst_gl_display, gl_ctx, platform, gl_api);
+ gst_gl::GLContext::new_wrapped(&gst_display, gl_ctx, platform, gl_api);
let wrapped_context = match wrapped_context {
None => {
@@ -968,7 +969,7 @@ impl PaintableSink {
Some(wrapped_context) => wrapped_context,
};
- Some((gst_gl_display, wrapped_context))
+ Some((gst_display, wrapped_context))
}
}
}