for connected embedded systems
![]() |
![]() |
![]() |
![]() |
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:
- MmPause() the graph.
- MmStop() the filter you want to remove.
- Detach the filter.
- Destroy the filter.
- Create a new filter.
- Attach the new filter.
- MmStart() the new filter.
- 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()
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)