pub trait Source: Element {
// Required method
fn src_pads(&mut self) -> &mut [SrcPad];
}Expand description
An element with one or more output ports. It sends data downstream by
pushing into its own src_pads() (e.g. self.src_pads()[0].push(buf))
— it’s never handed a downstream argument from the outside. See
SrcPad.
Source and Sink are the two halves of the duality: Sink is “has
an input”, Source is “has an output”. An element that both receives
and produces (a decoder, say) implements both side by side — Sink to
receive, Source to push whatever it produces into its own pad(s)
from inside consume. There’s no separate “processing element” trait
or wrapper needed for that.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Source for AppSource
impl Source for AudioMixer
impl Source for AudioResampler
impl Source for AudioVolume
impl Source for D3d11Decoder
Available on Windows and crate feature
d3d11 and (crate features d3d11 or d3d12) only.impl Source for D3d11Download
Available on Windows and crate feature
d3d11 only.impl Source for D3d11NvencEncoder
Available on Windows and crate feature
d3d11 only.impl Source for D3d11Upload
Available on Windows and crate feature
d3d11 and (crate features d3d11 or d3d12) only.impl Source for D3d11VideoCompositor
Available on Windows and crate feature
d3d11 only.impl Source for D3d12Upload
Available on Windows and crate feature
d3d12 and (crate features d3d11 or d3d12) only.impl Source for D3d12vaDecoder
Available on Windows and crate feature
d3d12 and (crate features d3d11 or d3d12) only.impl Source for DxgiCaptureSource
Available on Windows and crate feature
dxgi-capture and (crate features dxgi-capture or wasapi-capture) only.impl Source for FileDemuxer
impl Source for Pacer
impl Source for RtspSource
impl Source for Scaler
impl Source for SwAudioEncoder
impl Source for SwDecoder
impl Source for SwEncoder
impl Source for TestAudioSource
impl Source for TestVideoSource
impl Source for VideoCompositor
impl Source for VideoSynchronizer
impl Source for WasapiCaptureSource
Available on Windows and crate feature
wasapi-capture and (crate features dxgi-capture or wasapi-capture) only.impl Source for WebRtcTrackSource
Available on crate feature
webrtc only.