base: Fix signature of Aggregator::connect_samples_selected()

The first argument is not a random aggregator type but the type that was
used to connect to the signal.
This commit is contained in:
Sebastian Dröge 2022-03-22 18:50:57 +02:00
parent cd2e3aa7f1
commit 2943c310cd

View file

@ -71,9 +71,8 @@ pub trait AggregatorExtManual: 'static {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected< fn connect_samples_selected<
P,
F: Fn( F: Fn(
&P, &Self,
&gst::Segment, &gst::Segment,
Option<gst::ClockTime>, Option<gst::ClockTime>,
Option<gst::ClockTime>, Option<gst::ClockTime>,
@ -84,9 +83,7 @@ pub trait AggregatorExtManual: 'static {
>( >(
&self, &self,
f: F, f: F,
) -> SignalHandlerId ) -> SignalHandlerId;
where
P: IsA<Aggregator>;
} }
impl<O: IsA<Aggregator>> AggregatorExtManual for O { impl<O: IsA<Aggregator>> AggregatorExtManual for O {
@ -208,9 +205,8 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
#[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg(any(feature = "v1_18", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
fn connect_samples_selected< fn connect_samples_selected<
P,
F: Fn( F: Fn(
&P, &Self,
&gst::Segment, &gst::Segment,
Option<gst::ClockTime>, Option<gst::ClockTime>,
Option<gst::ClockTime>, Option<gst::ClockTime>,
@ -221,10 +217,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
>( >(
&self, &self,
f: F, f: F,
) -> SignalHandlerId ) -> SignalHandlerId {
where
P: IsA<Aggregator>,
{
unsafe extern "C" fn samples_selected_trampoline< unsafe extern "C" fn samples_selected_trampoline<
P, P,
F: Fn( F: Fn(
@ -268,7 +261,7 @@ impl<O: IsA<Aggregator>> AggregatorExtManual for O {
self.as_ptr() as *mut _, self.as_ptr() as *mut _,
b"samples-selected\0".as_ptr() as *const _, b"samples-selected\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>( Some(transmute::<_, unsafe extern "C" fn()>(
samples_selected_trampoline::<P, F> as *const (), samples_selected_trampoline::<Self, F> as *const (),
)), )),
Box_::into_raw(f), Box_::into_raw(f),
) )