forked from mirrors/gstreamer-rs
Aggregator is only available from gstreamer-base since 1.14
This commit is contained in:
parent
0eb6bcf0c0
commit
c7fa48984e
5 changed files with 41 additions and 1 deletions
|
@ -19,7 +19,6 @@ generate = [
|
||||||
"GstBase.BaseSink",
|
"GstBase.BaseSink",
|
||||||
"GstBase.BaseTransform",
|
"GstBase.BaseTransform",
|
||||||
"GstBase.PushSrc",
|
"GstBase.PushSrc",
|
||||||
"GstBase.AggregatorPad",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
manual = [
|
manual = [
|
||||||
|
@ -86,12 +85,22 @@ status = "generate"
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstBase.Aggregator"
|
name = "GstBase.Aggregator"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
version = "1.14"
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "finish_buffer"
|
name = "finish_buffer"
|
||||||
# Takes ownership
|
# Takes ownership
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
|
[[object.property]]
|
||||||
|
name = "latency"
|
||||||
|
version = "1.14"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "GstBase.AggregatorPad"
|
||||||
|
status = "generate"
|
||||||
|
version = "1.14"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstBase.*"
|
name = "GstBase.*"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
|
@ -35,48 +35,59 @@ unsafe impl Send for Aggregator {}
|
||||||
unsafe impl Sync for Aggregator {}
|
unsafe impl Sync for Aggregator {}
|
||||||
|
|
||||||
pub trait AggregatorExt {
|
pub trait AggregatorExt {
|
||||||
|
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams);
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool>;
|
fn get_buffer_pool(&self) -> Option<gst::BufferPool>;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn get_latency(&self) -> gst::ClockTime;
|
fn get_latency(&self) -> gst::ClockTime;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime);
|
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime);
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn set_src_caps(&self, caps: &gst::Caps);
|
fn set_src_caps(&self, caps: &gst::Caps);
|
||||||
|
|
||||||
fn get_property_start_time(&self) -> u64;
|
fn get_property_start_time(&self) -> u64;
|
||||||
|
|
||||||
fn set_property_start_time(&self, start_time: u64);
|
fn set_property_start_time(&self, start_time: u64);
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
|
|
||||||
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_property_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
||||||
|
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||||
// unsafe { TODO: call ffi::gst_aggregator_get_allocator() }
|
// unsafe { TODO: call ffi::gst_aggregator_get_allocator() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
|
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_aggregator_get_buffer_pool(self.to_glib_none().0))
|
from_glib_full(ffi::gst_aggregator_get_buffer_pool(self.to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn get_latency(&self) -> gst::ClockTime {
|
fn get_latency(&self) -> gst::ClockTime {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_aggregator_get_latency(self.to_glib_none().0))
|
from_glib(ffi::gst_aggregator_get_latency(self.to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) {
|
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_aggregator_set_latency(self.to_glib_none().0, min_latency.to_glib(), max_latency.to_glib());
|
ffi::gst_aggregator_set_latency(self.to_glib_none().0, min_latency.to_glib(), max_latency.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn set_src_caps(&self, caps: &gst::Caps) {
|
fn set_src_caps(&self, caps: &gst::Caps) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_aggregator_set_src_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
ffi::gst_aggregator_set_src_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||||
|
@ -97,6 +108,7 @@ impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
let f: Box_<Box_<Fn(&Self) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||||
|
@ -114,6 +126,7 @@ impl<O: IsA<Aggregator> + IsA<glib::object::Object>> AggregatorExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
unsafe extern "C" fn notify_latency_trampoline<P>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
unsafe extern "C" fn notify_latency_trampoline<P>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||||
where P: IsA<Aggregator> {
|
where P: IsA<Aggregator> {
|
||||||
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f);
|
||||||
|
|
|
@ -27,19 +27,24 @@ unsafe impl Send for AggregatorPad {}
|
||||||
unsafe impl Sync for AggregatorPad {}
|
unsafe impl Sync for AggregatorPad {}
|
||||||
|
|
||||||
pub trait AggregatorPadExt {
|
pub trait AggregatorPadExt {
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn drop_buffer(&self) -> bool;
|
fn drop_buffer(&self) -> bool;
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
||||||
fn has_buffer(&self) -> bool;
|
fn has_buffer(&self) -> bool;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn is_eos(&self) -> bool;
|
fn is_eos(&self) -> bool;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn peek_buffer(&self) -> Option<gst::Buffer>;
|
fn peek_buffer(&self) -> Option<gst::Buffer>;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn pop_buffer(&self) -> Option<gst::Buffer>;
|
fn pop_buffer(&self) -> Option<gst::Buffer>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn drop_buffer(&self) -> bool {
|
fn drop_buffer(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_aggregator_pad_drop_buffer(self.to_glib_none().0))
|
from_glib(ffi::gst_aggregator_pad_drop_buffer(self.to_glib_none().0))
|
||||||
|
@ -53,18 +58,21 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
fn is_eos(&self) -> bool {
|
fn is_eos(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_aggregator_pad_is_eos(self.to_glib_none().0))
|
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> {
|
fn peek_buffer(&self) -> Option<gst::Buffer> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_aggregator_pad_peek_buffer(self.to_glib_none().0))
|
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> {
|
fn pop_buffer(&self) -> Option<gst::Buffer> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_aggregator_pad_pop_buffer(self.to_glib_none().0))
|
from_glib_full(ffi::gst_aggregator_pad_pop_buffer(self.to_glib_none().0))
|
||||||
|
|
|
@ -5,12 +5,18 @@
|
||||||
mod adapter;
|
mod adapter;
|
||||||
pub use self::adapter::Adapter;
|
pub use self::adapter::Adapter;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
mod aggregator;
|
mod aggregator;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use self::aggregator::Aggregator;
|
pub use self::aggregator::Aggregator;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use self::aggregator::AggregatorExt;
|
pub use self::aggregator::AggregatorExt;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
mod aggregator_pad;
|
mod aggregator_pad;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use self::aggregator_pad::AggregatorPad;
|
pub use self::aggregator_pad::AggregatorPad;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use self::aggregator_pad::AggregatorPadExt;
|
pub use self::aggregator_pad::AggregatorPadExt;
|
||||||
|
|
||||||
mod base_sink;
|
mod base_sink;
|
||||||
|
@ -32,7 +38,9 @@ pub mod functions;
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub mod traits {
|
pub mod traits {
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use super::AggregatorExt;
|
pub use super::AggregatorExt;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use super::AggregatorPadExt;
|
pub use super::AggregatorPadExt;
|
||||||
pub use super::BaseSinkExt;
|
pub use super::BaseSinkExt;
|
||||||
pub use super::BaseSrcExt;
|
pub use super::BaseSrcExt;
|
||||||
|
|
|
@ -40,6 +40,7 @@ pub use functions::*;
|
||||||
mod adapter;
|
mod adapter;
|
||||||
mod flow_combiner;
|
mod flow_combiner;
|
||||||
pub use flow_combiner::*;
|
pub use flow_combiner::*;
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
mod aggregator;
|
mod aggregator;
|
||||||
mod base_sink;
|
mod base_sink;
|
||||||
mod base_src;
|
mod base_src;
|
||||||
|
@ -51,6 +52,7 @@ pub mod prelude {
|
||||||
pub use glib::prelude::*;
|
pub use glib::prelude::*;
|
||||||
pub use gst::prelude::*;
|
pub use gst::prelude::*;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
pub use aggregator::AggregatorExtManual;
|
pub use aggregator::AggregatorExtManual;
|
||||||
pub use auto::traits::*;
|
pub use auto::traits::*;
|
||||||
pub use base_sink::BaseSinkExtManual;
|
pub use base_sink::BaseSinkExtManual;
|
||||||
|
|
Loading…
Reference in a new issue