mmr_list_change()

Set a new playlist.

Synopsis:

#include <mm/renderer/renderer.h>
 
int mmr_list_change(mmr_context_t *ctxt,
                    const char *url,
                    int delta)

Since:

BlackBerry 10.0.0

Arguments:

ctxt

A context handle.

url

The URL of a new playlist.

delta

The difference between the position of the current track on the two lists.

Library:

libmmrndclient (For the qcc command, use the -l mrndclient option to link against this library)

Description:

Set a new playlist without interrupting playback. This function can be used only during playback of a playlist (including when it's paused, but not stopped). The new playlist must contain the currently playing track at position n+delta, where n is its position on the old playlist. Note that delta is a signed value, so it can be negative.

Common errors returned by this function and their recommended follow-up actions are:

MMR_ERROR_INVALID_STATE

The context was stopped, not playing. The playback might have reached the end of the old playlist and so it was too late to switch playlists without interrupting playback. To fix, attach the new playlist as an input, seek to the beginning of the appropriate track, and start playback.

MMR_ERROR_INVALID_PARAMETER

The location in the new list you indicated (n + delta) is out of range or refers to a different URL. This error could be caused by a stale delta value, which results when the track you thought was playing just ended and a different track is playing now. To fix, recalculate the difference between the position of the current track on the two lists and call this function again.

Returns:

Zero on success, -1 on failure (use mmr_error_info()).

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus