mmr_seek()

Updated: May 06, 2022

Seek to a position

Synopsis:

#include <mm/renderer.h>
int mmr_seek(mmr_context_t *ctxt,
             const char *position)

Arguments:

ctxt
A context handle
position
The position to seek to, in a media-specific format

Library:

mmrndclient

Description:

Seek to a known position in a single track or a track within a playlist.

The required format of the position string depends on the type of the attached input.

For the track type, the position is simply the number of milliseconds from the start of the track (e.g., 2500). We refer to this time measurement as the track offset.

For the playlist and autolist types, the position must be specified as two numbers separated by a colon (e.g., 2:1200), where the first number is the track index within the playlist and the second number is the track offset. For an autolist input, the first number must be 1.

Returns:

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