1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::{prelude::*, translate::*};
4use gst::prelude::*;
5
6use crate::AggregatorPad;
7
8mod sealed {
9 pub trait Sealed {}
10 impl<T: super::IsA<super::AggregatorPad>> Sealed for T {}
11}
12
13pub trait AggregatorPadExtManual: sealed::Sealed + IsA<AggregatorPad> + 'static {
14 #[doc(alias = "get_segment")]
15 fn segment(&self) -> gst::Segment {
16 unsafe {
17 let ptr: &ffi::GstAggregatorPad = &*(self.as_ptr() as *const _);
18 let _guard: ObjectLockGuard<'_, AggregatorPad> = self.as_ref().object_lock();
19 from_glib_none(&ptr.segment as *const gst::ffi::GstSegment)
20 }
21 }
22}
23
24impl<O: IsA<AggregatorPad>> AggregatorPadExtManual for O {}
25