IAMPushSource::SetStreamOffset method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SetStreamOffset method sets the offset for time stamps generated by this filter.

Syntax

HRESULT SetStreamOffset(
  [in] REFERENCE_TIME rtOffset
);

Parameters

[in] rtOffset

New stream offset for the filter.

Return value

Returns S_FALSE if the specified offset is larger than the filter's maximum preferred offset. Otherwise, returns S_OK if successful or an HRESULT value indicating the cause of the error.

Remarks

The filter graph calls this method to adjust a filter's stream offset, in order to synchronize streams with different latency values.

If the return value is S_FALSE, the filter might not support a buffer large enough for the requested offset. Unless there is another buffer downstream, data might be lost. To retrieve the filter's maximum preferred offset, call the IAMPushSource::GetMaxStreamOffset method.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IAMPushSource Interface