IAMPushSource interface

The IAMPushSource interface synchronizes a filter graph that renders a live source. A live source is a source that streams data in real time, such as a capture device or a network broadcast.

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 IAMPushSource interface inherits from IAMLatency. IAMPushSource also has these types of members:


The IAMPushSource interface has these methods.


Retrieves the maximum stream offset the filter can support.


Retrieves a combination of flags describing the behavior of the filter.


Retrieves the offset that the filter uses when generating time stamps.


Reference time specifying the maximum stream offset.


Sets flags that specify the behavior of the filter.


Sets the offset for time stamps generated by this filter.



The Filter Graph Manager uses the methods on this interface to address two problems that commonly occur when rendering live sources:

  • Latency: When a filter graph includes more than one live source, the sources often have different latencies, which can cause them to be out of sync. For example, if audio capture has a longer latency time than video capture, the audio will lag behind the video unless the graph compensates for the difference.
  • Rate Matching: When a renderer filter is connected to a live source, it must adjust its data consumption rate to match the source filter's production rate. Otherwise, there might be gaps in the data (if the renderer runs faster than the source) or data might get dropped (if the source runs faster).

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.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]


Strmif.h (include Dshow.h)



See also