From 7a108ddd0df1b4506c47c8c9d498d0199e1f61dd Mon Sep 17 00:00:00 2001 From: fengalin Date: Sun, 17 Sep 2017 15:03:12 +0200 Subject: [PATCH] Set version (1.12) for StackTraceFlags Fixes https://github.com/sdroege/gstreamer-rs/pull/36 --- gir-files/Gst-1.0.gir | 3 ++- gstreamer/src/auto/flags.rs | 7 +++++++ gstreamer/src/auto/mod.rs | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gir-files/Gst-1.0.gir b/gir-files/Gst-1.0.gir index 4e4213afb..0260a1476 100644 --- a/gir-files/Gst-1.0.gir +++ b/gir-files/Gst-1.0.gir @@ -35158,7 +35158,8 @@ values of the seek flags. + c:type="GstStackTraceFlags" + version="1.12"> for StackTraceFlags { fn from_glib(value: ffi::GstStackTraceFlags) -> StackTraceFlags { @@ -590,24 +593,28 @@ impl FromGlib for StackTraceFlags { } } +#[cfg(feature = "v1_12")] impl StaticType for StackTraceFlags { fn static_type() -> Type { unsafe { from_glib(ffi::gst_stack_trace_flags_get_type()) } } } +#[cfg(feature = "v1_12")] impl<'a> FromValueOptional<'a> for StackTraceFlags { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } +#[cfg(feature = "v1_12")] impl<'a> FromValue<'a> for StackTraceFlags { unsafe fn from_value(value: &Value) -> Self { from_glib(ffi::GstStackTraceFlags::from_bits_truncate(gobject_ffi::g_value_get_flags(value.to_glib_none().0))) } } +#[cfg(feature = "v1_12")] impl SetValue for StackTraceFlags { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib().bits()) diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index dc5d2d039..6d945c6ad 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -244,7 +244,9 @@ pub use self::flags::SEGMENT_FLAG_SKIP; pub use self::flags::SEGMENT_FLAG_SEGMENT; pub use self::flags::SEGMENT_FLAG_TRICKMODE_KEY_UNITS; pub use self::flags::SEGMENT_FLAG_TRICKMODE_NO_AUDIO; +#[cfg(feature = "v1_12")] pub use self::flags::StackTraceFlags; +#[cfg(feature = "v1_12")] pub use self::flags::STACK_TRACE_SHOW_FULL; pub use self::flags::StreamFlags; pub use self::flags::STREAM_FLAG_NONE;