Commit e47a3509 authored by Zeeshan Ali's avatar Zeeshan Ali

Generate bindings for GstPluginFlags

parent c263483b
......@@ -61,6 +61,7 @@ generate = [
"Gst.ParseFlags",
"Gst.TaskState",
"Gst.PluginDependencyFlags",
"Gst.PluginFlags",
"Gst.DateTime",
"Gst.BufferPoolAcquireFlags",
"Gst.PromiseResult",
......
......@@ -569,6 +569,54 @@ impl SetValue for PluginDependencyFlags {
}
}
bitflags! {
pub struct PluginFlags: u32 {
const CACHED = 16;
const BLACKLISTED = 32;
}
}
#[doc(hidden)]
impl ToGlib for PluginFlags {
type GlibType = ffi::GstPluginFlags;
fn to_glib(&self) -> ffi::GstPluginFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstPluginFlags> for PluginFlags {
fn from_glib(value: ffi::GstPluginFlags) -> PluginFlags {
skip_assert_initialized!();
PluginFlags::from_bits_truncate(value)
}
}
impl StaticType for PluginFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::gst_plugin_flags_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for PluginFlags {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for PluginFlags {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for PluginFlags {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
bitflags! {
pub struct SchedulingFlags: u32 {
const SEEKABLE = 1;
......
......@@ -164,6 +164,7 @@ pub use self::flags::PadLinkCheck;
pub use self::flags::PadProbeType;
pub use self::flags::ParseFlags;
pub use self::flags::PluginDependencyFlags;
pub use self::flags::PluginFlags;
pub use self::flags::SchedulingFlags;
pub use self::flags::SeekFlags;
pub use self::flags::SegmentFlags;
......
Generated by gir (https://github.com/gtk-rs/gir @ b5ea065)
Generated by gir (https://github.com/gtk-rs/gir @ 6f103f8)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment