Multimedia Playlist API

The Multimedia Playlist API exposes controls for opening playlist sessions, seeking to specific track positions, and retrieving playlist metadata.

Before it can access any playlists, a client must first initialize the libmmplaylist library by calling mmplaylist_init(), which loads the playlist plugins (PLPs) listed in the configuration file. The client can then open sessions on playlists by calling mmplaylist_open(). In each call, the client can specify the character encoding and validation to do for every entry retrieved by an mmplaylist_entry_next_get() call.

Media applications read playlist information for many reasons. For example, an application might extract the track URLs of a playlist's entries and pass these URLs to mm-renderer to play the tracks one by one. Or, it might retrieve the number of entries in all playlists on a mediastore and display this information to the user as a type of playlist inventory.

The mmplaylist_props_get() function allows the client to learn which operations (e.g., seeking to a new position, getting the number of playlist entries) have fast implementations in the current session and to then optimize the user experience by avoiding slow operations.

When it's finished using a playlist, the client can close the session with mmplaylist_close(). When it's finished using libmmplaylist (e.g., during shutdown), the client must call mmplaylist_terminate() to unload the PLPs used by the library.

While a session is active, the client can call mmplaylist_last_error_get() to obtain the numeric error code of the last error that occurred on that session. We recommend that your applications check the return values of all API calls. If any value indicates an error, an application can examine the error code and use it to help recover.