pub enum MetadataBlock<'a> {
VorbisComment(&'a str),
Padding(u32),
Application {
id: [u8; 4],
data: &'a [u8],
},
Seektable(&'a [SeekPoint]),
CueSheet {
media_catalog_number: &'a [u8; 128],
lead_in: u64,
is_cd: bool,
tracks: &'a [CueSheetTrack<'a>],
},
Picture {
picture_type: u32,
mime_type: &'a str,
description: &'a str,
width: u32,
height: u32,
depth: u32,
colors: u32,
data: &'a [u8],
},
}Expand description
A metadata block the caller can place after STREAMINFO (which the encoder always writes first). libFLAC writes blocks in the order given (the OGG reorder is compiled out for native FLAC), so this list maps 1:1 to the output.
Variants§
VorbisComment(&'a str)
A VORBIS_COMMENT with the given vendor string and no user comments.
Padding(u32)
A PADDING block of N zero bytes.
Application
An APPLICATION block: a 4-byte registered application id + opaque data.
Seektable(&'a [SeekPoint])
A SEEKTABLE block: the seek points to serialize, in order. The encoder fills
a template (each point’s sample_number a target, offsets 0) during
encoding and writes the filled+sorted result; write_seektable serializes
whatever points it is given verbatim.
CueSheet
A CUESHEET block: the 128-byte media catalog number, lead-in samples, the CD-DA flag, and the track list (each with its index points). Fully caller-supplied — unlike SEEKTABLE, nothing is generated during encoding.
Picture
A PICTURE block (e.g. cover art). mime_type/description are stored with
32-bit length prefixes; picture_type is the FLAC picture-type code.