Skip to main content

Module filter

Module filter 

Source

Structs§

AudioFormat
A complete uncompressed-audio format description.
AudioResampler
Converts decoded audio to one fixed AudioFormat via libswresample. The input definition is learned from each frame and the conversion context is rebuilt if it changes mid-stream.
AudioVolume
Applies a runtime-adjustable master gain to decoded audio.
AudioVolumeHandle
Thread-safe runtime control for an AudioVolume.
AudioVolumeOptions
Construction-time settings for AudioVolume.
D3d11DecoderWindows and d3d11 and (d3d11 or d3d12)
Decodes one video stream’s Packets into GPU-resident Video frames via D3D11VA hardware acceleration — the D3D11 sibling of crate::elements::D3d12vaDecoder, for a pipeline built entirely on one shared ID3D11Device (see crate::elements::D3d11Renderer’s own docs on why that means no explicit fence/sync is needed anywhere in this stack, unlike the D3D12 side). A Filter, same shape as SwDecoder/D3d12vaDecoder.
D3d11DownloadWindows and d3d11
Downloads GPU-resident Pixel::D3D11 BGRA video frames (e.g. from crate::elements::D3d11VideoCompositor) to CPU-resident Pixel::BGRA frames — the mirror of crate::elements::D3d11Upload. Needed because this crate’s video encoder (crate::elements::SwEncoder) is software-only and has no zero-copy GPU input path; chain a crate::elements::Scaler after this to convert to whatever pixel format an encoder actually needs.
D3d11NvencEncoderWindows and d3d11
Encodes GPU-resident Pixel::D3D11 Video frames into Packets on the GPU’s dedicated NVENC block — the hardware counterpart to crate::elements::SwEncoder, for a pipeline built entirely on one shared ID3D11Device (see crate::elements::D3d11Renderer’s own docs on why that means no explicit fence/sync is needed anywhere in this stack). A Filter: receives via Sink, pushes what it produces into its own single src pad.
D3d11NvencEncoderOptionsWindows and d3d11
Everything avcodec_open2 needs before this encoder can be opened at all — same convention, and the same reasoning, as crate::elements::SwEncoderOptions, which documents at length why time_base and frame_rate are separate values rather than one derived from the other.
D3d11UploadWindows and d3d11 and (d3d11 or d3d12)
Uploads CPU-resident Pixel::NV12 video frames to GPU-resident Video frames tagged Pixel::D3D11 — the D3D11 sibling of crate::elements::D3d12Upload, for a pipeline built entirely on one shared ID3D11Device (see crate::elements::D3d11Renderer’s own docs on why). Only accepts Pixel::NV12 input — chain a crate::elements::Scaler (dst_format = Pixel::NV12) in front of this if the source produces something else.
D3d12UploadWindows and d3d12 and (d3d11 or d3d12)
Uploads CPU-resident Pixel::NV12 video frames (e.g. from crate::elements::Scaler, fed by a synthetic source, a screen capture, …) to GPU-resident Video frames tagged Pixel::D3D12 — the mirror image of crate::elements::D3d12vaDecoder: that one decodes compressed Packets straight to GPU frames; this one moves frames that start out on the CPU onto the same device a crate::elements::D3d12Renderer reads from, so the renderer can take its zero-copy path (Pixel::D3D12) instead of its CPU-upload one (Pixel::YUV420P) — or so any other GPU-side stage downstream can work on the frame without a CPU round trip.
D3d12vaDecoderWindows and d3d12 and (d3d11 or d3d12)
Decodes one video stream’s Packets into GPU-resident Video frames via D3D12VA hardware acceleration, instead of crate::elements::SwDecoder’s plain libavcodec software path. A Filter, same shape as SwDecoder.
Pacer
Delays each buffer until its presentation time, so downstream sees frames (or, upstream of a decoder, compressed packets) at real playback speed instead of as fast as demux/decode can produce them. A Filter: receives via Sink, waits in short interruptible sleeps inside consume, then pushes the same buffer through its own (single) src pad. A pending pause/seek/stop interrupts that wait so the owning worker can process control: pause retains the in-flight buffer for resume, while seek and stop discard it.
Scaler
Converts/resizes decoded video frames — pixel format (e.g. the YUV a decoder produces -> the RGB most inference models expect) and resolution (source resolution -> a model’s fixed input size) in one pass via libswscale. A Filter: receives via Sink, pushes the converted frame on through its own (single) src pad.
SwAudioEncoder
Encodes Audio frames into Packets via a software encoder (see AudioCodec) — the audio sibling of crate::elements::SwEncoder. A Filter: receives via Sink, pushes what it produces into its own (single) src pad.
SwAudioEncoderOptions
Construction-time options for SwAudioEncoder::new. sample_rate/ channels/time_base must already be known — same convention as crate::elements::SwEncoder’s own width/height/time_base — rather than inferred from the first frame, since avcodec_open2 needs them set before this can be opened at all. What’s actually fed to this element doesn’t have to match sample_rate/channels exactly — see SwAudioEncoder’s own docs on why.
SwDecoder
Decodes one stream’s Packets into Frames in software (plain libavcodec, no hardware acceleration). A Filter: receives via Sink, pushes what it produces into its own (single) src pad.
SwEncoder
Encodes Pixel::YUV420P Video frames into Packets via a software encoder (see VideoCodec) — the mirror image of crate::elements::SwDecoder’s decode direction. A Filter: receives via Sink, pushes what it produces into its own (single) src pad.
SwEncoderOptions
Construction-time options for SwEncoder::new. width/height/ time_base must already be known — same convention as crate::elements::Scaler/crate::elements::Pacer — rather than inferred from the first frame, since avcodec_open2 needs them set before this can be opened at all.
Tee
Fans a single input out to multiple sinks. TeeBuilder owns the initial fan-out; later branches are added and removed through a TeeHandle, which can be cloned and used from any thread, independent of whatever thread is driving Tee::consume (the pipeline’s source/queue-worker thread). That’s the whole reason Tee doesn’t implement crate::element::Source like other multi-pad elements (e.g. crate::elements::FileDemuxer): its pads live in individually locked branch slots instead of being a plain &mut [SrcPad]. consume only holds the branch-list lock long enough to take a cheap Arc snapshot, so a slow downstream does not block unrelated attach/detach operations. Detach prevents any push that has not started yet; one already executing downstream call may finish.
TeeBuilder
Build-time configuration for a Tee. Initial branches are merged with the Tee into one detached subgraph and committed by a single Context::attach call. Use TeeBuilder::build for a fixed fan-out, or TeeBuilder::build_dynamic when runtime changes need a TeeHandle.
TeeHandle
A cheaply-cloneable handle for adding or removing a Tee’s sinks while the pipeline is running. It deliberately keeps only a Weak reference to the Tee’s shared state: retaining a handle after the pipeline finishes must not keep downstream sinks or the pipeline’s crate::bus::Bus sender alive. Once the Tee is gone, TeeHandle::branch returns None.
VideoSynchronizer
Schedules decoded video against the pipeline’s current playback master.

Enums§

AudioCodec
Which software audio encoder to open. Just AudioCodec::Aac today — unlike crate::elements::VideoCodec’s several real alternatives, this crate only needs one working audio path right now (feeding an MP4 muxer); more can be added the same way VideoCodec was once something actually needs a second one.
AudioResamplerError
Errors specific to AudioResampler.
AudioVolumeError
Errors specific to AudioVolume.
D3d11DownloadErrorWindows and d3d11
Errors specific to D3d11Download. Converts into the crate-wide Error via ? (see crate::error::Error).
D3d11NvencCodecWindows and d3d11
Which NVENC encoder to open. Both are hardware encoders on the GPU’s dedicated encode block, so neither carries the GPL/licensing question crate::elements::VideoCodec’s software encoders document — but both still have to actually exist in the linked ffmpeg build, and D3d11NvencEncoder::new fails with D3d11NvencEncoderError::CodecNotFound (not a panic) if they don’t.
D3d11NvencEncoderErrorWindows and d3d11
Errors specific to D3d11NvencEncoder. Converts into the crate-wide Error via ? (see crate::error::Error).
D3d11NvencInputFormatWindows and d3d11
Which D3D11 texture format this encoder’s input frames carry. This is the sw_format of the encoder’s own hw frames context, fixed at avcodec_open2 time like every other codec parameter — it is not inferred from the first frame, for the same reason crate::elements::SwEncoderOptions takes width/height up front.
D3d11UploadErrorWindows and d3d11 and (d3d11 or d3d12)
Errors specific to D3d11Upload. Converts into the crate-wide Error via ? (see crate::error::Error).
D3d11vaDecoderErrorWindows and d3d11 and (d3d11 or d3d12)
Errors specific to D3d11Decoder. Converts into the crate-wide Error via ? (see crate::error::Error).
D3d12UploadErrorWindows and d3d12 and (d3d11 or d3d12)
Errors specific to D3d12Upload. Converts into the crate-wide Error via ? (see crate::error::Error).
D3d12vaDecoderErrorWindows and d3d12 and (d3d11 or d3d12)
Errors specific to D3d12vaDecoder. Converts into the crate-wide Error via ? (see crate::error::Error).
PacerError
Errors specific to Pacer.
ScalerError
Errors specific to Scaler. Converts into the crate-wide Error via ? (see crate::error::Error).
SwAudioEncoderError
Errors specific to SwAudioEncoder. Converts into the crate-wide Error via ? (see crate::error::Error).
SwDecoderError
Errors specific to SwDecoder. Converts into the crate-wide Error via ? (see crate::error::Error).
SwEncoderError
Errors specific to SwEncoder. Converts into the crate-wide Error via ? (see crate::error::Error).
VideoCodec
Which software encoder to open. Whatever’s picked, SwEncoder::new fails with SwEncoderError::CodecNotFound (not a panic) if the linked ffmpeg build doesn’t actually have it — this crate never vendors any of these, it’s whatever the local ffmpeg install was built with (check with ffmpeg -encoders).
VideoSynchronizerError