mme_trksessionview_update()

Update the information in the trksessionview table

Synopsis:

#include <mme/mme.h>

int mme_trksessionview_update( mme_hdl_t *hdl );

Arguments:

hdl
An MME connection handle.

Library:

mme

Description:

The function mme_trksessionview_update() causes the MME to update the information for the current control context .

The trksessionview table stores static snapshots of track sessions at the time that they are set. The entries in this table do not, therefore, reflect changes to the database that have occurred since the track session was set. For example, files and metadata that were added to the database after the track session was set remain unknown to the track session.

To update the track session snapshot with the latest information provided by a concurrent synchronization, call mme_trksessionview_update().

The track session view is accurate in memory as soon as mme_trksessionview_update() returns, regardless of whether the connection is synchronous our asynchronous. However, depending on how the MME is configured, the updates may or may not have been written to the trksessionview table. Only receipt of the MME_EVENT_TRKSESSIONVIEW_COMPLETE event confirms that the updates have been written to the trksessionview table.

If your system is configured not to automatically write track session view updates to the database (<TrksessionViewAutoWrite> set to false), you must call mme_trksessionview_writedb() to update the trksessionview table.


Note: For both library-based and file-based track sessions, a call to mme_trksessionview_update() refreshes the pseudo-random order of the tracks in the track session.

For more information, see Working with track sessions in the chapter Playing Media of the MME Developer's Guide.

Events

Client applications that call mme_trksessionview_update() can expect to see the following sequence of events:

  1. MME_EVENT_TRKSESSIONVIEW_INVALID
  2. MME_EVENT_TRKSESSIONVIEW_UPDATE — one or more times, if your system is configured to write updates to the database
  3. MME_EVENT_TRKSESSIONVIEW_COMPLETE — when the track session snapshot is written to the trksessionview table

Blocking and validation

This function doesn't block.

Returns:

0
Success: the MME updated the state of the current track session.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_play_resume_msid(), mme_trksession_get_info(), mme_set_msid_resume_trksession(), mme_trksession_resume_state(). mme_trksession_save_state()