source filter 添加 CSourceSeek 接口

Overview of Seeking in DirectShow

An application seeks the filter graph by calling an IMediaSeeking method on the Filter Graph Manager. The Filter Graph Manager then distributes the call to every renderer in the graph. Each renderer sends the call upstream, through the output pin of the next upstream filter. The call travels upstream until it reaches a filter that can execute the seek command, typically a source filter or a parser filter. In general, the filter that originates the time stamps also handles seeking.

A filter responds to a seek command as follows:

  1. The filter flushes the graph. This clears any stale data from graph, which improves responsiveness. Otherwise, samples that were buffered prior to the seek command might get delivered.
  2. The filter calls IPin::NewSegment to inform downstream filters of the new stop time, start time, and playback rate.
  3. The filter then sets the discontinuity flag on the first sample after the seek command.

Time stamps start from zero after any seek command (including rate changes).

转自:http://msdn.microsoft.com/en-us/library/dd758085%28v=vs.85%29.aspx

你可能感兴趣的:(source filter 添加 CSourceSeek 接口)