Skip to main content

Crate kithara_decode

Crate kithara_decode 

Source
Expand description

§Kithara Decode

Audio decoding library with pluggable backends.

Provides generic decoder infrastructure supporting Symphonia (software), Apple AudioToolbox, and Android MediaCodec backends.

§Usage

Use DecoderFactory for runtime codec selection:

use kithara_decode::{DecoderFactory, DecoderConfig};

let decoder = DecoderFactory::create_from_media_info(source, &media_info, config)?;

Structs§

CodecPriming
DecoderConfig
Configuration for DecoderFactory.
DecoderFactory
Factory for creating decoders with a single, strict backend selection.
DecoderTrackInfo
Decoder-owned per-track playback contract.
GaplessInfo
Gapless trim contract for one decoded track.
GaplessTrimmer
Stateful PCM trimmer that applies one track’s gapless contract.
PcmChunk
PCM chunk containing interleaved audio samples with automatic pool recycling.
PcmMeta
Timeline metadata for a PCM chunk.
PcmSpec
PCM specification - core audio format information
SilenceTrimParams
Tunables for GaplessMode::SilenceTrim.
TrackMetadata
Audio track metadata extracted from Symphonia tags.

Enums§

DecodeError
Errors that can occur during audio decoding.
DecoderBackend
Explicit backend selection for DecoderFactory.
DecoderChunkOutcome
Outcome of an Decoder::next_chunk call.
DecoderSeekOutcome
Outcome of a Decoder::seek call.
ErrorClass
Single-discriminant classification of a DecodeError.
GaplessMode
How gapless PCM trimming is applied on top of decoder-reported [GaplessInfo].
InputReadOutcome
Outcome of a DecoderInput::try_read call.

Traits§

Decoder
Trait for runtime-polymorphic audio decoders.
DecoderInput
Combined trait for decoder input sources.

Functions§

duration_for_frames
Convert PCM frame count at a given sample rate into a saturating Duration.
frames_for_duration
Convert Duration back into PCM frame count at a given sample rate.
probe_mp4_gapless
Stream the MP4 boxes in reader and derive a GaplessInfo if any recognised source is present. Returns Ok(None) when the file is well-formed but carries no gapless metadata.

Type Aliases§

DecodeResult
Result type for decode operations.
GaplessOutput
Inline batch of chunks released by one GaplessTrimmer operation.