From f86941c14f51961f207f112aa99d642786e8e3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 19 May 2018 10:37:09 +0300 Subject: [PATCH] Add Bus::remove_watch() It was accidentially ignored before --- Gir_Gst.toml | 5 ----- gstreamer/src/auto/bus.rs | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Gir_Gst.toml b/Gir_Gst.toml index 6c3850ad1..457eae768 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -116,11 +116,6 @@ status = "generate" name = "Gst.Bus" status = "generate" trait = false - [[object.function]] - name = "remove_watch" - # Needs manual bindings and GSource support in glib-rs - ignore = true - [[object.function]] name = "add_signal_watch_full" # Priority diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 4e4b326a1..a189abce0 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -98,6 +98,12 @@ impl Bus { } } + pub fn remove_watch(&self) -> bool { + unsafe { + from_glib(ffi::gst_bus_remove_watch(self.to_glib_none().0)) + } + } + pub fn set_flushing(&self, flushing: bool) { unsafe { ffi::gst_bus_set_flushing(self.to_glib_none().0, flushing.to_glib());