Microsoft DirectX 8.1 (C++)

IAMPushSource Interface

The IAMPushSource interface provides methods for synchronizing a filter graph that renders a live source (that is, a source that streams data in real time, such as a capture device or a network broadcast). It inherits from the IAMLatency interface.

Source filters that stream live data should expose this interface on their output pins.

Generally, applications should not call the methods on this interface; instead, use the IAMGraphStreams interface. The filter graph manager uses the methods on this interface to address two problems that commonly occur when rendering live sources:

To correct for latency, the filter graph calls IAMLatency::GetLatency on each output pin that exposes the IAMPushSource interface, and determines the maximum latency in the graph. It then calls IAMPushSource::SetStreamOffset on any filters with less than the maximum latency, so that they will adjust the time stamps they generate by the correct offset.

To perform rate matching, the filter graph needs to determine whether the renderer filter can match clock rates with the source filter. The IAMPushSource::GetPushSourceFlags method returns a set of flags indicating whether it is safe for the renderer to match rates with the source.

These issues do not affect capturing to a file. The File Writer filter relies on time stamps on the incoming samples to write the file correctly; the streams are then synchronized during playback. As for rate matching, the data is always written to the file as fast as possible.

In addition to the methods inherited from IUnknown and IAMLatency, the IAMGraphStreams interface exposes the following methods.

Method Description
GetPushSourceFlags Retrieves a combination of flags describing the behavior of the filter.
SetPushSourceFlags Sets flags that specify the behavior of the filter.
SetStreamOffset Sets the offset for time stamps generated by this filter.
GetStreamOffset Retrieves the offset that the filter uses when generating time stamps.
GetMaxStreamOffset Retrieves the maximum stream offset the filter can support.
SetMaxStreamOffset Reference time specifying the maximum stream offset.