Metadata Provider API

The Metadata Provider API exposes the constants, data types (including enumerations), and functions that your client applications can use to initialize the libmd library, create metadata-extraction sessions, and submit metadata retrieval requests.

The first action any client must perform with libmd is to initialize the library by calling mmmd_init() while supplying the path of the configuration file, which lists the metadata providers (MDPs) to load.

Before it can extract any metadata, your client must establish a metadata-extraction session with libmd by calling mmmd_session_open() while providing the name of the mediastore (device) to read metadata from.

The client can then request specific metadata fields from specific items (media files) by calling mmmd_get(). The client can ask for a maximum number of matches (i.e., responses from different MDPs). Retrieving multiple matches lets the client pick the set of metadata values that provide the most complete and accurate media information possible.

When it's finished retrieving metadata, the client can close the corresponding session by calling mmmd_session_close(). When it's finished using libmd altogether (e.g., during shutdown), the client must call mmmd_terminate() to clean up the resources used by the library.