forked from mirrors/gstreamer-rs
gl: Provide raw handle()
getter function on GLDisplay
Having access to the raw handle is useful when sharing the display and context with an existing application. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1344>
This commit is contained in:
parent
a97de245c9
commit
9b92261c42
2 changed files with 7 additions and 1 deletions
|
@ -346,7 +346,7 @@ status = "generate"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_handle"
|
name = "get_handle"
|
||||||
# return handle
|
# return handle
|
||||||
ignore = true
|
manual = true
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_gl_context_for_thread"
|
name = "get_gl_context_for_thread"
|
||||||
|
|
|
@ -9,6 +9,12 @@ mod sealed {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait GLDisplayExtManual: sealed::Sealed + IsA<GLDisplay> + 'static {
|
pub trait GLDisplayExtManual: sealed::Sealed + IsA<GLDisplay> + 'static {
|
||||||
|
#[doc(alias = "gst_gl_display_get_handle")]
|
||||||
|
#[doc(alias = "get_handle")]
|
||||||
|
fn handle(&self) -> usize {
|
||||||
|
unsafe { ffi::gst_gl_display_get_handle(self.as_ref().to_glib_none().0) }
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "v1_24")]
|
#[cfg(feature = "v1_24")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
||||||
#[doc(alias = "gst_gl_display_ensure_context")]
|
#[doc(alias = "gst_gl_display_ensure_context")]
|
||||||
|
|
Loading…
Reference in a new issue