Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This topic 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::ProcessInputmethod on the DMO. It requests output by calling the IMediaObject::ProcessOutputmethod.

The following list shows the two ways to stop the flow of input data:

  • Discontinuity. When the application reaches the end of the input data, or there is a break in the data, the application signals a discontinuity. A discontinuity informs the DMO that no further input is expected. At that point, the DMO might still have data to process, so the application should request output until the DMO signals there is none left.

  • Flushing. The application can interrupt the data flow by flushingthe DMO. If the DMO was buffering data internally, it releases that data.

Streaming begins when the application first calls IMediaObject::ProcessInputon 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 nonstreaming state. The DMO retains all of its media type settings, but it releases all IMediaBufferpointers. At that point, it cannot generate output until the application calls ProcessInputat least once.

To stream data
  1. Query the DMO for the number of streams it supports and the preferred media types for each stream.

  2. Set media types for all the streams.

  3. Allocate input buffers and output buffers.

  4. Fill the input buffers with data and call ProcessInput.

  5. Call ProcessOutputand retrieve the output data. Repeat steps 4 and 5 until all of the input data is processed.

  6. Signal a discontinuity and process any remaining output.

    Note:
    You can interrupt steps 4–6 by flushing the data.

See Also