mme_ms_restart()

Request that a media store be restarted

Synopsis:

#include <mme/mme.h>

int mme_ms_restart( mme_hdl_t *hdl,
                    uint64_t msid );

Arguments:

db
An MME connection handle.
msid
The ID of the mediastore to restart.

Library:

mme

Description:

The function mme_ms_restart() causes the specified mediastore to go through an “active” to “nonexistent” transition, followed by an insertion to the “active” state.

When the state of a mediastore changes from another state to “nonexistent”, the MME always prunes the entries for that mediastore from its database, no matter what the pruning configurations. Thus, when mme_ms_restart() is successful, when the mediastore restarts it appears to the MME as a new mediastore, and the MME assigns it a new mediastore ID.


Caution: mme_ms_restart() is:
  • not the recommended method for rediscovering a mediastore. It may be changed or removed from the MME API.
  • not supported for mediastores that are not active, or for mediastores that use an mmdev handler plugin.

Events

None delivered.

Blocking and validation

This function validates the request and runs asynchronously, so it may fail after returning success. The calling application must examine the mediastore state change events to determine if the entire operation finished successfully.

Calls using that MME handle used by mme_ms_restart() will fail until the operation is complete, even if the call to mme_ms_restart() has returned.

Returns:

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

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

Mediastore states in the chapter Working with Mediastores of the MME Developer's Guide