gstreamer-video: Regenerate

This commit is contained in:
Sebastian Dröge 2020-11-22 11:50:37 +02:00
parent ef135d46d8
commit 4bd7f7af1a
9 changed files with 508 additions and 573 deletions

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
use bitflags::bitflags;
use glib::translate::*; use glib::translate::*;
use glib::value::FromValue; use glib::value::FromValue;
use glib::value::FromValueOptional; use glib::value::FromValueOptional;
@ -9,8 +10,6 @@ use glib::value::SetValue;
use glib::value::Value; use glib::value::Value;
use glib::StaticType; use glib::StaticType;
use glib::Type; use glib::Type;
use gobject_sys;
use gst_video_sys;
bitflags! { bitflags! {
pub struct VideoBufferFlags: u32 { pub struct VideoBufferFlags: u32 {
@ -34,16 +33,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoBufferFlags { impl ToGlib for VideoBufferFlags {
type GlibType = gst_video_sys::GstVideoBufferFlags; type GlibType = ffi::GstVideoBufferFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoBufferFlags { fn to_glib(&self) -> ffi::GstVideoBufferFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoBufferFlags> for VideoBufferFlags { impl FromGlib<ffi::GstVideoBufferFlags> for VideoBufferFlags {
fn from_glib(value: gst_video_sys::GstVideoBufferFlags) -> VideoBufferFlags { fn from_glib(value: ffi::GstVideoBufferFlags) -> VideoBufferFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoBufferFlags::from_bits_truncate(value) VideoBufferFlags::from_bits_truncate(value)
} }
@ -51,7 +50,7 @@ impl FromGlib<gst_video_sys::GstVideoBufferFlags> for VideoBufferFlags {
impl StaticType for VideoBufferFlags { impl StaticType for VideoBufferFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_buffer_flags_get_type()) } unsafe { from_glib(ffi::gst_video_buffer_flags_get_type()) }
} }
} }
@ -63,13 +62,13 @@ impl<'a> FromValueOptional<'a> for VideoBufferFlags {
impl<'a> FromValue<'a> for VideoBufferFlags { impl<'a> FromValue<'a> for VideoBufferFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoBufferFlags { impl SetValue for VideoBufferFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -88,16 +87,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoChromaSite { impl ToGlib for VideoChromaSite {
type GlibType = gst_video_sys::GstVideoChromaSite; type GlibType = ffi::GstVideoChromaSite;
fn to_glib(&self) -> gst_video_sys::GstVideoChromaSite { fn to_glib(&self) -> ffi::GstVideoChromaSite {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoChromaSite> for VideoChromaSite { impl FromGlib<ffi::GstVideoChromaSite> for VideoChromaSite {
fn from_glib(value: gst_video_sys::GstVideoChromaSite) -> VideoChromaSite { fn from_glib(value: ffi::GstVideoChromaSite) -> VideoChromaSite {
skip_assert_initialized!(); skip_assert_initialized!();
VideoChromaSite::from_bits_truncate(value) VideoChromaSite::from_bits_truncate(value)
} }
@ -105,7 +104,7 @@ impl FromGlib<gst_video_sys::GstVideoChromaSite> for VideoChromaSite {
impl StaticType for VideoChromaSite { impl StaticType for VideoChromaSite {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_chroma_site_get_type()) } unsafe { from_glib(ffi::gst_video_chroma_site_get_type()) }
} }
} }
@ -117,13 +116,13 @@ impl<'a> FromValueOptional<'a> for VideoChromaSite {
impl<'a> FromValue<'a> for VideoChromaSite { impl<'a> FromValue<'a> for VideoChromaSite {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoChromaSite { impl SetValue for VideoChromaSite {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -138,16 +137,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoCodecFrameFlags { impl ToGlib for VideoCodecFrameFlags {
type GlibType = gst_video_sys::GstVideoCodecFrameFlags; type GlibType = ffi::GstVideoCodecFrameFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoCodecFrameFlags { fn to_glib(&self) -> ffi::GstVideoCodecFrameFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoCodecFrameFlags> for VideoCodecFrameFlags { impl FromGlib<ffi::GstVideoCodecFrameFlags> for VideoCodecFrameFlags {
fn from_glib(value: gst_video_sys::GstVideoCodecFrameFlags) -> VideoCodecFrameFlags { fn from_glib(value: ffi::GstVideoCodecFrameFlags) -> VideoCodecFrameFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoCodecFrameFlags::from_bits_truncate(value) VideoCodecFrameFlags::from_bits_truncate(value)
} }
@ -162,16 +161,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoFlags { impl ToGlib for VideoFlags {
type GlibType = gst_video_sys::GstVideoFlags; type GlibType = ffi::GstVideoFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoFlags { fn to_glib(&self) -> ffi::GstVideoFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFlags> for VideoFlags { impl FromGlib<ffi::GstVideoFlags> for VideoFlags {
fn from_glib(value: gst_video_sys::GstVideoFlags) -> VideoFlags { fn from_glib(value: ffi::GstVideoFlags) -> VideoFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoFlags::from_bits_truncate(value) VideoFlags::from_bits_truncate(value)
} }
@ -179,7 +178,7 @@ impl FromGlib<gst_video_sys::GstVideoFlags> for VideoFlags {
impl StaticType for VideoFlags { impl StaticType for VideoFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_flags_get_type()) } unsafe { from_glib(ffi::gst_video_flags_get_type()) }
} }
} }
@ -191,13 +190,13 @@ impl<'a> FromValueOptional<'a> for VideoFlags {
impl<'a> FromValue<'a> for VideoFlags { impl<'a> FromValue<'a> for VideoFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoFlags { impl SetValue for VideoFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -217,16 +216,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoFormatFlags { impl ToGlib for VideoFormatFlags {
type GlibType = gst_video_sys::GstVideoFormatFlags; type GlibType = ffi::GstVideoFormatFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoFormatFlags { fn to_glib(&self) -> ffi::GstVideoFormatFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFormatFlags> for VideoFormatFlags { impl FromGlib<ffi::GstVideoFormatFlags> for VideoFormatFlags {
fn from_glib(value: gst_video_sys::GstVideoFormatFlags) -> VideoFormatFlags { fn from_glib(value: ffi::GstVideoFormatFlags) -> VideoFormatFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoFormatFlags::from_bits_truncate(value) VideoFormatFlags::from_bits_truncate(value)
} }
@ -234,7 +233,7 @@ impl FromGlib<gst_video_sys::GstVideoFormatFlags> for VideoFormatFlags {
impl StaticType for VideoFormatFlags { impl StaticType for VideoFormatFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_format_flags_get_type()) } unsafe { from_glib(ffi::gst_video_format_flags_get_type()) }
} }
} }
@ -246,13 +245,13 @@ impl<'a> FromValueOptional<'a> for VideoFormatFlags {
impl<'a> FromValue<'a> for VideoFormatFlags { impl<'a> FromValue<'a> for VideoFormatFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoFormatFlags { impl SetValue for VideoFormatFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -271,16 +270,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoFrameFlags { impl ToGlib for VideoFrameFlags {
type GlibType = gst_video_sys::GstVideoFrameFlags; type GlibType = ffi::GstVideoFrameFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoFrameFlags { fn to_glib(&self) -> ffi::GstVideoFrameFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFrameFlags> for VideoFrameFlags { impl FromGlib<ffi::GstVideoFrameFlags> for VideoFrameFlags {
fn from_glib(value: gst_video_sys::GstVideoFrameFlags) -> VideoFrameFlags { fn from_glib(value: ffi::GstVideoFrameFlags) -> VideoFrameFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoFrameFlags::from_bits_truncate(value) VideoFrameFlags::from_bits_truncate(value)
} }
@ -288,7 +287,7 @@ impl FromGlib<gst_video_sys::GstVideoFrameFlags> for VideoFrameFlags {
impl StaticType for VideoFrameFlags { impl StaticType for VideoFrameFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_frame_flags_get_type()) } unsafe { from_glib(ffi::gst_video_frame_flags_get_type()) }
} }
} }
@ -300,13 +299,13 @@ impl<'a> FromValueOptional<'a> for VideoFrameFlags {
impl<'a> FromValue<'a> for VideoFrameFlags { impl<'a> FromValue<'a> for VideoFrameFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoFrameFlags { impl SetValue for VideoFrameFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -324,16 +323,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoMultiviewFlags { impl ToGlib for VideoMultiviewFlags {
type GlibType = gst_video_sys::GstVideoMultiviewFlags; type GlibType = ffi::GstVideoMultiviewFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewFlags { fn to_glib(&self) -> ffi::GstVideoMultiviewFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoMultiviewFlags> for VideoMultiviewFlags { impl FromGlib<ffi::GstVideoMultiviewFlags> for VideoMultiviewFlags {
fn from_glib(value: gst_video_sys::GstVideoMultiviewFlags) -> VideoMultiviewFlags { fn from_glib(value: ffi::GstVideoMultiviewFlags) -> VideoMultiviewFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoMultiviewFlags::from_bits_truncate(value) VideoMultiviewFlags::from_bits_truncate(value)
} }
@ -341,7 +340,7 @@ impl FromGlib<gst_video_sys::GstVideoMultiviewFlags> for VideoMultiviewFlags {
impl StaticType for VideoMultiviewFlags { impl StaticType for VideoMultiviewFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_multiview_flags_get_type()) } unsafe { from_glib(ffi::gst_video_multiview_flags_get_type()) }
} }
} }
@ -353,13 +352,13 @@ impl<'a> FromValueOptional<'a> for VideoMultiviewFlags {
impl<'a> FromValue<'a> for VideoMultiviewFlags { impl<'a> FromValue<'a> for VideoMultiviewFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoMultiviewFlags { impl SetValue for VideoMultiviewFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -372,16 +371,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoOverlayFormatFlags { impl ToGlib for VideoOverlayFormatFlags {
type GlibType = gst_video_sys::GstVideoOverlayFormatFlags; type GlibType = ffi::GstVideoOverlayFormatFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoOverlayFormatFlags { fn to_glib(&self) -> ffi::GstVideoOverlayFormatFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoOverlayFormatFlags> for VideoOverlayFormatFlags { impl FromGlib<ffi::GstVideoOverlayFormatFlags> for VideoOverlayFormatFlags {
fn from_glib(value: gst_video_sys::GstVideoOverlayFormatFlags) -> VideoOverlayFormatFlags { fn from_glib(value: ffi::GstVideoOverlayFormatFlags) -> VideoOverlayFormatFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoOverlayFormatFlags::from_bits_truncate(value) VideoOverlayFormatFlags::from_bits_truncate(value)
} }
@ -391,7 +390,7 @@ impl FromGlib<gst_video_sys::GstVideoOverlayFormatFlags> for VideoOverlayFormatF
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl StaticType for VideoOverlayFormatFlags { impl StaticType for VideoOverlayFormatFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_overlay_format_flags_get_type()) } unsafe { from_glib(ffi::gst_video_overlay_format_flags_get_type()) }
} }
} }
@ -407,7 +406,7 @@ impl<'a> FromValueOptional<'a> for VideoOverlayFormatFlags {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl<'a> FromValue<'a> for VideoOverlayFormatFlags { impl<'a> FromValue<'a> for VideoOverlayFormatFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
@ -415,7 +414,7 @@ impl<'a> FromValue<'a> for VideoOverlayFormatFlags {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
impl SetValue for VideoOverlayFormatFlags { impl SetValue for VideoOverlayFormatFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -428,16 +427,16 @@ bitflags! {
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoPackFlags { impl ToGlib for VideoPackFlags {
type GlibType = gst_video_sys::GstVideoPackFlags; type GlibType = ffi::GstVideoPackFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoPackFlags { fn to_glib(&self) -> ffi::GstVideoPackFlags {
self.bits() self.bits()
} }
} }
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoPackFlags> for VideoPackFlags { impl FromGlib<ffi::GstVideoPackFlags> for VideoPackFlags {
fn from_glib(value: gst_video_sys::GstVideoPackFlags) -> VideoPackFlags { fn from_glib(value: ffi::GstVideoPackFlags) -> VideoPackFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoPackFlags::from_bits_truncate(value) VideoPackFlags::from_bits_truncate(value)
} }
@ -445,7 +444,7 @@ impl FromGlib<gst_video_sys::GstVideoPackFlags> for VideoPackFlags {
impl StaticType for VideoPackFlags { impl StaticType for VideoPackFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_pack_flags_get_type()) } unsafe { from_glib(ffi::gst_video_pack_flags_get_type()) }
} }
} }
@ -457,13 +456,13 @@ impl<'a> FromValueOptional<'a> for VideoPackFlags {
impl<'a> FromValue<'a> for VideoPackFlags { impl<'a> FromValue<'a> for VideoPackFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
impl SetValue for VideoPackFlags { impl SetValue for VideoPackFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }
@ -480,9 +479,9 @@ bitflags! {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(hidden)] #[doc(hidden)]
impl ToGlib for VideoTimeCodeFlags { impl ToGlib for VideoTimeCodeFlags {
type GlibType = gst_video_sys::GstVideoTimeCodeFlags; type GlibType = ffi::GstVideoTimeCodeFlags;
fn to_glib(&self) -> gst_video_sys::GstVideoTimeCodeFlags { fn to_glib(&self) -> ffi::GstVideoTimeCodeFlags {
self.bits() self.bits()
} }
} }
@ -490,8 +489,8 @@ impl ToGlib for VideoTimeCodeFlags {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(hidden)] #[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoTimeCodeFlags> for VideoTimeCodeFlags { impl FromGlib<ffi::GstVideoTimeCodeFlags> for VideoTimeCodeFlags {
fn from_glib(value: gst_video_sys::GstVideoTimeCodeFlags) -> VideoTimeCodeFlags { fn from_glib(value: ffi::GstVideoTimeCodeFlags) -> VideoTimeCodeFlags {
skip_assert_initialized!(); skip_assert_initialized!();
VideoTimeCodeFlags::from_bits_truncate(value) VideoTimeCodeFlags::from_bits_truncate(value)
} }
@ -501,7 +500,7 @@ impl FromGlib<gst_video_sys::GstVideoTimeCodeFlags> for VideoTimeCodeFlags {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl StaticType for VideoTimeCodeFlags { impl StaticType for VideoTimeCodeFlags {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_time_code_flags_get_type()) } unsafe { from_glib(ffi::gst_video_time_code_flags_get_type()) }
} }
} }
@ -517,7 +516,7 @@ impl<'a> FromValueOptional<'a> for VideoTimeCodeFlags {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl<'a> FromValue<'a> for VideoTimeCodeFlags { impl<'a> FromValue<'a> for VideoTimeCodeFlags {
unsafe fn from_value(value: &Value) -> Self { unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
} }
} }
@ -525,6 +524,6 @@ impl<'a> FromValue<'a> for VideoTimeCodeFlags {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl SetValue for VideoTimeCodeFlags { impl SetValue for VideoTimeCodeFlags {
unsafe fn set_value(value: &mut Value, this: &Self) { unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
} }
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6) Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5) from gir-files (https://github.com/gtk-rs/gir-files @ 3ac51141)

View file

@ -4,24 +4,19 @@
use glib::object::Cast; use glib::object::Cast;
use glib::translate::*; use glib::translate::*;
use gst;
use gst_video_sys;
glib_wrapper! { glib::glib_wrapper! {
pub struct VideoBufferPool(Object<gst_video_sys::GstVideoBufferPool, gst_video_sys::GstVideoBufferPoolClass>) @extends gst::BufferPool, gst::Object; pub struct VideoBufferPool(Object<ffi::GstVideoBufferPool, ffi::GstVideoBufferPoolClass>) @extends gst::BufferPool, gst::Object;
match fn { match fn {
get_type => || gst_video_sys::gst_video_buffer_pool_get_type(), get_type => || ffi::gst_video_buffer_pool_get_type(),
} }
} }
impl VideoBufferPool { impl VideoBufferPool {
pub fn new() -> VideoBufferPool { pub fn new() -> VideoBufferPool {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe { gst::BufferPool::from_glib_full(ffi::gst_video_buffer_pool_new()).unsafe_cast() }
gst::BufferPool::from_glib_full(gst_video_sys::gst_video_buffer_pool_new())
.unsafe_cast()
}
} }
} }

View file

@ -2,7 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
use glib; use crate::VideoCodecFrame;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use glib::object::Cast; use glib::object::Cast;
@ -22,25 +22,16 @@ use glib::StaticType;
use glib::Value; use glib::Value;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use glib_sys;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use gobject_sys;
use gst;
use gst_video_sys;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use std::boxed::Box as Box_; use std::boxed::Box as Box_;
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use std::mem::transmute; use std::mem::transmute;
use VideoCodecFrame;
glib_wrapper! { glib::glib_wrapper! {
pub struct VideoDecoder(Object<gst_video_sys::GstVideoDecoder, gst_video_sys::GstVideoDecoderClass>) @extends gst::Element, gst::Object; pub struct VideoDecoder(Object<ffi::GstVideoDecoder, ffi::GstVideoDecoderClass>) @extends gst::Element, gst::Object;
match fn { match fn {
get_type => || gst_video_sys::gst_video_decoder_get_type(), get_type => || ffi::gst_video_decoder_get_type(),
} }
} }
@ -110,36 +101,34 @@ pub trait VideoDecoderExt: 'static {
impl<O: IsA<VideoDecoder>> VideoDecoderExt for O { impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn add_to_frame(&self, n_bytes: i32) { fn add_to_frame(&self, n_bytes: i32) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_add_to_frame(self.as_ref().to_glib_none().0, n_bytes); ffi::gst_video_decoder_add_to_frame(self.as_ref().to_glib_none().0, n_bytes);
} }
} }
fn allocate_output_buffer(&self) -> Result<gst::Buffer, glib::BoolError> { fn allocate_output_buffer(&self) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(gst_video_sys::gst_video_decoder_allocate_output_buffer( Option::<_>::from_glib_full(ffi::gst_video_decoder_allocate_output_buffer(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
)) ))
.ok_or_else(|| glib_bool_error!("Failed to allocate output buffer")) .ok_or_else(|| glib::glib_bool_error!("Failed to allocate output buffer"))
} }
} }
fn get_buffer_pool(&self) -> Option<gst::BufferPool> { fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
unsafe { unsafe {
from_glib_full(gst_video_sys::gst_video_decoder_get_buffer_pool( from_glib_full(ffi::gst_video_decoder_get_buffer_pool(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
)) ))
} }
} }
fn get_estimate_rate(&self) -> i32 { fn get_estimate_rate(&self) -> i32 {
unsafe { unsafe { ffi::gst_video_decoder_get_estimate_rate(self.as_ref().to_glib_none().0) }
gst_video_sys::gst_video_decoder_get_estimate_rate(self.as_ref().to_glib_none().0)
}
} }
fn get_max_decode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff { fn get_max_decode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_get_max_decode_time( ffi::gst_video_decoder_get_max_decode_time(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
frame.to_glib_none().0, frame.to_glib_none().0,
) )
@ -147,12 +136,12 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
} }
fn get_max_errors(&self) -> i32 { fn get_max_errors(&self) -> i32 {
unsafe { gst_video_sys::gst_video_decoder_get_max_errors(self.as_ref().to_glib_none().0) } unsafe { ffi::gst_video_decoder_get_max_errors(self.as_ref().to_glib_none().0) }
} }
fn get_needs_format(&self) -> bool { fn get_needs_format(&self) -> bool {
unsafe { unsafe {
from_glib(gst_video_sys::gst_video_decoder_get_needs_format( from_glib(ffi::gst_video_decoder_get_needs_format(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
)) ))
} }
@ -160,27 +149,23 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn get_packetized(&self) -> bool { fn get_packetized(&self) -> bool {
unsafe { unsafe {
from_glib(gst_video_sys::gst_video_decoder_get_packetized( from_glib(ffi::gst_video_decoder_get_packetized(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
)) ))
} }
} }
fn get_pending_frame_size(&self) -> usize { fn get_pending_frame_size(&self) -> usize {
unsafe { unsafe { ffi::gst_video_decoder_get_pending_frame_size(self.as_ref().to_glib_none().0) }
gst_video_sys::gst_video_decoder_get_pending_frame_size(self.as_ref().to_glib_none().0)
}
} }
fn get_qos_proportion(&self) -> f64 { fn get_qos_proportion(&self) -> f64 {
unsafe { unsafe { ffi::gst_video_decoder_get_qos_proportion(self.as_ref().to_glib_none().0) }
gst_video_sys::gst_video_decoder_get_qos_proportion(self.as_ref().to_glib_none().0)
}
} }
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_merge_tags( ffi::gst_video_decoder_merge_tags(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
tags.to_glib_none().0, tags.to_glib_none().0,
mode.to_glib(), mode.to_glib(),
@ -190,7 +175,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps { fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps {
unsafe { unsafe {
from_glib_full(gst_video_sys::gst_video_decoder_proxy_getcaps( from_glib_full(ffi::gst_video_decoder_proxy_getcaps(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
caps.to_glib_none().0, caps.to_glib_none().0,
filter.to_glib_none().0, filter.to_glib_none().0,
@ -200,7 +185,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn set_estimate_rate(&self, enabled: bool) { fn set_estimate_rate(&self, enabled: bool) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_set_estimate_rate( ffi::gst_video_decoder_set_estimate_rate(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
enabled.to_glib(), enabled.to_glib(),
); );
@ -209,13 +194,13 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn set_max_errors(&self, num: i32) { fn set_max_errors(&self, num: i32) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_set_max_errors(self.as_ref().to_glib_none().0, num); ffi::gst_video_decoder_set_max_errors(self.as_ref().to_glib_none().0, num);
} }
} }
fn set_needs_format(&self, enabled: bool) { fn set_needs_format(&self, enabled: bool) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_set_needs_format( ffi::gst_video_decoder_set_needs_format(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
enabled.to_glib(), enabled.to_glib(),
); );
@ -224,7 +209,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn set_packetized(&self, packetized: bool) { fn set_packetized(&self, packetized: bool) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_set_packetized( ffi::gst_video_decoder_set_packetized(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
packetized.to_glib(), packetized.to_glib(),
); );
@ -233,7 +218,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn set_use_default_pad_acceptcaps(&self, use_: bool) { fn set_use_default_pad_acceptcaps(&self, use_: bool) {
unsafe { unsafe {
gst_video_sys::gst_video_decoder_set_use_default_pad_acceptcaps( ffi::gst_video_decoder_set_use_default_pad_acceptcaps(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
use_.to_glib(), use_.to_glib(),
); );
@ -245,8 +230,8 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
fn get_property_qos(&self) -> bool { fn get_property_qos(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property( glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject, self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _, b"qos\0".as_ptr() as *const _,
value.to_glib_none_mut().0, value.to_glib_none_mut().0,
); );
@ -261,8 +246,8 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn set_property_qos(&self, qos: bool) { fn set_property_qos(&self, qos: bool) {
unsafe { unsafe {
gobject_sys::g_object_set_property( glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject, self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _, b"qos\0".as_ptr() as *const _,
Value::from(&qos).to_glib_none().0, Value::from(&qos).to_glib_none().0,
); );
@ -276,9 +261,9 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
f: F, f: F,
) -> SignalHandlerId { ) -> SignalHandlerId {
unsafe extern "C" fn notify_max_errors_trampoline<P, F: Fn(&P) + Send + Sync + 'static>( unsafe extern "C" fn notify_max_errors_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_video_sys::GstVideoDecoder, this: *mut ffi::GstVideoDecoder,
_param_spec: glib_sys::gpointer, _param_spec: glib::ffi::gpointer,
f: glib_sys::gpointer, f: glib::ffi::gpointer,
) where ) where
P: IsA<VideoDecoder>, P: IsA<VideoDecoder>,
{ {
@ -305,9 +290,9 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
f: F, f: F,
) -> SignalHandlerId { ) -> SignalHandlerId {
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>( unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_video_sys::GstVideoDecoder, this: *mut ffi::GstVideoDecoder,
_param_spec: glib_sys::gpointer, _param_spec: glib::ffi::gpointer,
f: glib_sys::gpointer, f: glib::ffi::gpointer,
) where ) where
P: IsA<VideoDecoder>, P: IsA<VideoDecoder>,
{ {

View file

@ -2,7 +2,9 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
use glib; #[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use crate::VideoCodecFrame;
use glib::object::Cast; use glib::object::Cast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::connect_raw; use glib::signal::connect_raw;
@ -10,21 +12,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_video_sys;
use std::boxed::Box as Box_; use std::boxed::Box as Box_;
use std::mem::transmute; use std::mem::transmute;
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use VideoCodecFrame;
glib_wrapper! { glib::glib_wrapper! {
pub struct VideoEncoder(Object<gst_video_sys::GstVideoEncoder, gst_video_sys::GstVideoEncoderClass>) @extends gst::Element, gst::Object; pub struct VideoEncoder(Object<ffi::GstVideoEncoder, ffi::GstVideoEncoderClass>) @extends gst::Element, gst::Object;
match fn { match fn {
get_type => || gst_video_sys::gst_video_encoder_get_type(), get_type => || ffi::gst_video_encoder_get_type(),
} }
} }
@ -84,11 +79,11 @@ pub trait VideoEncoderExt: 'static {
impl<O: IsA<VideoEncoder>> VideoEncoderExt for O { impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn allocate_output_buffer(&self, size: usize) -> Result<gst::Buffer, glib::BoolError> { fn allocate_output_buffer(&self, size: usize) -> Result<gst::Buffer, glib::BoolError> {
unsafe { unsafe {
Option::<_>::from_glib_full(gst_video_sys::gst_video_encoder_allocate_output_buffer( Option::<_>::from_glib_full(ffi::gst_video_encoder_allocate_output_buffer(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
size, size,
)) ))
.ok_or_else(|| glib_bool_error!("Failed to allocate output buffer")) .ok_or_else(|| glib::glib_bool_error!("Failed to allocate output buffer"))
} }
} }
@ -96,7 +91,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn get_max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff { fn get_max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff {
unsafe { unsafe {
gst_video_sys::gst_video_encoder_get_max_encode_time( ffi::gst_video_encoder_get_max_encode_time(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
frame.to_glib_none().0, frame.to_glib_none().0,
) )
@ -107,11 +102,9 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn get_min_force_key_unit_interval(&self) -> gst::ClockTime { fn get_min_force_key_unit_interval(&self) -> gst::ClockTime {
unsafe { unsafe {
from_glib( from_glib(ffi::gst_video_encoder_get_min_force_key_unit_interval(
gst_video_sys::gst_video_encoder_get_min_force_key_unit_interval( self.as_ref().to_glib_none().0,
self.as_ref().to_glib_none().0, ))
),
)
} }
} }
@ -119,7 +112,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn is_qos_enabled(&self) -> bool { fn is_qos_enabled(&self) -> bool {
unsafe { unsafe {
from_glib(gst_video_sys::gst_video_encoder_is_qos_enabled( from_glib(ffi::gst_video_encoder_is_qos_enabled(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
)) ))
} }
@ -127,7 +120,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) { fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) {
unsafe { unsafe {
gst_video_sys::gst_video_encoder_merge_tags( ffi::gst_video_encoder_merge_tags(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
tags.to_glib_none().0, tags.to_glib_none().0,
mode.to_glib(), mode.to_glib(),
@ -137,7 +130,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps { fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps {
unsafe { unsafe {
from_glib_full(gst_video_sys::gst_video_encoder_proxy_getcaps( from_glib_full(ffi::gst_video_encoder_proxy_getcaps(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
caps.to_glib_none().0, caps.to_glib_none().0,
filter.to_glib_none().0, filter.to_glib_none().0,
@ -147,7 +140,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn set_headers(&self, headers: &[&gst::Buffer]) { fn set_headers(&self, headers: &[&gst::Buffer]) {
unsafe { unsafe {
gst_video_sys::gst_video_encoder_set_headers( ffi::gst_video_encoder_set_headers(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
headers.to_glib_full(), headers.to_glib_full(),
); );
@ -158,7 +151,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn set_min_force_key_unit_interval(&self, interval: gst::ClockTime) { fn set_min_force_key_unit_interval(&self, interval: gst::ClockTime) {
unsafe { unsafe {
gst_video_sys::gst_video_encoder_set_min_force_key_unit_interval( ffi::gst_video_encoder_set_min_force_key_unit_interval(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
interval.to_glib(), interval.to_glib(),
); );
@ -167,10 +160,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn set_min_pts(&self, min_pts: gst::ClockTime) { fn set_min_pts(&self, min_pts: gst::ClockTime) {
unsafe { unsafe {
gst_video_sys::gst_video_encoder_set_min_pts( ffi::gst_video_encoder_set_min_pts(self.as_ref().to_glib_none().0, min_pts.to_glib());
self.as_ref().to_glib_none().0,
min_pts.to_glib(),
);
} }
} }
@ -178,7 +168,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn set_qos_enabled(&self, enabled: bool) { fn set_qos_enabled(&self, enabled: bool) {
unsafe { unsafe {
gst_video_sys::gst_video_encoder_set_qos_enabled( ffi::gst_video_encoder_set_qos_enabled(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
enabled.to_glib(), enabled.to_glib(),
); );
@ -188,8 +178,8 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn get_property_qos(&self) -> bool { fn get_property_qos(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property( glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject, self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _, b"qos\0".as_ptr() as *const _,
value.to_glib_none_mut().0, value.to_glib_none_mut().0,
); );
@ -202,8 +192,8 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
fn set_property_qos(&self, qos: bool) { fn set_property_qos(&self, qos: bool) {
unsafe { unsafe {
gobject_sys::g_object_set_property( glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject, self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _, b"qos\0".as_ptr() as *const _,
Value::from(&qos).to_glib_none().0, Value::from(&qos).to_glib_none().0,
); );
@ -220,9 +210,9 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
P, P,
F: Fn(&P) + Send + Sync + 'static, F: Fn(&P) + Send + Sync + 'static,
>( >(
this: *mut gst_video_sys::GstVideoEncoder, this: *mut ffi::GstVideoEncoder,
_param_spec: glib_sys::gpointer, _param_spec: glib::ffi::gpointer,
f: glib_sys::gpointer, f: glib::ffi::gpointer,
) where ) where
P: IsA<VideoEncoder>, P: IsA<VideoEncoder>,
{ {
@ -247,9 +237,9 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
f: F, f: F,
) -> SignalHandlerId { ) -> SignalHandlerId {
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>( unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_video_sys::GstVideoEncoder, this: *mut ffi::GstVideoEncoder,
_param_spec: glib_sys::gpointer, _param_spec: glib::ffi::gpointer,
f: glib_sys::gpointer, f: glib::ffi::gpointer,
) where ) where
P: IsA<VideoEncoder>, P: IsA<VideoEncoder>,
{ {

View file

@ -3,15 +3,12 @@
// DO NOT EDIT // DO NOT EDIT
use glib::translate::*; use glib::translate::*;
use gst;
use gst_base;
use gst_video_sys;
glib_wrapper! { glib::glib_wrapper! {
pub struct VideoFilter(Object<gst_video_sys::GstVideoFilter, gst_video_sys::GstVideoFilterClass>) @extends gst_base::BaseTransform, gst::Element, gst::Object; pub struct VideoFilter(Object<ffi::GstVideoFilter, ffi::GstVideoFilterClass>) @extends gst_base::BaseTransform, gst::Element, gst::Object;
match fn { match fn {
get_type => || gst_video_sys::gst_video_filter_get_type(), get_type => || ffi::gst_video_filter_get_type(),
} }
} }

View file

@ -2,16 +2,14 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
use glib;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst_video_sys;
glib_wrapper! { glib::glib_wrapper! {
pub struct VideoOverlay(Interface<gst_video_sys::GstVideoOverlay>); pub struct VideoOverlay(Interface<ffi::GstVideoOverlay>);
match fn { match fn {
get_type => || gst_video_sys::gst_video_overlay_get_type(), get_type => || ffi::gst_video_overlay_get_type(),
} }
} }
@ -19,13 +17,13 @@ impl VideoOverlay {
//#[cfg(any(feature = "v1_14", feature = "dox"))] //#[cfg(any(feature = "v1_14", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
//pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) { //pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) {
// unsafe { TODO: call gst_video_sys:gst_video_overlay_install_properties() } // unsafe { TODO: call ffi:gst_video_overlay_install_properties() }
//} //}
//#[cfg(any(feature = "v1_14", feature = "dox"))] //#[cfg(any(feature = "v1_14", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
//pub fn set_property<P: IsA<glib::Object>>(object: &P, last_prop_id: i32, property_id: u32, value: /*Ignored*/&glib::Value) -> bool { //pub fn set_property<P: IsA<glib::Object>>(object: &P, last_prop_id: i32, property_id: u32, value: /*Ignored*/&glib::Value) -> bool {
// unsafe { TODO: call gst_video_sys:gst_video_overlay_set_property() } // unsafe { TODO: call ffi:gst_video_overlay_set_property() }
//} //}
} }
@ -57,17 +55,17 @@ pub trait VideoOverlayExt: 'static {
impl<O: IsA<VideoOverlay>> VideoOverlayExt for O { impl<O: IsA<VideoOverlay>> VideoOverlayExt for O {
fn expose(&self) { fn expose(&self) {
unsafe { unsafe {
gst_video_sys::gst_video_overlay_expose(self.as_ref().to_glib_none().0); ffi::gst_video_overlay_expose(self.as_ref().to_glib_none().0);
} }
} }
//fn got_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) { //fn got_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) {
// unsafe { TODO: call gst_video_sys:gst_video_overlay_got_window_handle() } // unsafe { TODO: call ffi:gst_video_overlay_got_window_handle() }
//} //}
fn handle_events(&self, handle_events: bool) { fn handle_events(&self, handle_events: bool) {
unsafe { unsafe {
gst_video_sys::gst_video_overlay_handle_events( ffi::gst_video_overlay_handle_events(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
handle_events.to_glib(), handle_events.to_glib(),
); );
@ -76,7 +74,7 @@ impl<O: IsA<VideoOverlay>> VideoOverlayExt for O {
fn prepare_window_handle(&self) { fn prepare_window_handle(&self) {
unsafe { unsafe {
gst_video_sys::gst_video_overlay_prepare_window_handle(self.as_ref().to_glib_none().0); ffi::gst_video_overlay_prepare_window_handle(self.as_ref().to_glib_none().0);
} }
} }
@ -88,8 +86,8 @@ impl<O: IsA<VideoOverlay>> VideoOverlayExt for O {
height: i32, height: i32,
) -> Result<(), glib::error::BoolError> { ) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib_result_from_gboolean!( glib::glib_result_from_gboolean!(
gst_video_sys::gst_video_overlay_set_render_rectangle( ffi::gst_video_overlay_set_render_rectangle(
self.as_ref().to_glib_none().0, self.as_ref().to_glib_none().0,
x, x,
y, y,
@ -102,6 +100,6 @@ impl<O: IsA<VideoOverlay>> VideoOverlayExt for O {
} }
//fn set_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) { //fn set_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) {
// unsafe { TODO: call gst_video_sys:gst_video_overlay_set_window_handle() } // unsafe { TODO: call ffi:gst_video_overlay_set_window_handle() }
//} //}
} }

View file

@ -9,19 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*; use glib::translate::*;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_base;
use gst_video_sys;
use std::boxed::Box as Box_; use std::boxed::Box as Box_;
use std::mem::transmute; use std::mem::transmute;
glib_wrapper! { glib::glib_wrapper! {
pub struct VideoSink(Object<gst_video_sys::GstVideoSink, gst_video_sys::GstVideoSinkClass>) @extends gst_base::BaseSink, gst::Element, gst::Object; pub struct VideoSink(Object<ffi::GstVideoSink, ffi::GstVideoSinkClass>) @extends gst_base::BaseSink, gst::Element, gst::Object;
match fn { match fn {
get_type => || gst_video_sys::gst_video_sink_get_type(), get_type => || ffi::gst_video_sink_get_type(),
} }
} }
@ -45,8 +40,8 @@ impl<O: IsA<VideoSink>> VideoSinkExt for O {
fn get_property_show_preroll_frame(&self) -> bool { fn get_property_show_preroll_frame(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property( glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject, self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"show-preroll-frame\0".as_ptr() as *const _, b"show-preroll-frame\0".as_ptr() as *const _,
value.to_glib_none_mut().0, value.to_glib_none_mut().0,
); );
@ -59,8 +54,8 @@ impl<O: IsA<VideoSink>> VideoSinkExt for O {
fn set_property_show_preroll_frame(&self, show_preroll_frame: bool) { fn set_property_show_preroll_frame(&self, show_preroll_frame: bool) {
unsafe { unsafe {
gobject_sys::g_object_set_property( glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject, self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"show-preroll-frame\0".as_ptr() as *const _, b"show-preroll-frame\0".as_ptr() as *const _,
Value::from(&show_preroll_frame).to_glib_none().0, Value::from(&show_preroll_frame).to_glib_none().0,
); );
@ -75,9 +70,9 @@ impl<O: IsA<VideoSink>> VideoSinkExt for O {
P, P,
F: Fn(&P) + Send + Sync + 'static, F: Fn(&P) + Send + Sync + 'static,
>( >(
this: *mut gst_video_sys::GstVideoSink, this: *mut ffi::GstVideoSink,
_param_spec: glib_sys::gpointer, _param_spec: glib::ffi::gpointer,
f: glib_sys::gpointer, f: glib::ffi::gpointer,
) where ) where
P: IsA<VideoSink>, P: IsA<VideoSink>,
{ {