windows DirectShow 与 Media Foundation 的视频捕获?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4407446/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
DirectShow vs. Media Foundation for video capture?
提问by Roddy
I'm trying to choose between these two APIs for a Video Capture/Monitoring/Streaming application, and I'm not sure which is going to be the best bet.
我正在尝试为视频捕获/监控/流媒体应用程序在这两个 API 之间进行选择,但我不确定哪个是最好的选择。
A bit of background:
一点背景:
- I need it to work with a wide range of video capture cards/dongles.
- The app will likely be developed in C++ so a native API is essential
- Performance is important, as I need to handle multiple video streams
- 我需要它与各种视频采集卡/加密狗一起工作。
- 该应用程序可能会使用 C++ 开发,因此原生 API 必不可少
- 性能很重要,因为我需要处理多个视频流
A bit of googling has given me the impression that
有点谷歌搜索给我的印象是
- MF only supports video capture on Win 7
- Directshow is better supported , but will become obsolete
- MF can offer better performance in some applications
- MF 仅支持 Win 7 上的视频捕获
- Directshow 得到更好的支持,但会过时
- MF 在某些应用中可以提供更好的性能
MF feels a better bet going forwards, but I'm concerned about ending up in a technological dead-end if MF doesn't 'catch on' and Directshow remains the API of choice. Suggestions and advice, please...
MF 感觉是一个更好的选择,但我担心如果 MF 没有“迎头赶上”并且 Directshow 仍然是首选的 API,我担心最终会陷入技术死胡同。建议和意见,请...
回答by Dee Mon
Whatever marketers from MS say, DirectShow is here to stay. Too many applications use it, so MS will support it forever, just as all other COM-based technologies. And since DirectShow has much more features and is native for C++ programming, I suggest sticking with it.
无论 MS 的营销人员怎么说,DirectShow 都将继续存在。太多的应用程序使用它,所以 MS 将永远支持它,就像所有其他基于 COM 的技术一样。而且由于 DirectShow 具有更多功能并且是 C++ 编程的本机,我建议坚持使用它。