Architecture of libmmplaylist

The libmmplaylist library uses a plugin architecture in which each plugin can manage a particular playlist format. When a client opens a session on a playlist, the library determines which plugin is most suited to manage the playlist and uses that selected plugin to carry out subsequent playlist operations.

The library is implemented in three layers:

Playlist management
This layer:
  • initializes the library by loading the character-converter service and determining the path of the configuration file
  • opens playlist sessions and returns session handles
  • loads and validates playlist entries and performs character encoding
  • reports the number of playlist entries and the position (index) of the currently playing entry
  • updates the playlist position after validating the new position requested by the client
Plugin management
This layer:
  • reads the configuration file to learn the plugin filenames and configuration settings
  • loads, validates, and unloads plugins
  • determines which plugins support a given playlist and ranks those plugins
  • provides configuration settings to the playlist management layer to help it perform character encoding
Plugins
This layer consists of many playlist plugins that:
  • rate themselves on their ability to support a particular playlist
  • open and close playlist sessions when requested by the playlist management layer
  • provide basic operations for navigating and retrieving information from playlists
  • may provide more efficient methods for some navigation and seek operations
Note: The plugin-based architecture makes it easy for future releases of libmmplaylist to support additional playlist formats while clients continue to use the same commands to manage playlists.