Microsoft DirectX 8.0 |
This interface provides methods for controlling the behavior of a filter graph that renders a live source. (A live source is one that streams data in real time, such as a capture device or a network broadcast). The Filter Graph Manager implements this interface.
Applications can call methods on this interface to specify how the graph handles latency and synchronization when rendering a live source. For more information, see Live Sources.
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IAMGraphStreams methods Description FindUpstreamInterface Searches upstream from the specified pin for a pin or filter that supports the specified interface. SyncUsingStreamOffset Enables or disables synchronization using time-stamp offsets. SetMaxGraphLatency Sets the maximum latency for the graph.
Searches upstream from the specified pin for a pin or filter that supports the specified interface.
Syntax
HRESULT FindUpstreamInterface( IPin *pPin, REFIID riid, void **ppvInterface, DWORD dwFlags );
Parameters
- pPin
- [in] Pointer to the IPin interface of the pin from which to begin searching.
- riid
- [in] Reference identifier of the interface to find.
- ppvInterface
- [out, iid_is(riid)] Address of a void pointer. If the method succeeds, this variable receives a pointer to the interface specified by riid.
- dwFlags
- [in] Combination of flags from the AM_INTF_SEARCH_FLAGS enumeration, specifying what to search (pins or filters).
Return Value
Returns one of the following HRESULT values.
E_NOINTERFACE Interface not found. E_POINTER Invalid pointer. S_OK Success.
Sets the maximum latency for the graph. You must call the SyncUsingStreamOffset method before calling this method.
Syntax
HRESULT SetMaxGraphLatency( REFERENCE_TIME rtMaxGraphLatency );
Parameters
- rtMaxGraphLatency
- [in] Reference time that specifies the maximum latency.
Return Value
Returns S_OK if successful. If SyncUsingStreamOffset was not called, the method returns E_FAIL. Otherwise, it returns another HRESULT value.
Remarks
At connection time, some live source filters use the maximum latency to determine the size of buffer to allocate. Calling this method before constructing the graph can help to ensure that sufficient buffers are allocated for the expected latency.
Enables or disables synchronization using time-stamp offsets.
Syntax
HRESULT SyncUsingStreamOffset( BOOL bUseStreamOffset );
Parameters
- bUseStreamOffset
- [in] Boolean value indicating whether to use a time-stamp offset. If TRUE, live sources will use a time-stamp offset to synchronize streams.
Return Value
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
By default, the filter graph does not attempt to synchronize live streams by means of time-stamp offsets. Call this method with a value of TRUE if you want the filter graph to determine the maximum latency in the graph and adjust time stamps accordingly. For more information, see IAMPushSource::SetStreamOffset.