The libmd library uses a plugin architecture in which independent plugins support different sets of metadata fields. When a client requests metadata, the library extracts it using one or more plugins and then returns the set of filled-in metadata fields to the client.
The library is implemented in three layers:
This design lets libmd offer a common, high-level interface for extracting metadata from many file types on many device types. Clients need to name only a media file and the metadata fields they want and libmd then invokes the necessary MDP plugins to read the metadata and returns the extracted metadata fields to the client.
Each MDP fills in as many fields as it can. The order that libmd uses to invoke the MDPs depends on the plugin preferences stated in the configuration file. The preferential order for plugins can vary from one file type to another.
The file types and their associated URL prefixes supported by libmd are:
File type | URL prefix |
---|---|
CDDA track | cdda: |
POSIX file | file: |
iPod media file | ipod: |
HTTP stream | http: |
RTSP stream | rtsp: |
File on an MTP device | mtp: |
MDPs hide the details of the media interface used for reading metadata so clients can extract it through different network protocols from a variety of hardware. Clients can read metadata from the following device types: