RetroArch
Functions
FLAC/metadata.h: metadata level 0 interface

The level 0 interface consists of individual routines to read the STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring only a filename. More...

Collaboration diagram for FLAC/metadata.h: metadata level 0 interface:

Functions

FLAC_API FLAC__bool FLAC__metadata_get_streaminfo (const char *filename, FLAC__StreamMetadata *streaminfo)
 
FLAC_API FLAC__bool FLAC__metadata_get_tags (const char *filename, FLAC__StreamMetadata **tags)
 
FLAC_API FLAC__bool FLAC__metadata_get_cuesheet (const char *filename, FLAC__StreamMetadata **cuesheet)
 
FLAC_API FLAC__bool FLAC__metadata_get_picture (const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)
 

Detailed Description

The level 0 interface consists of individual routines to read the STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring only a filename.

They try to skip any ID3v2 tag at the head of the file.

Function Documentation

◆ FLAC__metadata_get_cuesheet()

FLAC_API FLAC__bool FLAC__metadata_get_cuesheet ( const char *  filename,
FLAC__StreamMetadata **  cuesheet 
)

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

Parameters
filenameThe path to the FLAC file to read.
cuesheetThe address where the returned pointer will be stored. The cuesheet object must be deleted by the caller using FLAC__metadata_object_delete().
filename != NULL
cuesheet != NULL
Return values
FLAC__booltrue 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.

◆ FLAC__metadata_get_picture()

FLAC_API FLAC__bool FLAC__metadata_get_picture ( const char *  filename,
FLAC__StreamMetadata **  picture,
FLAC__StreamMetadata_Picture_Type  type,
const char *  mime_type,
const FLAC__byte description,
unsigned  max_width,
unsigned  max_height,
unsigned  max_depth,
unsigned  max_colors 
)

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.

Parameters
filenameThe path to the FLAC file to read.
pictureThe address where the returned pointer will be stored. The picture object must be deleted by the caller using FLAC__metadata_object_delete().
typeThe desired picture type. Use -1 to mean "any type".
mime_typeThe desired MIME type, e.g. "image/jpeg". The string will be matched exactly. Use NULL to mean "any MIME type".
descriptionThe desired description. The string will be matched exactly. Use NULL to mean "any description".
max_widthThe maximum width in pixels desired. Use (unsigned)(-1) to mean "any width".
max_heightThe maximum height in pixels desired. Use (unsigned)(-1) to mean "any height".
max_depthThe maximum color depth in bits-per-pixel desired. Use (unsigned)(-1) to mean "any depth".
max_colorsThe maximum number of colors desired. Use (unsigned)(-1) to mean "any number of colors".
filename != NULL
picture != NULL
Return values
FLAC__booltrue 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.

◆ FLAC__metadata_get_streaminfo()

FLAC_API FLAC__bool FLAC__metadata_get_streaminfo ( const char *  filename,
FLAC__StreamMetadata streaminfo 
)

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
filenameThe path to the FLAC file to read.
streaminfoA 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.
filename != NULL
streaminfo != NULL
Return values
FLAC__booltrue 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.)

◆ FLAC__metadata_get_tags()

FLAC_API FLAC__bool FLAC__metadata_get_tags ( const char *  filename,
FLAC__StreamMetadata **  tags 
)

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

Parameters
filenameThe path to the FLAC file to read.
tagsThe address where the returned pointer will be stored. The tags object must be deleted by the caller using FLAC__metadata_object_delete().
filename != NULL
tags != NULL
Return values
FLAC__booltrue 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.