[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.]
Seek method sets the start and stop positions of the stream.
HRESULT Seek( REFERENCE_TIME tStart, REFERENCE_TIME tStop );
Specifies the start position, in bytes multiplied by 10,000,000.
Specifies the stop position, in bytes multiplied by 10,000,000.
Returns S_OK if the method succeeds, or an error code otherwise.
If the worker thread is running, the method pauses the thread, flushes the filter graph, and resumes the thread. The thread begins pulling data from the new start position. Otherwise, the new position values become effective whenever the thread is started.
Positions are relative to the start of the original source. Multiply the desired byte offsets by the constant UNITS, which is defined in the base class library as 10,000,000.
When the pin first connects, the stop and start positions default to the beginning and end of the stream.