Media Source Object Model
This topic describes the object model for media sources in Microsoft Media Foundation. A media source must implement two objects:
- A presentation descriptor, which describes the contents of the source, including the number of streams and the format of each stream. For more information about presentation descriptors, see Presentation Descriptors.
- One or more media streams, which generate the source data.
The source does not create the streams until playback starts.
Media Source Interfaces
A media source must expose the following interfaces through QueryInterface.
|IMFMediaSource||Required for all media sources.|
|IMFMediaEventGenerator||Required for all media sources. The IMFMediaSource interface inherits this interface.|
Optionally, a media source can implement the IMFGetService interface and implement any of the following interfaces as services:
|IMFRateControl||Controls the playback rate.|
|IMFRateSupport||Reports the range of playback rates that are supported.|
|IMFQualityAdvise||Enables the quality manager to adjust the audio or video quality.|
If the media source can play at rates other than normal speed (1.0), it should expose the rate control service (IMFRateControl and IMFRateSupport). Otherwise, it is assumed that the source only supports playback at normal speed. For more information, see Implementing Rate Control.
Media Stream Interfaces
Media streams must implement the following interfaces.
|IMFMediaStream||Required for all media streams.|
|IMFMediaEventGenerator||Required for all media streams. The IMFMediaStream interface inherits this interface.|
Currently no service interfaces are defined for media streams.