From 4692806b00d57bcefe2e8aa6517fcc231f6ecfd1 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 a996a0888..a5790f967 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -117,11 +117,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 a686196f5..01e41be9a 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());