gstreamer-base/aggregator: Implement update_segment manually

This commit is contained in:
Vivia Nikolaidou 2020-05-02 22:11:53 +03:00 committed by Sebastian Dröge
parent 1be8ec691e
commit 0aeccc27ff

View file

@ -39,6 +39,9 @@ pub trait AggregatorExtManual: 'static {
&self, &self,
f: F, f: F,
) -> SignalHandlerId; ) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>);
} }
impl<O: IsA<Aggregator>> AggregatorExtManual for O { impl<O: IsA<Aggregator>> AggregatorExtManual for O {
@ -109,6 +112,15 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
) )
} }
} }
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn update_segment<F: gst::FormattedValue>(&self, segment: &gst::FormattedSegment<F>) {
unsafe {
gst_base_sys::gst_aggregator_update_segment(
self.as_ref().to_glib_none().0,
mut_override(segment.to_glib_none().0),
)
}
}
} }
#[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg(any(feature = "v1_16", feature = "dox"))]