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


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


A context handle.
The new speed.




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, trick play, which entails playing at speeds other than normal speed (1000), may be unsupported or forbidden, either completely or only for some portions of the media. Examples of this include:

If an mmr_speed_set() call requests a speed for trick play but the exact value is completely unsupported by the current input, the speed may be rounded to a supported value in the same category (e.g., negative, slow, or fast). If the entire category is unsupported, the call fails.

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 is changed 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, you can configure whether the speed reverts to normal when track boundaries are reached during playback.


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


QNX Neutrino

Interrupt handler No
Signal handler No
Thread Yes