From cc866b53d05f62a6732030b73ab50618b237c5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 30 Jun 2020 23:43:13 +0300 Subject: [PATCH] Call the parent impl of various vfuncs if not overridden This was forgotten for a few types and would require each subclass to implement them, even if a parent class already provided an implementation. --- gstreamer-audio/src/subclass/audio_sink.rs | 4 +++- gstreamer-audio/src/subclass/audio_src.rs | 4 +++- gstreamer-base/src/subclass/aggregator.rs | 4 +++- gstreamer-base/src/subclass/base_parse.rs | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gstreamer-audio/src/subclass/audio_sink.rs b/gstreamer-audio/src/subclass/audio_sink.rs index 6229f9547..9f46a1f54 100644 --- a/gstreamer-audio/src/subclass/audio_sink.rs +++ b/gstreamer-audio/src/subclass/audio_sink.rs @@ -37,7 +37,9 @@ pub trait AudioSinkImpl: AudioSinkImplExt + BaseSinkImpl + Send + Sync + 'static self.parent_unprepare(sink) } - fn write(&self, sink: &AudioSink, audio_data: &[u8]) -> Result; + fn write(&self, sink: &AudioSink, audio_data: &[u8]) -> Result { + self.parent_write(sink, audio_data) + } } pub trait AudioSinkImplExt { diff --git a/gstreamer-audio/src/subclass/audio_src.rs b/gstreamer-audio/src/subclass/audio_src.rs index 3c8b55520..40f57556e 100644 --- a/gstreamer-audio/src/subclass/audio_src.rs +++ b/gstreamer-audio/src/subclass/audio_src.rs @@ -39,7 +39,9 @@ pub trait AudioSrcImpl: AudioSrcImplExt + BaseSrcImpl + Send + Sync + 'static { &self, src: &AudioSrc, audio_data: &mut [u8], - ) -> Result<(u32, gst::ClockTime), LoggableError>; + ) -> Result<(u32, gst::ClockTime), LoggableError> { + self.parent_read(src, audio_data) + } } pub trait AudioSrcImplExt { diff --git a/gstreamer-base/src/subclass/aggregator.rs b/gstreamer-base/src/subclass/aggregator.rs index 4dbbd19b5..0f4d06019 100644 --- a/gstreamer-base/src/subclass/aggregator.rs +++ b/gstreamer-base/src/subclass/aggregator.rs @@ -103,7 +103,9 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl + Send + Sync + 'stati &self, aggregator: &Aggregator, timeout: bool, - ) -> Result; + ) -> Result { + self.parent_aggregate(aggregator, timeout) + } fn start(&self, aggregator: &Aggregator) -> Result<(), gst::ErrorMessage> { self.parent_start(aggregator) diff --git a/gstreamer-base/src/subclass/base_parse.rs b/gstreamer-base/src/subclass/base_parse.rs index a022234ad..739349afe 100644 --- a/gstreamer-base/src/subclass/base_parse.rs +++ b/gstreamer-base/src/subclass/base_parse.rs @@ -49,7 +49,9 @@ pub trait BaseParseImpl: BaseParseImplExt + ElementImpl + Send + Sync + 'static element: &BaseParse, src_val: V, dest_format: gst::Format, - ) -> Option; + ) -> Option { + self.parent_convert(element, src_val, dest_format) + } } pub trait BaseParseImplExt {