gstreamer-base: Regenerate

This commit is contained in:
Sebastian Dröge 2020-11-21 19:59:12 +02:00
parent 9d9522016b
commit 80b4cb590e
12 changed files with 297 additions and 422 deletions

View file

@ -2,107 +2,97 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use glib;
use glib::translate::*;
use glib::ObjectExt;
use gst;
use gst_base_sys;
use std::mem;
glib_wrapper! {
pub struct Adapter(Object<gst_base_sys::GstAdapter, gst_base_sys::GstAdapterClass>);
glib::glib_wrapper! {
pub struct Adapter(Object<ffi::GstAdapter, ffi::GstAdapterClass>);
match fn {
get_type => || gst_base_sys::gst_adapter_get_type(),
get_type => || ffi::gst_adapter_get_type(),
}
}
impl Adapter {
pub fn new() -> Adapter {
assert_initialized_main_thread!();
unsafe { from_glib_full(gst_base_sys::gst_adapter_new()) }
unsafe { from_glib_full(ffi::gst_adapter_new()) }
}
pub fn available(&self) -> usize {
unsafe { gst_base_sys::gst_adapter_available(self.to_glib_none().0) }
unsafe { ffi::gst_adapter_available(self.to_glib_none().0) }
}
pub fn available_fast(&self) -> usize {
unsafe { gst_base_sys::gst_adapter_available_fast(self.to_glib_none().0) }
unsafe { ffi::gst_adapter_available_fast(self.to_glib_none().0) }
}
pub fn clear(&self) {
unsafe {
gst_base_sys::gst_adapter_clear(self.to_glib_none().0);
ffi::gst_adapter_clear(self.to_glib_none().0);
}
}
pub fn copy_bytes(&self, offset: usize, size: usize) -> Result<glib::Bytes, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_copy_bytes(
Option::<_>::from_glib_full(ffi::gst_adapter_copy_bytes(
self.to_glib_none().0,
offset,
size,
))
.ok_or_else(|| glib_bool_error!("Failed to copy bytes"))
.ok_or_else(|| glib::glib_bool_error!("Failed to copy bytes"))
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn distance_from_discont(&self) -> u64 {
unsafe { gst_base_sys::gst_adapter_distance_from_discont(self.to_glib_none().0) }
unsafe { ffi::gst_adapter_distance_from_discont(self.to_glib_none().0) }
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn dts_at_discont(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_adapter_dts_at_discont(
self.to_glib_none().0,
))
}
unsafe { from_glib(ffi::gst_adapter_dts_at_discont(self.to_glib_none().0)) }
}
pub fn flush(&self, flush: usize) {
unsafe {
gst_base_sys::gst_adapter_flush(self.to_glib_none().0, flush);
ffi::gst_adapter_flush(self.to_glib_none().0, flush);
}
}
pub fn get_buffer(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_get_buffer(
self.to_glib_none().0,
nbytes,
))
.ok_or_else(|| glib_bool_error!("Failed to get buffer"))
Option::<_>::from_glib_full(ffi::gst_adapter_get_buffer(self.to_glib_none().0, nbytes))
.ok_or_else(|| glib::glib_bool_error!("Failed to get buffer"))
}
}
pub fn get_buffer_fast(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_get_buffer_fast(
Option::<_>::from_glib_full(ffi::gst_adapter_get_buffer_fast(
self.to_glib_none().0,
nbytes,
))
.ok_or_else(|| glib_bool_error!("Failed to get buffer"))
.ok_or_else(|| glib::glib_bool_error!("Failed to get buffer"))
}
}
pub fn get_buffer_list(&self, nbytes: usize) -> Result<gst::BufferList, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_get_buffer_list(
Option::<_>::from_glib_full(ffi::gst_adapter_get_buffer_list(
self.to_glib_none().0,
nbytes,
))
.ok_or_else(|| glib_bool_error!("Failed to get buffer list"))
.ok_or_else(|| glib::glib_bool_error!("Failed to get buffer list"))
}
}
pub fn get_list(&self, nbytes: usize) -> Vec<gst::Buffer> {
unsafe {
FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_get_list(
FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_get_list(
self.to_glib_none().0,
nbytes,
))
@ -111,13 +101,7 @@ impl Adapter {
pub fn masked_scan_uint32(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> isize {
unsafe {
gst_base_sys::gst_adapter_masked_scan_uint32(
self.to_glib_none().0,
mask,
pattern,
offset,
size,
)
ffi::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size)
}
}
@ -130,7 +114,7 @@ impl Adapter {
) -> (isize, u32) {
unsafe {
let mut value = mem::MaybeUninit::uninit();
let ret = gst_base_sys::gst_adapter_masked_scan_uint32_peek(
let ret = ffi::gst_adapter_masked_scan_uint32_peek(
self.to_glib_none().0,
mask,
pattern,
@ -146,13 +130,13 @@ impl Adapter {
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn offset_at_discont(&self) -> u64 {
unsafe { gst_base_sys::gst_adapter_offset_at_discont(self.to_glib_none().0) }
unsafe { ffi::gst_adapter_offset_at_discont(self.to_glib_none().0) }
}
pub fn prev_dts(&self) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts(
let ret = from_glib(ffi::gst_adapter_prev_dts(
self.to_glib_none().0,
distance.as_mut_ptr(),
));
@ -164,7 +148,7 @@ impl Adapter {
pub fn prev_dts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts_at_offset(
let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset(
self.to_glib_none().0,
offset,
distance.as_mut_ptr(),
@ -179,8 +163,7 @@ impl Adapter {
pub fn prev_offset(&self) -> (u64, u64) {
unsafe {
let mut distance = mem::MaybeUninit::uninit();
let ret =
gst_base_sys::gst_adapter_prev_offset(self.to_glib_none().0, distance.as_mut_ptr());
let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, distance.as_mut_ptr());
let distance = distance.assume_init();
(ret, distance)
}
@ -189,7 +172,7 @@ impl Adapter {
pub fn prev_pts(&self) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts(
let ret = from_glib(ffi::gst_adapter_prev_pts(
self.to_glib_none().0,
distance.as_mut_ptr(),
));
@ -201,7 +184,7 @@ impl Adapter {
pub fn prev_pts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::MaybeUninit::uninit();
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts_at_offset(
let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset(
self.to_glib_none().0,
offset,
distance.as_mut_ptr(),
@ -214,46 +197,39 @@ impl Adapter {
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
pub fn pts_at_discont(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_adapter_pts_at_discont(
self.to_glib_none().0,
))
}
unsafe { from_glib(ffi::gst_adapter_pts_at_discont(self.to_glib_none().0)) }
}
pub fn take_buffer(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_take_buffer(
self.to_glib_none().0,
nbytes,
))
.ok_or_else(|| glib_bool_error!("Failed to take buffer"))
Option::<_>::from_glib_full(ffi::gst_adapter_take_buffer(self.to_glib_none().0, nbytes))
.ok_or_else(|| glib::glib_bool_error!("Failed to take buffer"))
}
}
pub fn take_buffer_fast(&self, nbytes: usize) -> Result<gst::Buffer, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_take_buffer_fast(
Option::<_>::from_glib_full(ffi::gst_adapter_take_buffer_fast(
self.to_glib_none().0,
nbytes,
))
.ok_or_else(|| glib_bool_error!("Failed to take buffer"))
.ok_or_else(|| glib::glib_bool_error!("Failed to take buffer"))
}
}
pub fn take_buffer_list(&self, nbytes: usize) -> Result<gst::BufferList, glib::BoolError> {
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_adapter_take_buffer_list(
Option::<_>::from_glib_full(ffi::gst_adapter_take_buffer_list(
self.to_glib_none().0,
nbytes,
))
.ok_or_else(|| glib_bool_error!("Failed to take buffer list"))
.ok_or_else(|| glib::glib_bool_error!("Failed to take buffer list"))
}
}
pub fn take_list(&self, nbytes: usize) -> Vec<gst::Buffer> {
unsafe {
FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_take_list(
FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_take_list(
self.to_glib_none().0,
nbytes,
))

View file

@ -2,6 +2,12 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use crate::AggregatorPad;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use crate::AggregatorStartTimeSelection;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
@ -9,24 +15,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_base_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use AggregatorPad;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
use AggregatorStartTimeSelection;
glib_wrapper! {
pub struct Aggregator(Object<gst_base_sys::GstAggregator, gst_base_sys::GstAggregatorClass>) @extends gst::Element, gst::Object;
glib::glib_wrapper! {
pub struct Aggregator(Object<ffi::GstAggregator, ffi::GstAggregatorClass>) @extends gst::Element, gst::Object;
match fn {
get_type => || gst_base_sys::gst_aggregator_get_type(),
get_type => || ffi::gst_aggregator_get_type(),
}
}
@ -127,14 +123,14 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
// unsafe { TODO: call gst_base_sys:gst_aggregator_get_allocator() }
// unsafe { TODO: call ffi:gst_aggregator_get_allocator() }
//}
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
unsafe {
from_glib_full(gst_base_sys::gst_aggregator_get_buffer_pool(
from_glib_full(ffi::gst_aggregator_get_buffer_pool(
self.as_ref().to_glib_none().0,
))
}
@ -144,7 +140,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn get_latency(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_aggregator_get_latency(
from_glib(ffi::gst_aggregator_get_latency(
self.as_ref().to_glib_none().0,
))
}
@ -154,7 +150,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn negotiate(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_aggregator_negotiate(
from_glib(ffi::gst_aggregator_negotiate(
self.as_ref().to_glib_none().0,
))
}
@ -164,7 +160,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn peek_next_sample<P: IsA<AggregatorPad>>(&self, pad: &P) -> Option<gst::Sample> {
unsafe {
from_glib_full(gst_base_sys::gst_aggregator_peek_next_sample(
from_glib_full(ffi::gst_aggregator_peek_next_sample(
self.as_ref().to_glib_none().0,
pad.as_ref().to_glib_none().0,
))
@ -175,7 +171,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) {
unsafe {
gst_base_sys::gst_aggregator_set_latency(
ffi::gst_aggregator_set_latency(
self.as_ref().to_glib_none().0,
min_latency.to_glib(),
max_latency.to_glib(),
@ -187,10 +183,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn set_src_caps(&self, caps: &gst::Caps) {
unsafe {
gst_base_sys::gst_aggregator_set_src_caps(
self.as_ref().to_glib_none().0,
caps.to_glib_none().0,
);
ffi::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
}
}
@ -198,7 +191,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn simple_get_next_time(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_aggregator_simple_get_next_time(
from_glib(ffi::gst_aggregator_simple_get_next_time(
self.as_ref().to_glib_none().0,
))
}
@ -207,7 +200,7 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
//fn update_segment(&self, segment: /*Ignored*/&gst::Segment) {
// unsafe { TODO: call gst_base_sys:gst_aggregator_update_segment() }
// unsafe { TODO: call ffi:gst_aggregator_update_segment() }
//}
#[cfg(any(feature = "v1_18", feature = "dox"))]
@ -215,8 +208,8 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
fn get_property_emit_signals(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"emit-signals\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -231,8 +224,8 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn set_property_emit_signals(&self, emit_signals: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"emit-signals\0".as_ptr() as *const _,
Value::from(&emit_signals).to_glib_none().0,
);
@ -242,8 +235,8 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
fn get_property_start_time(&self) -> u64 {
unsafe {
let mut value = Value::from_type(<u64 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"start-time\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -256,8 +249,8 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
fn set_property_start_time(&self, start_time: u64) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"start-time\0".as_ptr() as *const _,
Value::from(&start_time).to_glib_none().0,
);
@ -270,8 +263,8 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
unsafe {
let mut value =
Value::from_type(<AggregatorStartTimeSelection as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"start-time-selection\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -289,8 +282,8 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
start_time_selection: AggregatorStartTimeSelection,
) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"start-time-selection\0".as_ptr() as *const _,
Value::from(&start_time_selection).to_glib_none().0,
);
@ -310,9 +303,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_emit_signals_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstAggregator,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstAggregator,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<Aggregator>,
{
@ -339,9 +332,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstAggregator,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstAggregator,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<Aggregator>,
{
@ -366,9 +359,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_start_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstAggregator,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstAggregator,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<Aggregator>,
{
@ -398,9 +391,9 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_base_sys::GstAggregator,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstAggregator,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<Aggregator>,
{

View file

@ -13,21 +13,14 @@ use glib::StaticType;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use glib::Value;
use glib_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
use gobject_sys;
use gst;
use gst_base_sys;
use gst_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct AggregatorPad(Object<gst_base_sys::GstAggregatorPad, gst_base_sys::GstAggregatorPadClass>) @extends gst::Pad, gst::Object;
glib::glib_wrapper! {
pub struct AggregatorPad(Object<ffi::GstAggregatorPad, ffi::GstAggregatorPadClass>) @extends gst::Pad, gst::Object;
match fn {
get_type => || gst_base_sys::gst_aggregator_pad_get_type(),
get_type => || ffi::gst_aggregator_pad_get_type(),
}
}
@ -83,7 +76,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn drop_buffer(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_aggregator_pad_drop_buffer(
from_glib(ffi::gst_aggregator_pad_drop_buffer(
self.as_ref().to_glib_none().0,
))
}
@ -93,7 +86,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
fn has_buffer(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_aggregator_pad_has_buffer(
from_glib(ffi::gst_aggregator_pad_has_buffer(
self.as_ref().to_glib_none().0,
))
}
@ -103,7 +96,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn is_eos(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_aggregator_pad_is_eos(
from_glib(ffi::gst_aggregator_pad_is_eos(
self.as_ref().to_glib_none().0,
))
}
@ -113,7 +106,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn peek_buffer(&self) -> Option<gst::Buffer> {
unsafe {
from_glib_full(gst_base_sys::gst_aggregator_pad_peek_buffer(
from_glib_full(ffi::gst_aggregator_pad_peek_buffer(
self.as_ref().to_glib_none().0,
))
}
@ -123,7 +116,7 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
fn pop_buffer(&self) -> Option<gst::Buffer> {
unsafe {
from_glib_full(gst_base_sys::gst_aggregator_pad_pop_buffer(
from_glib_full(ffi::gst_aggregator_pad_pop_buffer(
self.as_ref().to_glib_none().0,
))
}
@ -134,8 +127,8 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
fn get_property_emit_signals(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"emit-signals\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -150,8 +143,8 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_property_emit_signals(&self, emit_signals: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"emit-signals\0".as_ptr() as *const _,
Value::from(&emit_signals).to_glib_none().0,
);
@ -166,9 +159,9 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
P,
F: Fn(&P, &gst::Buffer) + Send + Sync + 'static,
>(
this: *mut gst_base_sys::GstAggregatorPad,
object: *mut gst_sys::GstBuffer,
f: glib_sys::gpointer,
this: *mut ffi::GstAggregatorPad,
object: *mut gst::ffi::GstBuffer,
f: glib::ffi::gpointer,
) where
P: IsA<AggregatorPad>,
{
@ -198,9 +191,9 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_emit_signals_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstAggregatorPad,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstAggregatorPad,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<AggregatorPad>,
{

View file

@ -9,18 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_base_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct BaseParse(Object<gst_base_sys::GstBaseParse, gst_base_sys::GstBaseParseClass>) @extends gst::Element, gst::Object;
glib::glib_wrapper! {
pub struct BaseParse(Object<ffi::GstBaseParse, ffi::GstBaseParseClass>) @extends gst::Element, gst::Object;
match fn {
get_type => || gst_base_sys::gst_base_parse_get_type(),
get_type => || ffi::gst_base_parse_get_type(),
}
}
@ -69,7 +65,7 @@ pub trait BaseParseExt: 'static {
impl<O: IsA<BaseParse>> BaseParseExt for O {
fn add_index_entry(&self, offset: u64, ts: gst::ClockTime, key: bool, force: bool) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_parse_add_index_entry(
from_glib(ffi::gst_base_parse_add_index_entry(
self.as_ref().to_glib_none().0,
offset,
ts.to_glib(),
@ -83,13 +79,13 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn drain(&self) {
unsafe {
gst_base_sys::gst_base_parse_drain(self.as_ref().to_glib_none().0);
ffi::gst_base_parse_drain(self.as_ref().to_glib_none().0);
}
}
fn merge_tags(&self, tags: Option<&gst::TagList>, mode: gst::TagMergeMode) {
unsafe {
gst_base_sys::gst_base_parse_merge_tags(
ffi::gst_base_parse_merge_tags(
self.as_ref().to_glib_none().0,
tags.to_glib_none().0,
mode.to_glib(),
@ -99,16 +95,13 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
fn set_average_bitrate(&self, bitrate: u32) {
unsafe {
gst_base_sys::gst_base_parse_set_average_bitrate(
self.as_ref().to_glib_none().0,
bitrate,
);
ffi::gst_base_parse_set_average_bitrate(self.as_ref().to_glib_none().0, bitrate);
}
}
fn set_has_timing_info(&self, has_timing: bool) {
unsafe {
gst_base_sys::gst_base_parse_set_has_timing_info(
ffi::gst_base_parse_set_has_timing_info(
self.as_ref().to_glib_none().0,
has_timing.to_glib(),
);
@ -117,16 +110,13 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
fn set_infer_ts(&self, infer_ts: bool) {
unsafe {
gst_base_sys::gst_base_parse_set_infer_ts(
self.as_ref().to_glib_none().0,
infer_ts.to_glib(),
);
ffi::gst_base_parse_set_infer_ts(self.as_ref().to_glib_none().0, infer_ts.to_glib());
}
}
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) {
unsafe {
gst_base_sys::gst_base_parse_set_latency(
ffi::gst_base_parse_set_latency(
self.as_ref().to_glib_none().0,
min_latency.to_glib(),
max_latency.to_glib(),
@ -136,16 +126,13 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
fn set_min_frame_size(&self, min_size: u32) {
unsafe {
gst_base_sys::gst_base_parse_set_min_frame_size(
self.as_ref().to_glib_none().0,
min_size,
);
ffi::gst_base_parse_set_min_frame_size(self.as_ref().to_glib_none().0, min_size);
}
}
fn set_passthrough(&self, passthrough: bool) {
unsafe {
gst_base_sys::gst_base_parse_set_passthrough(
ffi::gst_base_parse_set_passthrough(
self.as_ref().to_glib_none().0,
passthrough.to_glib(),
);
@ -154,7 +141,7 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
fn set_pts_interpolation(&self, pts_interpolate: bool) {
unsafe {
gst_base_sys::gst_base_parse_set_pts_interpolation(
ffi::gst_base_parse_set_pts_interpolation(
self.as_ref().to_glib_none().0,
pts_interpolate.to_glib(),
);
@ -163,24 +150,21 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
fn set_syncable(&self, syncable: bool) {
unsafe {
gst_base_sys::gst_base_parse_set_syncable(
self.as_ref().to_glib_none().0,
syncable.to_glib(),
);
ffi::gst_base_parse_set_syncable(self.as_ref().to_glib_none().0, syncable.to_glib());
}
}
fn set_ts_at_offset(&self, offset: usize) {
unsafe {
gst_base_sys::gst_base_parse_set_ts_at_offset(self.as_ref().to_glib_none().0, offset);
ffi::gst_base_parse_set_ts_at_offset(self.as_ref().to_glib_none().0, offset);
}
}
fn get_property_disable_passthrough(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"disable-passthrough\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -193,8 +177,8 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
fn set_property_disable_passthrough(&self, disable_passthrough: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"disable-passthrough\0".as_ptr() as *const _,
Value::from(&disable_passthrough).to_glib_none().0,
);
@ -209,9 +193,9 @@ impl<O: IsA<BaseParse>> BaseParseExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_base_sys::GstBaseParse,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseParse,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseParse>,
{

View file

@ -9,18 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_base_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct BaseSink(Object<gst_base_sys::GstBaseSink, gst_base_sys::GstBaseSinkClass>) @extends gst::Element, gst::Object;
glib::glib_wrapper! {
pub struct BaseSink(Object<ffi::GstBaseSink, ffi::GstBaseSinkClass>) @extends gst::Element, gst::Object;
match fn {
get_type => || gst_base_sys::gst_base_sink_get_type(),
get_type => || ffi::gst_base_sink_get_type(),
}
}
@ -98,7 +94,7 @@ pub trait BaseSinkExt: 'static {
fn get_property_async(&self) -> bool;
fn set_property_async(&self, async: bool);
fn set_property_async(&self, async_: bool);
fn get_property_enable_last_sample(&self) -> bool;
@ -180,18 +176,18 @@ pub trait BaseSinkExt: 'static {
impl<O: IsA<BaseSink>> BaseSinkExt for O {
//fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn {
// unsafe { TODO: call gst_base_sys:gst_base_sink_do_preroll() }
// unsafe { TODO: call ffi:gst_base_sink_do_preroll() }
//}
fn get_blocksize(&self) -> u32 {
unsafe { gst_base_sys::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) }
unsafe { ffi::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) }
}
#[cfg(any(feature = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn get_drop_out_of_segment(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_sink_get_drop_out_of_segment(
from_glib(ffi::gst_base_sink_get_drop_out_of_segment(
self.as_ref().to_glib_none().0,
))
}
@ -199,7 +195,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn get_last_sample(&self) -> Option<gst::Sample> {
unsafe {
from_glib_full(gst_base_sys::gst_base_sink_get_last_sample(
from_glib_full(ffi::gst_base_sink_get_last_sample(
self.as_ref().to_glib_none().0,
))
}
@ -207,25 +203,25 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn get_latency(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_base_sink_get_latency(
from_glib(ffi::gst_base_sink_get_latency(
self.as_ref().to_glib_none().0,
))
}
}
fn get_max_bitrate(&self) -> u64 {
unsafe { gst_base_sys::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0) }
unsafe { ffi::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0) }
}
fn get_max_lateness(&self) -> i64 {
unsafe { gst_base_sys::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0) }
unsafe { ffi::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0) }
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn get_processing_deadline(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_base_sink_get_processing_deadline(
from_glib(ffi::gst_base_sink_get_processing_deadline(
self.as_ref().to_glib_none().0,
))
}
@ -233,7 +229,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn get_render_delay(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_base_sink_get_render_delay(
from_glib(ffi::gst_base_sink_get_render_delay(
self.as_ref().to_glib_none().0,
))
}
@ -242,32 +238,24 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn get_stats(&self) -> Option<gst::Structure> {
unsafe {
from_glib_full(gst_base_sys::gst_base_sink_get_stats(
self.as_ref().to_glib_none().0,
))
}
unsafe { from_glib_full(ffi::gst_base_sink_get_stats(self.as_ref().to_glib_none().0)) }
}
fn get_sync(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_sink_get_sync(
self.as_ref().to_glib_none().0,
))
}
unsafe { from_glib(ffi::gst_base_sink_get_sync(self.as_ref().to_glib_none().0)) }
}
fn get_throttle_time(&self) -> u64 {
unsafe { gst_base_sys::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0) }
unsafe { ffi::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0) }
}
fn get_ts_offset(&self) -> gst::ClockTimeDiff {
unsafe { gst_base_sys::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0) }
unsafe { ffi::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0) }
}
fn is_async_enabled(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_sink_is_async_enabled(
from_glib(ffi::gst_base_sink_is_async_enabled(
self.as_ref().to_glib_none().0,
))
}
@ -275,7 +263,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn is_last_sample_enabled(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_sink_is_last_sample_enabled(
from_glib(ffi::gst_base_sink_is_last_sample_enabled(
self.as_ref().to_glib_none().0,
))
}
@ -283,7 +271,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn is_qos_enabled(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_sink_is_qos_enabled(
from_glib(ffi::gst_base_sink_is_qos_enabled(
self.as_ref().to_glib_none().0,
))
}
@ -291,16 +279,13 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn set_async_enabled(&self, enabled: bool) {
unsafe {
gst_base_sys::gst_base_sink_set_async_enabled(
self.as_ref().to_glib_none().0,
enabled.to_glib(),
);
ffi::gst_base_sink_set_async_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
}
}
fn set_blocksize(&self, blocksize: u32) {
unsafe {
gst_base_sys::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
ffi::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
}
}
@ -308,7 +293,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) {
unsafe {
gst_base_sys::gst_base_sink_set_drop_out_of_segment(
ffi::gst_base_sink_set_drop_out_of_segment(
self.as_ref().to_glib_none().0,
drop_out_of_segment.to_glib(),
);
@ -317,7 +302,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn set_last_sample_enabled(&self, enabled: bool) {
unsafe {
gst_base_sys::gst_base_sink_set_last_sample_enabled(
ffi::gst_base_sink_set_last_sample_enabled(
self.as_ref().to_glib_none().0,
enabled.to_glib(),
);
@ -326,19 +311,13 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn set_max_bitrate(&self, max_bitrate: u64) {
unsafe {
gst_base_sys::gst_base_sink_set_max_bitrate(
self.as_ref().to_glib_none().0,
max_bitrate,
);
ffi::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate);
}
}
fn set_max_lateness(&self, max_lateness: i64) {
unsafe {
gst_base_sys::gst_base_sink_set_max_lateness(
self.as_ref().to_glib_none().0,
max_lateness,
);
ffi::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness);
}
}
@ -346,7 +325,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
fn set_processing_deadline(&self, processing_deadline: gst::ClockTime) {
unsafe {
gst_base_sys::gst_base_sink_set_processing_deadline(
ffi::gst_base_sink_set_processing_deadline(
self.as_ref().to_glib_none().0,
processing_deadline.to_glib(),
);
@ -355,45 +334,39 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn set_qos_enabled(&self, enabled: bool) {
unsafe {
gst_base_sys::gst_base_sink_set_qos_enabled(
self.as_ref().to_glib_none().0,
enabled.to_glib(),
);
ffi::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
}
}
fn set_render_delay(&self, delay: gst::ClockTime) {
unsafe {
gst_base_sys::gst_base_sink_set_render_delay(
self.as_ref().to_glib_none().0,
delay.to_glib(),
);
ffi::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.to_glib());
}
}
fn set_sync(&self, sync: bool) {
unsafe {
gst_base_sys::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.to_glib());
ffi::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.to_glib());
}
}
fn set_throttle_time(&self, throttle: u64) {
unsafe {
gst_base_sys::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle);
ffi::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle);
}
}
fn set_ts_offset(&self, offset: gst::ClockTimeDiff) {
unsafe {
gst_base_sys::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset);
ffi::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset);
}
}
fn get_property_async(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"async\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -404,12 +377,12 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
}
}
fn set_property_async(&self, async: bool) {
fn set_property_async(&self, async_: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"async\0".as_ptr() as *const _,
Value::from(&async).to_glib_none().0,
Value::from(&async_).to_glib_none().0,
);
}
}
@ -417,8 +390,8 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn get_property_enable_last_sample(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"enable-last-sample\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -431,8 +404,8 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn set_property_enable_last_sample(&self, enable_last_sample: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"enable-last-sample\0".as_ptr() as *const _,
Value::from(&enable_last_sample).to_glib_none().0,
);
@ -442,8 +415,8 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn get_property_qos(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -456,8 +429,8 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
fn set_property_qos(&self, qos: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _,
Value::from(&qos).to_glib_none().0,
);
@ -469,9 +442,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_async_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -496,9 +469,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -526,9 +499,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -553,9 +526,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_last_sample_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -580,9 +553,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_max_bitrate_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -607,9 +580,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_max_lateness_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -639,9 +612,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -666,9 +639,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -693,9 +666,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_render_delay_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -722,9 +695,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_stats_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -749,9 +722,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_sync_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -776,9 +749,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_throttle_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{
@ -803,9 +776,9 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_ts_offset_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSink,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSink,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSink>,
{

View file

@ -2,7 +2,6 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use glib;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
@ -10,18 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_base_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct BaseSrc(Object<gst_base_sys::GstBaseSrc, gst_base_sys::GstBaseSrcClass>) @extends gst::Element, gst::Object;
glib::glib_wrapper! {
pub struct BaseSrc(Object<ffi::GstBaseSrc, ffi::GstBaseSrcClass>) @extends gst::Element, gst::Object;
match fn {
get_type => || gst_base_sys::gst_base_src_get_type(),
get_type => || ffi::gst_base_src_get_type(),
}
}
@ -50,7 +45,7 @@ pub trait BaseSrcExt: 'static {
#[cfg_attr(feature = "v1_18", deprecated)]
fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool;
fn set_async(&self, async: bool);
fn set_async(&self, async_: bool);
fn set_automatic_eos(&self, automatic_eos: bool);
@ -97,16 +92,16 @@ pub trait BaseSrcExt: 'static {
impl<O: IsA<BaseSrc>> BaseSrcExt for O {
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
// unsafe { TODO: call gst_base_sys:gst_base_src_get_allocator() }
// unsafe { TODO: call ffi:gst_base_src_get_allocator() }
//}
fn get_blocksize(&self) -> u32 {
unsafe { gst_base_sys::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0) }
unsafe { ffi::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0) }
}
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
unsafe {
from_glib_full(gst_base_sys::gst_base_src_get_buffer_pool(
from_glib_full(ffi::gst_base_src_get_buffer_pool(
self.as_ref().to_glib_none().0,
))
}
@ -114,41 +109,29 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn get_do_timestamp(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_src_get_do_timestamp(
from_glib(ffi::gst_base_src_get_do_timestamp(
self.as_ref().to_glib_none().0,
))
}
}
fn is_async(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_src_is_async(
self.as_ref().to_glib_none().0,
))
}
unsafe { from_glib(ffi::gst_base_src_is_async(self.as_ref().to_glib_none().0)) }
}
fn is_live(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_src_is_live(
self.as_ref().to_glib_none().0,
))
}
unsafe { from_glib(ffi::gst_base_src_is_live(self.as_ref().to_glib_none().0)) }
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn negotiate(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_src_negotiate(
self.as_ref().to_glib_none().0,
))
}
unsafe { from_glib(ffi::gst_base_src_negotiate(self.as_ref().to_glib_none().0)) }
}
fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_src_new_seamless_segment(
from_glib(ffi::gst_base_src_new_seamless_segment(
self.as_ref().to_glib_none().0,
start,
stop,
@ -157,15 +140,15 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
}
}
fn set_async(&self, async: bool) {
fn set_async(&self, async_: bool) {
unsafe {
gst_base_sys::gst_base_src_set_async(self.as_ref().to_glib_none().0, async.to_glib());
ffi::gst_base_src_set_async(self.as_ref().to_glib_none().0, async_.to_glib());
}
}
fn set_automatic_eos(&self, automatic_eos: bool) {
unsafe {
gst_base_sys::gst_base_src_set_automatic_eos(
ffi::gst_base_src_set_automatic_eos(
self.as_ref().to_glib_none().0,
automatic_eos.to_glib(),
);
@ -174,17 +157,14 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn set_blocksize(&self, blocksize: u32) {
unsafe {
gst_base_sys::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
ffi::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
}
}
fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
unsafe {
glib_result_from_gboolean!(
gst_base_sys::gst_base_src_set_caps(
self.as_ref().to_glib_none().0,
caps.to_glib_none().0
),
glib::glib_result_from_gboolean!(
ffi::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0),
"Failed to set caps"
)
}
@ -192,39 +172,33 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn set_do_timestamp(&self, timestamp: bool) {
unsafe {
gst_base_sys::gst_base_src_set_do_timestamp(
self.as_ref().to_glib_none().0,
timestamp.to_glib(),
);
ffi::gst_base_src_set_do_timestamp(self.as_ref().to_glib_none().0, timestamp.to_glib());
}
}
fn set_dynamic_size(&self, dynamic: bool) {
unsafe {
gst_base_sys::gst_base_src_set_dynamic_size(
self.as_ref().to_glib_none().0,
dynamic.to_glib(),
);
ffi::gst_base_src_set_dynamic_size(self.as_ref().to_glib_none().0, dynamic.to_glib());
}
}
fn set_format(&self, format: gst::Format) {
unsafe {
gst_base_sys::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.to_glib());
ffi::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.to_glib());
}
}
fn set_live(&self, live: bool) {
unsafe {
gst_base_sys::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.to_glib());
ffi::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.to_glib());
}
}
fn get_property_num_buffers(&self) -> i32 {
unsafe {
let mut value = Value::from_type(<i32 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"num-buffers\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -237,8 +211,8 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn set_property_num_buffers(&self, num_buffers: i32) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"num-buffers\0".as_ptr() as *const _,
Value::from(&num_buffers).to_glib_none().0,
);
@ -248,8 +222,8 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn get_property_typefind(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"typefind\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -262,8 +236,8 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
fn set_property_typefind(&self, typefind: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"typefind\0".as_ptr() as *const _,
Value::from(&typefind).to_glib_none().0,
);
@ -275,9 +249,9 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSrc,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSrc,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSrc>,
{
@ -302,9 +276,9 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_do_timestamp_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSrc,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSrc,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSrc>,
{
@ -329,9 +303,9 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_num_buffers_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSrc,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSrc,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSrc>,
{
@ -356,9 +330,9 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_typefind_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseSrc,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseSrc,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseSrc>,
{

View file

@ -2,7 +2,6 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use glib;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
@ -10,18 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_base_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct BaseTransform(Object<gst_base_sys::GstBaseTransform, gst_base_sys::GstBaseTransformClass>) @extends gst::Element, gst::Object;
glib::glib_wrapper! {
pub struct BaseTransform(Object<ffi::GstBaseTransform, ffi::GstBaseTransformClass>) @extends gst::Element, gst::Object;
match fn {
get_type => || gst_base_sys::gst_base_transform_get_type(),
get_type => || ffi::gst_base_transform_get_type(),
}
}
@ -75,12 +70,12 @@ pub trait BaseTransformExt: 'static {
impl<O: IsA<BaseTransform>> BaseTransformExt for O {
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
// unsafe { TODO: call gst_base_sys:gst_base_transform_get_allocator() }
// unsafe { TODO: call ffi:gst_base_transform_get_allocator() }
//}
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
unsafe {
from_glib_full(gst_base_sys::gst_base_transform_get_buffer_pool(
from_glib_full(ffi::gst_base_transform_get_buffer_pool(
self.as_ref().to_glib_none().0,
))
}
@ -88,7 +83,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn is_in_place(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_transform_is_in_place(
from_glib(ffi::gst_base_transform_is_in_place(
self.as_ref().to_glib_none().0,
))
}
@ -96,7 +91,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn is_passthrough(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_transform_is_passthrough(
from_glib(ffi::gst_base_transform_is_passthrough(
self.as_ref().to_glib_none().0,
))
}
@ -104,7 +99,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn is_qos_enabled(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_transform_is_qos_enabled(
from_glib(ffi::gst_base_transform_is_qos_enabled(
self.as_ref().to_glib_none().0,
))
}
@ -114,7 +109,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn reconfigure(&self) -> bool {
unsafe {
from_glib(gst_base_sys::gst_base_transform_reconfigure(
from_glib(ffi::gst_base_transform_reconfigure(
self.as_ref().to_glib_none().0,
))
}
@ -122,19 +117,19 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn reconfigure_sink(&self) {
unsafe {
gst_base_sys::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0);
ffi::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0);
}
}
fn reconfigure_src(&self) {
unsafe {
gst_base_sys::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0);
ffi::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0);
}
}
fn set_gap_aware(&self, gap_aware: bool) {
unsafe {
gst_base_sys::gst_base_transform_set_gap_aware(
ffi::gst_base_transform_set_gap_aware(
self.as_ref().to_glib_none().0,
gap_aware.to_glib(),
);
@ -143,7 +138,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn set_in_place(&self, in_place: bool) {
unsafe {
gst_base_sys::gst_base_transform_set_in_place(
ffi::gst_base_transform_set_in_place(
self.as_ref().to_glib_none().0,
in_place.to_glib(),
);
@ -152,7 +147,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn set_passthrough(&self, passthrough: bool) {
unsafe {
gst_base_sys::gst_base_transform_set_passthrough(
ffi::gst_base_transform_set_passthrough(
self.as_ref().to_glib_none().0,
passthrough.to_glib(),
);
@ -161,7 +156,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn set_prefer_passthrough(&self, prefer_passthrough: bool) {
unsafe {
gst_base_sys::gst_base_transform_set_prefer_passthrough(
ffi::gst_base_transform_set_prefer_passthrough(
self.as_ref().to_glib_none().0,
prefer_passthrough.to_glib(),
);
@ -170,7 +165,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn set_qos_enabled(&self, enabled: bool) {
unsafe {
gst_base_sys::gst_base_transform_set_qos_enabled(
ffi::gst_base_transform_set_qos_enabled(
self.as_ref().to_glib_none().0,
enabled.to_glib(),
);
@ -179,7 +174,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime) {
unsafe {
gst_base_sys::gst_base_transform_update_qos(
ffi::gst_base_transform_update_qos(
self.as_ref().to_glib_none().0,
proportion,
diff,
@ -190,8 +185,8 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
unsafe {
glib_result_from_gboolean!(
gst_base_sys::gst_base_transform_update_src_caps(
glib::glib_result_from_gboolean!(
ffi::gst_base_transform_update_src_caps(
self.as_ref().to_glib_none().0,
updated_caps.to_glib_none().0
),
@ -203,8 +198,8 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn get_property_qos(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -217,8 +212,8 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
fn set_property_qos(&self, qos: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"qos\0".as_ptr() as *const _,
Value::from(&qos).to_glib_none().0,
);
@ -230,9 +225,9 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_base_sys::GstBaseTransform,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstBaseTransform,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<BaseTransform>,
{

View file

@ -9,8 +9,6 @@ use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_base_sys;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
@ -28,19 +26,13 @@ pub enum AggregatorStartTimeSelection {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(hidden)]
impl ToGlib for AggregatorStartTimeSelection {
type GlibType = gst_base_sys::GstAggregatorStartTimeSelection;
type GlibType = ffi::GstAggregatorStartTimeSelection;
fn to_glib(&self) -> gst_base_sys::GstAggregatorStartTimeSelection {
fn to_glib(&self) -> ffi::GstAggregatorStartTimeSelection {
match *self {
AggregatorStartTimeSelection::Zero => {
gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_ZERO
}
AggregatorStartTimeSelection::First => {
gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_FIRST
}
AggregatorStartTimeSelection::Set => {
gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_SET
}
AggregatorStartTimeSelection::Zero => ffi::GST_AGGREGATOR_START_TIME_SELECTION_ZERO,
AggregatorStartTimeSelection::First => ffi::GST_AGGREGATOR_START_TIME_SELECTION_FIRST,
AggregatorStartTimeSelection::Set => ffi::GST_AGGREGATOR_START_TIME_SELECTION_SET,
AggregatorStartTimeSelection::__Unknown(value) => value,
}
}
@ -49,8 +41,8 @@ impl ToGlib for AggregatorStartTimeSelection {
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
#[doc(hidden)]
impl FromGlib<gst_base_sys::GstAggregatorStartTimeSelection> for AggregatorStartTimeSelection {
fn from_glib(value: gst_base_sys::GstAggregatorStartTimeSelection) -> Self {
impl FromGlib<ffi::GstAggregatorStartTimeSelection> for AggregatorStartTimeSelection {
fn from_glib(value: ffi::GstAggregatorStartTimeSelection) -> Self {
skip_assert_initialized!();
match value {
0 => AggregatorStartTimeSelection::Zero,
@ -65,7 +57,7 @@ impl FromGlib<gst_base_sys::GstAggregatorStartTimeSelection> for AggregatorStart
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl StaticType for AggregatorStartTimeSelection {
fn static_type() -> Type {
unsafe { from_glib(gst_base_sys::gst_aggregator_start_time_selection_get_type()) }
unsafe { from_glib(ffi::gst_aggregator_start_time_selection_get_type()) }
}
}
@ -81,7 +73,7 @@ impl<'a> FromValueOptional<'a> for AggregatorStartTimeSelection {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl<'a> FromValue<'a> for AggregatorStartTimeSelection {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
@ -89,6 +81,6 @@ impl<'a> FromValue<'a> for AggregatorStartTimeSelection {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
impl SetValue for AggregatorStartTimeSelection {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}

View file

@ -2,8 +2,8 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use bitflags::bitflags;
use glib::translate::*;
use gst_base_sys;
bitflags! {
pub struct BaseParseFrameFlags: u32 {
@ -17,16 +17,16 @@ bitflags! {
#[doc(hidden)]
impl ToGlib for BaseParseFrameFlags {
type GlibType = gst_base_sys::GstBaseParseFrameFlags;
type GlibType = ffi::GstBaseParseFrameFlags;
fn to_glib(&self) -> gst_base_sys::GstBaseParseFrameFlags {
fn to_glib(&self) -> ffi::GstBaseParseFrameFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<gst_base_sys::GstBaseParseFrameFlags> for BaseParseFrameFlags {
fn from_glib(value: gst_base_sys::GstBaseParseFrameFlags) -> BaseParseFrameFlags {
impl FromGlib<ffi::GstBaseParseFrameFlags> for BaseParseFrameFlags {
fn from_glib(value: ffi::GstBaseParseFrameFlags) -> BaseParseFrameFlags {
skip_assert_initialized!();
BaseParseFrameFlags::from_bits_truncate(value)
}

View file

@ -2,11 +2,8 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use glib;
use glib::object::IsA;
use glib::translate::*;
use gst;
use gst_base_sys;
pub fn type_find_helper<P: IsA<gst::Pad>>(
src: &P,
@ -14,11 +11,11 @@ pub fn type_find_helper<P: IsA<gst::Pad>>(
) -> Result<gst::Caps, glib::BoolError> {
assert_initialized_main_thread!();
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_type_find_helper(
Option::<_>::from_glib_full(ffi::gst_type_find_helper(
src.as_ref().to_glib_none().0,
size,
))
.ok_or_else(|| glib_bool_error!("Could not find type"))
.ok_or_else(|| glib::glib_bool_error!("Could not find type"))
}
}
@ -28,20 +25,20 @@ pub fn type_find_helper_for_extension<P: IsA<gst::Object>>(
) -> Result<gst::Caps, glib::BoolError> {
assert_initialized_main_thread!();
unsafe {
Option::<_>::from_glib_full(gst_base_sys::gst_type_find_helper_for_extension(
Option::<_>::from_glib_full(ffi::gst_type_find_helper_for_extension(
obj.map(|p| p.as_ref()).to_glib_none().0,
extension.to_glib_none().0,
))
.ok_or_else(|| glib_bool_error!("Could not find type"))
.ok_or_else(|| glib::glib_bool_error!("Could not find type"))
}
}
//pub fn type_find_helper_get_range<P: IsA<gst::Object>, Q: IsA<gst::Object>, R: FnMut(&gst::Object, Option<&gst::Object>, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: Option<&str>) -> (Option<gst::Caps>, gst::TypeFindProbability) {
// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range() }
// unsafe { TODO: call ffi:gst_type_find_helper_get_range() }
//}
//#[cfg(any(feature = "v1_14_3", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_3")))]
//pub fn type_find_helper_get_range_full<P: IsA<gst::Object>, Q: IsA<gst::Object>, R: FnMut(&gst::Object, Option<&gst::Object>, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: Option<&str>) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) {
// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range_full() }
// unsafe { TODO: call ffi:gst_type_find_helper_get_range_full() }
//}

View file

@ -2,16 +2,14 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::BaseSrc;
use glib::translate::*;
use gst;
use gst_base_sys;
use BaseSrc;
glib_wrapper! {
pub struct PushSrc(Object<gst_base_sys::GstPushSrc, gst_base_sys::GstPushSrcClass>) @extends BaseSrc, gst::Element, gst::Object;
glib::glib_wrapper! {
pub struct PushSrc(Object<ffi::GstPushSrc, ffi::GstPushSrcClass>) @extends BaseSrc, gst::Element, gst::Object;
match fn {
get_type => || gst_base_sys::gst_push_src_get_type(),
get_type => || ffi::gst_push_src_get_type(),
}
}

View file

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