mm_player_browse()

Browse a media node within a media source.

Synopsis:

#include <mmplayer/mmplayerclient.h>
 
int mm_player_browse( mmplayer_hdl_t *hdl, 
                      const int media_source_id, 
                      const char *media_node_id, 
                      const int offset, 
                      int *limit, 
                      mmp_ms_node_t **media_nodes )

Arguments:

hdl
The mm-player connection handle
media_source_id
The ID of the media source to browse
media_node_id
The ID of the media node to browse
offset
The offset to start browsing from within the media node
limit
On input, the maximum number of items requested. On output, the number of items actually found (if the function succeeded).
media_nodes
The media nodes found within the media node being browsed

Library:

mmplayerclient

Description:

Browse the contents of the folder media node identified by media_node_id and located on the media source identified by media_source_id. To start browsing a new media source with an unknown directory structure, pass in "/" for media_node_id to indicate the root folder.

You can define offset to make mm-player browse media nodes starting from a certain index in the set of items contained in the media node being browsed. You can also define limit to restrict how many items can be returned.

The media nodes returned by this function can be folders (which can contain other media nodes) or individual media files such as audio tracks, videos, or photos (i.e., leaf nodes). The library allocates memory for the media_nodes array but it's the caller's responsibility to later deallocate that memory. Each array element stores information on a single media node found during browsing.

Returns:

0 on success, -1 on failure