Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

MmStop()

Stop a multimedia graph

Synopsis:

int32_t MmStop(const void *element);

Arguments:

element
A pointer to a graph or filter.

Library:

mmedia

Description:

If element is a graph, this function signals all of the filters in the graph to stop. If element is a filter, the function signals that filter to stop. MmStop() calls the MediaControl->Stop() for each filter to signal the stop.

Once all signals have been sent, the function waits for the Status() function in the MediaControl interface instance of each filter to return MM_STATUS_STOPPED.

Call this function for a graph only once, just before you detach (MmDetach()) and destroy (Destroy()) all the filters in the graph.

Returns:

0
Success.
-1
An error occurred.

Examples:

  // Assuming the graph is created and previously started:

  MmStop(graph);

  // Assuming the given filter is created and hooked up,
  // and for some reason we want to stop it:

  MmStop(filter);

Classification:

Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

MmPause(), MmResume(), MmStart()