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§
Sourcefn src_pads(&mut self) -> &mut [SrcPad]
fn src_pads(&mut self) -> &mut [SrcPad]
Returns every output pad owned by this element.
The slice order is the element’s public pad-index contract. Implementors
use the mutable access to push buffers and propagate control; callers
normally connect pads through Context::attach instead of linking
them directly.
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 ChangeGate
impl Source for FileDemuxer
impl Source for FrameRateLimiter
impl Source for Pacer
impl Source for PauseGate
impl Source for PipelineBridge
impl Source for RtspSource
impl Source for SwAudioEncoder
impl Source for SwChromaKey
impl Source for SwDecoder
impl Source for SwEncoder
impl Source for SwScaler
impl Source for SwVideoCompositor
impl Source for TestAudioSource
impl Source for TestVideoSource
impl Source for TimestampOrigin
impl Source for VideoSynchronizer
impl Source for WebRtcTrackSource
webrtc only.