为什么我会以相同的采样时间从 DirectShow 捕获过滤器获取连续的媒体样本?

发布于 2024-12-19 13:42:06 字数 459 浏览 2 评论 0原文

我有一个使用 DSPACK 组件库用 Delphi 6 编写并在 Windows XP 上运行的 DirectShow 应用程序。我的过滤器图的顶部是一个音频捕获过滤器。捕获过滤器分配给我的 VOIP 电话,并且立即有一个样本采集过滤器。在样本采集器过滤器的回调方法中,我添加了代码,每当我从样本采集器过滤器连续获取两个具有相同时间戳(SampleTime)的媒体样本时就进行报告。这种情况经常发生,有时几乎每次都会发生。请注意,捕获滤波器的缓冲区大小为 100 毫秒,采样率为 8000 kHz。逻辑告诉我,我永远不应该获得具有相同采样时间的两次采样交付,并且它们之间的间隔应该始终非常接近 100 毫秒。但事实并非如此。

当 DirectShow 捕获过滤器向您发送具有相同采样时间的 2 个连续媒体样本时,这意味着什么?我是否应该忽略与前一个样本时间相同的第二个样本交付?或者还有其他问题需要我解决吗?

请注意,我无法控制进入我的采样时间。它们是由捕获过滤器生成的。

I have a DirectShow application written in Delphi 6 using the DSPACK component library and running on Windows XP. At the top of my filter graph is an audio capture filter. The capture filter is assigned to my VOIP phone and has a sample grabber filter immediately down streeam. In the sample grabber filter's callback method, I added code to report whenever I get two media samples in a row from the sample grabber filter with identical timestamps (SampleTime's). That condition is occurring quite frequently, sometimes nearly every time. Note, the capture filter has a buffer size of 100 milliseconds and a sample rate 8000 kHz. Logic tells me that I should never get two sample deliveries with identical sample times and that they should be always very close to 100 milliseconds apart. But that is not what's happening.

What does it mean when a DirectShow capture filter sends you 2 successive media samples with identical sample times? Should I ignore the second sample delivery that has the same sample time as a previous one? Or is there another problem somewhere that I need to address?

Note, I have no control over the sample times coming in to me. They are being generated by the capture filter.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独孤求败 2024-12-26 13:42:06

真正的错误是我在计算时间戳时犯的错误。捕获过滤器不承担责任。我会投票结束我的帖子,除非有一个关于名为 DumpMediaSample 的实用程序的有价值的评论(请参阅我原始帖子的评论部分)。

The real error was a mistake I made in calculating timestamps. The capture filter was not responsible. I'd vote to close my post except there's a valuable comment to it about a utility called DumpMediaSample (see comments section to my original post).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文