Media browsing and playback interface

The media browsing and playback interface defines the functions for connecting to mm-player, retrieving file information and metadata from media sources and media nodes, configuring tracksessions, and issuing playback commands. It also exposes the data types used by those functions for storing properties of media sources and media nodes.

The first function a client must call is mm_player_connect() to connect to mm-player and obtain a handle, which is required in all subsequent API calls. The client must then call mm_player_open() and pass in the name of a player to connect with. The player is used to carry out the browsing and playback actions.

To discover media content, the client must call mm_player_get_media_sources() to obtain a list of accessible media sources.

Note: Before attempting any browsing or playback operation, the client should verify that the media source it's using supports that operation by examining the flag field that specifies its capabilities. This field is found in the mmp_ms_t structure that describes the media source.

The mm_player_browse() function retrieves information on the media nodes found on a media source. These media nodes may be folders or individual media files. To play media files, the client must first define a tracksession by calling mm_player_create_trksession() and then manage playback by issuing commands such as mm_player_play(), mm_player_stop(), and mm_player_next().

When it's finished browsing and playing media with mm-player, the client can disconnect by calling mm_player_disconnect().