Main Page Modules Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# FLAC/metadata.h: metadata level 0 interface
[FLAC/metadata.h: metadata interfaces]

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

## Functions
FLAC__bool | FLAC__metadata_get_streaminfo (const char *filename, FLAC__StreamMetadata *streaminfo)
FLAC__bool | FLAC__metadata_get_tags (const char *filename, FLAC__StreamMetadata **tags)

## Detailed Description

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

It skips any ID3v2 tag at the head of the file.

## Function Documentation

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 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:
      filename != NULL
      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.)

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 skip any ID3v2 tag at the head of the file. Parameters:
  filename | The path to the FLAC file to read.
  tags | The address where the returned pointer will be stored. The tags object must be deleted by the caller using FLAC__metadata_object_delete().
  Assertions:
      filename != NULL
      streaminfo != NULL
  Return values:
  FLAC__bool | `true` if a valid VORBIS_COMMENT block was read from filename, and *tags will be set to the address of the tag 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`.