Expand description
PCM codec: uncompressed interleaved linear PCM.
A PCM “codec” is trivial — the packet payload is the sample data. We
still funnel it through Decoder / Encoder so that pipelines treat it
uniformly.
Codec IDs:
pcm_u8— unsigned 8-bitpcm_s16le— signed 16-bit little-endianpcm_s24le— signed 24-bit little-endian, packedpcm_s32le— signed 32-bit little-endianpcm_f32le— 32-bit IEEE float little-endianpcm_f64le— 64-bit IEEE float little-endian
Asterisk-style signed-linear aliases:
slin,slin8,slin16,slin24,slin32,slin44,slin48,slin96,slin192— all map onto thepcm_s16leimplementation. The trailing digits only indicate the implied sample rate of the surrounding headerless.sln*container (seeslin.rs); as a codec they are indistinguishable frompcm_s16le.
Functions§
- codec_
id_ for - Return the canonical PCM codec ID for a
SampleFormat. Planar formats have no direct PCM codec — the caller must convert to interleaved first. - params
- Helper to build codec parameters for a PCM stream.
- register
- sample_
format_ for - Return the
SampleFormatimplied by a PCM codec ID. - time_
base_ for - Default time base for a PCM audio stream: 1 / sample_rate.