forked from mirrors/gstreamer-rs
gstreamer-base/basesink: Provide default implementation for render
We need some classes derived from `BaseSink` to not enforce render being implemented. An example of this is AudioSink which only requires the user to implement `write` but not `render`, so the default implementation of render needs to be called.
This commit is contained in:
parent
be3c378f28
commit
14a55dc73d
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ pub trait BaseSinkImpl: BaseSinkImplExt + ElementImpl + Send + Sync + 'static {
|
||||||
&self,
|
&self,
|
||||||
element: &BaseSink,
|
element: &BaseSink,
|
||||||
buffer: &gst::Buffer,
|
buffer: &gst::Buffer,
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
self.parent_render(element, buffer)
|
||||||
|
}
|
||||||
|
|
||||||
fn prepare(
|
fn prepare(
|
||||||
&self,
|
&self,
|
||||||
|
|
Loading…
Reference in a new issue