From cfe76a5fde74a36cdf35bfca0520c1faf95199d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 10 Aug 2017 01:33:13 +0300 Subject: [PATCH] Add missing assert_initialized_main_thread macro and use macros from glib --- gstreamer-audio/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gstreamer-audio/src/lib.rs b/gstreamer-audio/src/lib.rs index b288910f5..95a62ef7f 100644 --- a/gstreamer-audio/src/lib.rs +++ b/gstreamer-audio/src/lib.rs @@ -15,9 +15,16 @@ extern crate gobject_sys as gobject_ffi; extern crate gstreamer_sys as gst_ffi; extern crate gstreamer_audio_sys as ffi; extern crate gstreamer as gst; - +#[macro_use] extern crate glib; +macro_rules! assert_initialized_main_thread { + () => ( + use gst_ffi; + assert_eq!(unsafe {gst_ffi::gst_is_initialized()}, ::glib_ffi::GTRUE) + ) +} + macro_rules! skip_assert_initialized { () => ( )