Microsoft DirectX 8.1 (C++) |
This section describes how data moves between the application and the DMO.
An application alternates between delivering input buffers and requesting output. It delivers input buffers by calling the IMediaObject::ProcessInput method on the DMO. It requests output by calling the IMediaObject::ProcessOutput method.
There are two ways to stop the flow of input data:
Streaming begins when the application first calls IMediaObject::ProcessInput on the DMO. A DMO will not begin streaming until the application sets media types for all the streams. (Optional streams are an exception; see Discardable and Optional Streams.) Streaming stops when the application flushes the DMO, or signals a discontinuity on every input stream and then processes all of the output. These actions return the DMO to a non-streaming state. The DMO retains all of its media type settings, but it releases all IMediaBuffer pointers. At that point, it cannot generate any more output until the application calls ProcessInput at least once.
The following list is a general outline of the steps needed to process data in a DMO:
You can interrupt steps 4 through 6 by flushing the data.
For details, see How to Process Data with a DMO.