Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
MmStart

MmStart

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

MmStart()

Start a multimedia graph

Synopsis:

int32_t MmStart(void *element,
                MmTime_t mt);

Arguments:

element
A pointer to a graph or filter.
mt
The current media time, in milliseconds. See below.

Library:

mmedia

Description:

This function starts a graph's filters, or an individual filter if element is a filter, starting at the time mt (in microseconds). The element argument is type void * to prevent compiler errors when you pass different structures as this parameter.

If element is a graph, the function calls all the graph's filters' MediaControl->Start() functions, with the media time mt. It then calls all the filters' MediaControl->Resume() function, since filters are started in a paused state.

You should call MmStart() only once for a graph. If at some point you need to change one of the filters, perform the following steps:

  1. MmPause() the graph.
  2. MmStop() the filter you want to remove.
  3. Detach the filter.
  4. Destroy the filter.
  5. Create a new filter.
  6. Attach the new filter.
  7. MmStart() the new filter.
  8. MmResume() the graph.

If you want to start the graph at a point other than the beginning of the stream (0), you should either seek to a position in the graph, and then start at that position, or start the graph at 0 and then seek to the position:

Example 1:

MmStart(graph, 0);
MmSeek(graph, t);

Example 2:

if(!MmSeek(graph, t))
MmStart(graph, t)

Returns:

0
Success.
-1
An error occurred.

Examples:

  // Assuming the graph is created, and whatever filters
  // were needed are added:

  MmStart(graph,0);

Classification:

Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

MmPause(), MmResume(), MmStop()