forked from mirrors/gstreamer-rs
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.
This commit is contained in:
parent
dbc76f1053
commit
cc866b53d0
4 changed files with 12 additions and 4 deletions
|
@ -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<i32, LoggableError>;
|
||||
fn write(&self, sink: &AudioSink, audio_data: &[u8]) -> Result<i32, LoggableError> {
|
||||
self.parent_write(sink, audio_data)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait AudioSinkImplExt {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -103,7 +103,9 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl + Send + Sync + 'stati
|
|||
&self,
|
||||
aggregator: &Aggregator,
|
||||
timeout: bool,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
self.parent_aggregate(aggregator, timeout)
|
||||
}
|
||||
|
||||
fn start(&self, aggregator: &Aggregator) -> Result<(), gst::ErrorMessage> {
|
||||
self.parent_start(aggregator)
|
||||
|
|
|
@ -49,7 +49,9 @@ pub trait BaseParseImpl: BaseParseImplExt + ElementImpl + Send + Sync + 'static
|
|||
element: &BaseParse,
|
||||
src_val: V,
|
||||
dest_format: gst::Format,
|
||||
) -> Option<gst::GenericFormattedValue>;
|
||||
) -> Option<gst::GenericFormattedValue> {
|
||||
self.parent_convert(element, src_val, dest_format)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BaseParseImplExt {
|
||||
|
|
Loading…
Reference in a new issue