gstreamer-rs/gstreamer-base/src/auto/aggregator_pad.rs
2018-12-08 14:58:14 +02:00

79 lines
2.2 KiB
Rust

// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use AggregatorPadClass;
use ffi;
use glib::object::IsA;
use glib::translate::*;
use gst;
use gst_ffi;
glib_wrapper! {
pub struct AggregatorPad(Object<ffi::GstAggregatorPad, ffi::GstAggregatorPadClass, AggregatorPadClass>): [
gst::Pad => gst_ffi::GstPad,
gst::Object => gst_ffi::GstObject,
];
match fn {
get_type => || ffi::gst_aggregator_pad_get_type(),
}
}
unsafe impl Send for AggregatorPad {}
unsafe impl Sync for AggregatorPad {}
pub trait AggregatorPadExt: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn drop_buffer(&self) -> bool;
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
fn has_buffer(&self) -> bool;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_eos(&self) -> bool;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn peek_buffer(&self) -> Option<gst::Buffer>;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn pop_buffer(&self) -> Option<gst::Buffer>;
}
impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn drop_buffer(&self) -> bool {
unsafe {
from_glib(ffi::gst_aggregator_pad_drop_buffer(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
fn has_buffer(&self) -> bool {
unsafe {
from_glib(ffi::gst_aggregator_pad_has_buffer(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_eos(&self) -> bool {
unsafe {
from_glib(ffi::gst_aggregator_pad_is_eos(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn peek_buffer(&self) -> Option<gst::Buffer> {
unsafe {
from_glib_full(ffi::gst_aggregator_pad_peek_buffer(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn pop_buffer(&self) -> Option<gst::Buffer> {
unsafe {
from_glib_full(ffi::gst_aggregator_pad_pop_buffer(self.to_glib_none().0))
}
}
}