miniav_tools library

User-facing facade for miniav_tools.

Backends register themselves with MiniAVToolsPlatform when their package is imported. This facade routes user requests to the highest-priority backend that supports the request.

Classes

AudioEncoder
User-facing wrapper around a PlatformAudioEncoder.
AudioEncoderConfig
Configuration for an audio encoder (AAC, Opus, …).
AudioTrackInfo
BackendContext
Optional shared resources passed across backend boundaries.
BackendPreference
User preference for backend selection on a per-call basis.
BytesDemuxerInput
BytesMuxerOutput
CallbackMuxerOutput
CodecExtraData
Codec-private bitstream extras (SPS/PPS for H.264, codec-private for VP9, etc.) emitted once at stream start. Muxers need this to write track headers.
CpuFrameSource
CvPixelBufferFrameSource
D3D11TextureFrameSource
DecodedFrame
A decoded frame. Backends may return CPU bytes or GPU handles depending on DecoderConfig.requestGpuOutput.
Decoder
DecoderConfig
Configuration for a video decoder.
Demuxer
DemuxerConfig
Configuration for a demuxer (container file/stream → encoded packets).
DemuxerInput
Where a demuxer reads its input.
DmabufFrameSource
EncodedPacket
A single encoded video or audio access unit.
Encoder
User-facing wrapper around a PlatformEncoder. Adds:
EncoderConfig
Configuration for a video encoder.
ExcludedBackendPreference
FileDemuxerInput
FileMuxerOutput
FrameSource
Sealed: every frame handed to an encoder is one of the variants below.
GpuTextureFrameSource
MiniAVAudioBuffer
MiniAVBuffer
MiniAVBufferSource
MiniAVNativeFence
GPU sync fence information for zero-copy buffer handoff.
MiniAVTools
Static facade. All factory methods route through MiniAVToolsPlatform.instance and try each registered backend in priority order until one succeeds.
MiniAVToolsBackend
MiniAVToolsPlatform
Process-global registry of installed MiniAVToolsBackends.
MiniAVVideoBuffer
Muxer
MuxerConfig
Configuration for a muxer (encoded packets → container file/stream).
MuxerOutput
Where a muxer writes its output.
PinnedBackendPreference
PlatformAudioEncoder
Abstract audio encoder. Backends return a concrete subclass from MiniAVToolsBackend.createAudioEncoder.
PlatformDecoder
Lifecycle: create → decode* → flush → close
PlatformDemuxer
Abstract container demuxer.
PlatformEncoder
Abstract video/audio encoder. Backends return a concrete subclass from MiniAVToolsBackend.createEncoder.
PlatformMuxer
Abstract container muxer.
TrackInfo
Description of a single track to be written by a muxer.
VideoTrackInfo
WarmupProgress
A single progress snapshot emitted during backend warmup.
WebVideoFrameSource
A browser WebCodecs VideoFrame wrapped as a FrameSource.

Enums

AudioCodec
Audio codec identifiers.
Container
Container / file-format identifiers for muxing & demuxing.
EncoderLevel
H.264 / HEVC level. Backends interpret this codec-appropriately.
EncoderProfile
H.264 / HEVC profile identifiers (a sensible cross-codec subset).
FrameSourceKind
Discriminator for FrameSource subtypes — used by backends to declare support without runtime type checks.
HwAccelPreference
Hardware acceleration preference.
MiniAVAudioFormat
MiniAVBufferContentType
MiniAVBufferType
MiniAVPixelFormat
Platform-agnostic types for MiniAV platform interface. These are pure Dart types, not FFI structs.
RateControl
Rate-control mode for video encoders.
VideoCodec
Video codec identifiers. Backends declare which they support via MiniAVToolsBackend.supportsEncode / supportsDecode.

Exceptions / Errors

CodecInitException
A backend was selected but failed to initialise the codec (driver missing, hardware busy, invalid configuration, etc.).
CodecRuntimeException
Encoder/decoder is in an error state and must be closed/recreated.
MiniAVToolsException
Base class for all miniav_tools exceptions.
NoBackendForCodecException
No registered backend can handle the requested codec / container.
UnsupportedFrameSourceException
The provided FrameSource kind is not accepted by this backend, and no fallback was possible.