IAMPushSource interface (strmif.h)
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.
The GetMaxStreamOffset method retrieves the maximum stream offset the filter can support.
The GetPushSourceFlags method retrieves a combination of flags describing the behavior of the filter.
The GetStreamOffset method retrieves the offset that the filter uses when generating time stamps.
The SetMaxStreamOffset method specifies the stream offset that will be allowed in the filter graph.
The SetPushSourceFlags method sets flags that specify the behavior of the filter. Currently, applications should not call this method, because request flags are not supported and an application should not override the flags set by the filter.
The SetStreamOffset method 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).
IAMPushSourceinterface, 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]|
|Header||strmif.h (include Dshow.h)|