Configuring Metadata Providers

You can configure metadata providers (MDPs) in two ways: in the configuration file to define initial settings and through the libmd API to define settings for individual metadata-extraction sessions.

During startup, libmd reads its configuration file and loads each listed MDP. After an MDP loads successfully, libmd initializes it with any settings listed in the configuration file. These settings apply to the MDP throughout the client application's lifetime.

When libmd has finished its setup, your client can establish metadata-extraction sessions and assign parameters to those sessions to influence how MDPs retrieve metadata.

To assign parameters to active sessions (dynamic parameters), the client must call mmmd_session_params_set() while providing the session handle and the list of parameters. Parameters defined in this manner apply only to the session referred to in the API call. Once set, they can't be changed or unset.

Currently, only the MMF MDP examines dynamic parameters, which it uses to configure the streamers for reading files from HTTP servers. Whether this plugin is used in metadata extraction depends on the type of the media item being read and the plugin preferences stated in the configuration file. When libmd uses other MDPs to read metadata, dynamic parameters have no effect. You should therefore set these parameters only when you plan to extract metadata from HTTP servers.

Note: The MDP settings recognized by libmd when parsing the configuration file (static parameters) differ from those you can assign to an active metadata-extraction session. See the default configuration file for the supported static parameters. For information on the dynamic parameters recognized by MMF, see mmmd_session_params_set().