About “Using DirectShow filters outside DirectShow?”

南楼画角 提交于 2019-12-10 10:41:25

问题


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"?


回答1:


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?



来源:https://stackoverflow.com/questions/6016329/about-using-directshow-filters-outside-directshow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!