Correctly mark Stream and StreamType as requiring version 1.10 at least

Should fix https://github.com/sdroege/gstreamer-rs/issues/68
This commit is contained in:
Sebastian Dröge 2017-12-26 18:13:15 +01:00
parent f4da93aadb
commit 755982bb38
3 changed files with 10 additions and 0 deletions

View file

@ -35441,6 +35441,7 @@ on the returned caps to modify it.</doc>
<class name="Stream"
c:symbol-prefix="stream"
c:type="GstStream"
version="1.10"
parent="Object"
glib:type-name="GstStream"
glib:get-type="gst_stream_get_type"
@ -36103,6 +36104,7 @@ application of new streaming threads and their status.</doc>
</member>
</enumeration>
<bitfield name="StreamType"
version="1.10"
glib:type-name="GstStreamType"
glib:get-type="gst_stream_type_get_type"
c:type="GstStreamType">

View file

@ -775,6 +775,7 @@ impl SetValue for StreamFlags {
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
bitflags! {
pub struct StreamType: u32 {
const UNKNOWN = 1;
@ -785,6 +786,7 @@ bitflags! {
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for StreamType {
type GlibType = ffi::GstStreamType;
@ -794,6 +796,7 @@ impl ToGlib for StreamType {
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<ffi::GstStreamType> for StreamType {
fn from_glib(value: ffi::GstStreamType) -> StreamType {
@ -802,24 +805,28 @@ impl FromGlib<ffi::GstStreamType> for StreamType {
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
impl StaticType for StreamType {
fn static_type() -> Type {
unsafe { from_glib(ffi::gst_stream_type_get_type()) }
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
impl<'a> FromValueOptional<'a> for StreamType {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
impl<'a> FromValue<'a> for StreamType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(ffi::GstStreamType::from_bits_truncate(gobject_ffi::g_value_get_flags(value.to_glib_none().0)))
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
impl SetValue for StreamType {
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())

View file

@ -162,6 +162,7 @@ pub use self::flags::SegmentFlags;
#[cfg(any(feature = "v1_12", feature = "dox"))]
pub use self::flags::StackTraceFlags;
pub use self::flags::StreamFlags;
#[cfg(any(feature = "v1_10", feature = "dox"))]
pub use self::flags::StreamType;
mod alias;