#[repr(u8)]pub enum CodecKind {
Show 13 variants
H264 = 0,
Hevc = 1,
Av1 = 2,
Vp9 = 3,
Aac = 4,
Opus = 5,
Mp3 = 6,
Vorbis = 7,
WebVtt = 8,
Tx3g = 9,
RawVideo = 10,
RawAudio = 11,
Vp8 = 12,
}Expand description
Supported codec types for demuxing and muxing.
#[repr(u8)] with explicit discriminants, kept in lockstep with
mediaway_codec_kind_t in crates/mediaway-ffi/include/mediaway/container.h — this
type crosses the C ABI directly (mediaway-ffi’s MediawayCodecKind is a type alias to
this enum, not a converting wrapper), so an implicit/compiler-chosen discriminant order
is a real correctness bug, not just a style nit: Vp8 was appended to the C header at
= 12 when WebM support landed, but this enum’s declaration order put it 5th
(discriminant 4, sandwiched between Vp9 and Aac) — every codec from Aac onward
silently carried the wrong wire value across the C ABI until these discriminants were
pinned explicitly to match the header.
Variants§
H264 = 0
H.264 / AVC video.
Hevc = 1
HEVC / H.265 video.
Av1 = 2
AV1 video.
Vp9 = 3
VP9 video.
Aac = 4
AAC audio.
Opus = 5
Opus audio.
Mp3 = 6
MP3 (MPEG-1/2/2.5 Layer III) audio.
Vorbis = 7
Vorbis audio.
WebVtt = 8
WebVTT subtitle.
Tx3g = 9
Tx3g timed text subtitle.
RawVideo = 10
Uncompressed / raw video (capture, passthrough).
RawAudio = 11
Uncompressed / raw PCM audio — the audio analog of CodecKind::RawVideo.
Covers both capture/passthrough (no container) and container-framed PCM
(e.g. RIFF/WAVE data chunk) — PCM has no encoding to distinguish either way.
Vp8 = 12
VP8 video.