mme_set_notification_interval()

Set the time interval between updates during playback

Synopsis:

#include <mme/mme.h>

int mme_set_notification_interval( mme_hdl_t *hdl,
                                   uint32_t time );

Arguments:

hdl
An MME connection handle.
time
The time interval between updates.

Library:

mme

Description:

The function mme_set_notification_interval() configures the MME to deliver the event MME_EVENT_TIME at regular intervals to the client application, when the MME control context to which the client application is connected is playing a file or track.

The argument time sets the event delivery period. The default period is 100 milliseconds.

The deliver period remains constant regardless of the speed of the playback. That is, if the period is set to 100, the MME delivers the event MME_EVENT_TIME to the client application every 100 milliseconds. This represents 100 milliseconds of playback time at the regular speed of 1000, but 200 milliseconds of playback time if the playback speed is 2000.

The only exception is if the playback is stopped, in which case the playback speed is 0 and the MME does not deliver the event MME_EVENT_TIME to the client application.

The table below shows some examples of behavior set by mme_set_notification_interval().

time Playback speed Time between notifications Playback time between notifications
100 1000 100 ms 100 ms
100 2000 100 ms 200 ms
100 500 100 ms 50 ms
200 2000 200 ms 400 ms
100 0 (paused) no notification sent n/a

For more information, see mme_play_set_speed().

Limitations of time reporting accuracy

The accuracy and frequency of time updates depends upon the implementation of the io-media graphs used to process the media, and on the accuracy and frequency of updates delivered by the underlying drivers and hardware. Graphs should attempt to deliver a timing resolution of 100 milliseconds or better, but this resolution is not always available.

The MME delivers the MME_EVENT_TIME event to the client application only when it receives a time update from the device or driver (through io-media). Thus, if, for example, the MME's notification interval to the client application is set to 100 milliseconds, but a driver delivers time position updates to the MME only every 300 milliseconds, the client application will only receive time updates every 300 milliseconds and may see jitter in the time reporting.

Note also that notification intervals are approximate. Actual intervals may vary slightly, depending on the behavior of devices and drivers, and the time required for requesting and receiving time updates.

Events

None delivered

Blocking and validation

This function does not make calls to qdb or io-media. It blocks only at the control context level; that is, it blocks only if other requests are already queued or being processed. It validates that the notification interval is not being set to 0.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_play(), mme_play_get_info() mme_play_get_output_attr() mme_play_get_status() mme_play_output_attr() mme_play_set_speed()