From 273f084c0632991b9bea1dbd2a136b15e89e3d8d Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 9 Mar 2023 22:56:01 -0500 Subject: [PATCH] aggregator: Mark src_pad() return type as an AggregatorPad Part-of: --- gstreamer-base/src/aggregator.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gstreamer-base/src/aggregator.rs b/gstreamer-base/src/aggregator.rs index b5fabaf51..2198dab12 100644 --- a/gstreamer-base/src/aggregator.rs +++ b/gstreamer-base/src/aggregator.rs @@ -15,6 +15,7 @@ use glib::{prelude::*, translate::*}; use gst::{format::FormattedValue, prelude::*}; use crate::Aggregator; +use crate::AggregatorPad; pub trait AggregatorExtManual: 'static { #[doc(alias = "get_allocator")] @@ -77,7 +78,7 @@ pub trait AggregatorExtManual: 'static { f: F, ) -> SignalHandlerId; - fn src_pad(&self) -> &gst::Pad; + fn src_pad(&self) -> &AggregatorPad; } impl> AggregatorExtManual for O { @@ -242,10 +243,10 @@ impl> AggregatorExtManual for O { } } - fn src_pad(&self) -> &gst::Pad { + fn src_pad(&self) -> &AggregatorPad { unsafe { 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) } } }