From edfb3050c4b5ac11dfeaa07fafbbe2a31fbd470e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 13 Sep 2018 22:56:47 +0300 Subject: [PATCH] Add bindings for is_video_overlay_prepare_window_handle_message() --- gstreamer-video/src/lib.rs | 2 +- gstreamer-video/src/video_overlay.rs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gstreamer-video/src/lib.rs b/gstreamer-video/src/lib.rs index 535d33e8c..03c5d93a2 100644 --- a/gstreamer-video/src/lib.rs +++ b/gstreamer-video/src/lib.rs @@ -50,7 +50,7 @@ pub use video_info::*; pub mod video_frame; pub use video_frame::{VideoFrame, VideoFrameRef}; mod video_overlay; -pub use video_overlay::VideoOverlayExtManual; +pub use video_overlay::*; mod video_event; pub use video_event::*; mod functions; diff --git a/gstreamer-video/src/video_overlay.rs b/gstreamer-video/src/video_overlay.rs index fd2cda941..d73915909 100644 --- a/gstreamer-video/src/video_overlay.rs +++ b/gstreamer-video/src/video_overlay.rs @@ -7,6 +7,9 @@ // except according to those terms. use ffi; +use glib::translate::*; +use gst; +use gst::prelude::*; use libc::uintptr_t; use VideoOverlay; @@ -26,3 +29,11 @@ impl> VideoOverlayExtManual for O { ffi::gst_video_overlay_got_window_handle(self.to_glib_none().0, handle) } } + +pub fn is_video_overlay_prepare_window_handle_message(msg: &gst::MessageRef) -> bool { + unsafe { + from_glib(ffi::gst_is_video_overlay_prepare_window_handle_message( + msg.as_mut_ptr(), + )) + } +}