forked from mirrors/gstreamer-rs
aggregator: Mark src_pad() return type as an AggregatorPad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1236>
This commit is contained in:
parent
368e1cacb6
commit
273f084c06
1 changed files with 4 additions and 3 deletions
|
@ -15,6 +15,7 @@ use glib::{prelude::*, translate::*};
|
||||||
use gst::{format::FormattedValue, prelude::*};
|
use gst::{format::FormattedValue, prelude::*};
|
||||||
|
|
||||||
use crate::Aggregator;
|
use crate::Aggregator;
|
||||||
|
use crate::AggregatorPad;
|
||||||
|
|
||||||
pub trait AggregatorExtManual: 'static {
|
pub trait AggregatorExtManual: 'static {
|
||||||
#[doc(alias = "get_allocator")]
|
#[doc(alias = "get_allocator")]
|
||||||
|
@ -77,7 +78,7 @@ pub trait AggregatorExtManual: 'static {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId;
|
) -> SignalHandlerId;
|
||||||
|
|
||||||
fn src_pad(&self) -> &gst::Pad;
|
fn src_pad(&self) -> &AggregatorPad;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Aggregator>> AggregatorExtManual for O {
|
impl<O: IsA<Aggregator>> AggregatorExtManual for O {
|
||||||
|
@ -242,10 +243,10 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn src_pad(&self) -> &gst::Pad {
|
fn src_pad(&self) -> &AggregatorPad {
|
||||||
unsafe {
|
unsafe {
|
||||||
let elt = &*(self.as_ptr() as *const ffi::GstAggregator);
|
let elt = &*(self.as_ptr() as *const ffi::GstAggregator);
|
||||||
&*(&elt.srcpad as *const *mut gst::ffi::GstPad as *const gst::Pad)
|
&*(&elt.srcpad as *const *mut gst::ffi::GstPad as *const AggregatorPad)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue