mmr_speed_set()

Set the play speed, in units of 1/1000 of normal speed.

Synopsis:

#include <mm/renderer.h>
int mmr_speed_set( mmr_context_t *ctxt, 
                   int speed )

Arguments:

ctxt
A context handle.
speed
The new speed.

Library:

mmrndclient

Description:

Set the play speed, in units of 1/1000 of normal speed. If the context is playing (including if it's paused), the new speed is applied immediately; otherwise, it's stored in the context and applied the next time mmr_play() is called.

Use a speed of zero (0) to pause playback. Depending on the input media, speeds other than the normal speed (1000) may be unsupported or forbidden, either completely or only for some portions of the media. For instance, a playlist may contain some tracks that don't support trick play; some devices have only one fast-forward speed; and DVDs forbid pausing or fast-forwarding through menus and some portions of titles.

If an mmr_speed_set() call requests a trick-play speed (negative, slower than normal, or faster than normal) and the exact value is completely unsupported by the current input, the speed may be rounded to a supported value in the same category (negative vs. slow vs. fast). If the entire category is unsupported, the call fails. For more information, see "Playing media".

If the call was made during playback, and the speed (after the rounding described above) is unsupported or forbidden at the current playing position, the speed changes to an allowed value and the call succeeds. A similar speed change may occur in the mmr_play() call, based on the curent speed and position, and during playback if a position is reached (by playing or by an explicit seek request) where the current play speed is unsupported or forbidden. The navigation rules for the input media may also specify other circumstances that cause the speed to change to normal during playback. In particular, when playing a simple track or a playlist, it is configurable whether the speed reverts to normal at track boundaries.

Returns:

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

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes