DirectShow - 获取视频帧
我正在创建一个 Windows 视频捕获应用程序并使用 DirectShow 进行捕获。当每个帧进入时,我想将其作为原始 RGB 位图抓取到缓冲区中,此时我的代码将执行我需要的任何处理。
我一直在寻找与我想要做的类似的示例,无论我在网上查找什么,人们都建议使用 IMediaDet 和/或 ISampleGrabber 接口进行框架-逐帧捕捉。不幸的是,两者都已被弃用,甚至不在最新版本的 Windows SDK 中。
在 DirectShow 中进行逐帧捕获的最佳(现代)方法是什么?如果没有,是否应该使用不同的库来进行逐帧捕获?
I'm creating a Windows video capture application and am using DirectShow for capture. As each frame comes in, I want to grab it as a raw RGB bitmap into a buffer, at which point my code will do whatever processing I need.
I've been searching for samples similar to what I want to do, and everywhere I look online, people recommend using either the IMediaDet and/or the ISampleGrabber interface to do frame-by-frame capture. Unfortunately, both are deprecated and aren't even in the newest version of the Windows SDK.
What is the best (modern) way to do frame-by-frame capture in DirectShow? If there is none, is there a different library I should use that will give me frame-by-frame capture?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Sample Grabber
几年前已被弃用,那是在 DirectShow 开发实际停止几年后。也就是说,按照建议的方法使用Sample Grabber
进行阅读,它将非常适合您。您唯一需要的是将定义复制到源代码中,请参阅详细信息:
Sample Grabber
was deprecated a few years ago, which was a few years after DirectShow development actually stopped. That is, useSample Grabber
as you read as suggested method and it is going to work great for you.The only thing you will additionally need is to copy definitions int your source code, see details: