关于“在 DirectShow 之外使用 DirectShow 过滤器?”
我在以下链接中有完全相同的问题, 在 DirectShow 之外使用 DirectShow 过滤器? 我是一名刚开始执导节目的人,该堆栈中的两个答案对我来说还不够清楚。而且我找不到联系作者询问他是否解决了问题的方法。有办法做到这一点吗?
或者,有人可以更详细地解释这两个答案吗? “手动”调用各种过滤器”是什么意思以及“包裹整个过滤器图”是什么意思?
I have exactly the same question in the following link,
Using DirectShow filters outside DirectShow?
I am a fresh to direct show and the two answers in that stack is not clear enough to me. And I can not find a way to contact with the author to ask if he solved his problem. Is there a way to do this?
Or, could some one give more detail explain about these two answers? What does it means about " "by hand" call the various filter " and what does it means about "wrap the entire filter graph"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法评论“手动”方法(坏主意,IMO),但使用 DirectShow 的一种选择是将整个过滤器图表包装在媒体基础对象中。所以,是的,媒体基础对象内部将是一个完整的 directshow 图形,以及您感兴趣的过滤器。
当然,这并不简单——对于 directshow 图形,您需要一些输入过滤器,然后可能是一个样本采集器过滤器以从图表中获取样本。您的图表将类似于:
源过滤器 ->一些DMO解码器->样品采集器 -> Null Renderer
...并且样本采集器将在每次样本通过时调用回调。
如果您的解码器过滤器是 DMO,那么它就会变得容易得多。我猜你没有使用 DMO 过滤器?
I can't comment on the "by-hand" method (bad idea, IMO), but one option for using DirectShow is to wrap the entire filter graph in your Media Foundation object. So yes, inside the Media Foundation object would be a full directshow graph, along with the filter(s) that you were interested in.
This, of course, is non-trivial--for the directshow graph, you'd need some input filter, and then probably a sample grabber filter to get samples out of the graph. Your graph would look something like:
Source Filter -> Some DMO Decoder -> Sample Grabber -> Null Renderer
...and the sample grabber would call a callback every time a sample passed through.
If your decoder filter is a DMO, then it becomes much easier. I take it you're not using a DMO filter?