Function Documentation

Read the STREAMINFO metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.

Parameters

filename

The path to the FLAC file to read.

streaminfo

A pointer to space for the STREAMINFO block. Since FLAC__StreamMetadata is a simple structure with no memory allocation involved, you pass the address of an existing structure. It need not be initialized.

Assertions:

1 filename != NULL

1 streaminfo != NULL

Return values

FLAC__bool

true if a valid STREAMINFO block was read from filename. Returns false if there was a memory allocation error, a file decoder error, or the file contained no STREAMINFO block. (A memory allocation error is possible because this function must set up a file decoder.)

true if a valid VORBIS_COMMENT block was read from filename, and *tags will be set to the address of the metadata structure. Returns false if there was a memory allocation error, a file decoder error, or the file contained no VORBIS_COMMENT block, and *tags will be set to NULL.

true if a valid CUESHEET block was read from filename, and *cuesheet will be set to the address of the metadata structure. Returns false if there was a memory allocation error, a file decoder error, or the file contained no CUESHEET block, and *cuesheet will be set to NULL.

Read a PICTURE metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file. Since there can be more than one PICTURE block in a file, this function takes a number of parameters that act as constraints to the search. The PICTURE block with the largest area matching all the constraints will be returned, or *picture will be set to NULL if there was no such block.

The desired MIME type, e.g. "image/jpeg". The string will be matched exactly. Use NULL to mean "any MIME type".

description

The desired description. The string will be matched exactly. Use NULL to mean "any
description".

max_width

The maximum width in pixels desired. Use (unsigned)(-1) to mean "any width".

max_height

The maximum height in pixels desired. Use (unsigned)(-1) to mean "any height".

max_depth

The maximum color depth in bits-per-pixel desired. Use (unsigned)(-1) to mean "any depth".

max_colors

The maximum number of colors desired. Use (unsigned)(-1) to mean "any number of colors".

Assertions:

1 filename != NULL

1 picture != NULL

Return values

FLAC__bool

true if a valid PICTURE block was read from filename, and *picture will be set to the address of the metadata structure. Returns false if there was a memory allocation error, a file decoder error, or the file contained no PICTURE block, and *picture will be set to NULL.