mmr_metadata_split()

Get metadata properties of a single track or image inside the input file

Synopsis:

#include <mm/events.h>
strm_dict_t* mmr_metadata_split(strm_dict_t const *md,
                                const char *type,
                                unsigned idx)

Arguments:

md
A handle to a dictionary containing a complete metadata set read from a METADATA event. The function doesn't consume the handle, so the caller can keep using it afterwards.
type
The media properties to look for in the metadata. For information about audio, video, or subpicture tracks, use audio, video, or subpicture. For artwork, use image.
idx
The zero-based index of the dictionary entry from which to extract metadata. This index corresponds to the input track or image for which you're retrieving properties.

Library:

mmrndclient

Description:

This function examines the metadata set stored in the md dictionary and extracts the properties indicated by type from the entry stored at idx. These properties are parsed into key-value pairs and put into a new dictionary, and a handle to this dictionary is returned.

Returns:

A handle to a new dictionary containing the parsed properties on success, or NULL if no metadata properties are found or an error occurs. In the latter case, check errno, which can be one of:
  • ENOENT, if no properties were found
  • EINVAL, if either md or type is a null pointer or has an invalid value
  • ENOMEM, if there's not enough memory