gstreamer_base/
aggregator_pad.rs

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::{ffi, AggregatorPad};
7
8pub trait AggregatorPadExtManual: IsA<AggregatorPad> + 'static {
9    #[doc(alias = "get_segment")]
10    fn segment(&self) -> gst::Segment {
11        unsafe {
12            let ptr: &ffi::GstAggregatorPad = &*(self.as_ptr() as *const _);
13            let _guard = self.as_ref().object_lock();
14            from_glib_none(&ptr.segment as *const gst::ffi::GstSegment)
15        }
16    }
17}
18
19impl<O: IsA<AggregatorPad>> AggregatorPadExtManual for O {}