source filter 添加 CSourceSeek 接口

本文概述了DirectShow中应用如何通过调用IMediaSeeking方法进行滤波图寻址的过程。滤波图管理器将寻址请求传递给图中的每个渲染器,并沿上游传播直至达到能执行寻址命令的过滤器,通常是源过滤器或解析过滤器。文章还介绍了过滤器响应寻址命令的具体步骤。

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值