8

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?

Matt Kline
  • 10,149
  • 7
  • 50
  • 87

1 Answers1

7

Sample Grabber was deprecated a few years ago, which was a few years after DirectShow development actually stopped. That is, use Sample 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:

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • 1
    I wasn't aware DirectShow development was completely stopped. Is there a new, different library I should use instead? – Matt Kline Nov 07 '11 at 17:40
  • 1
    There has been little new in `DirectShow` during past (8?) years. `Media Foundation` is intended to be a successor, but so far it did not reach the power of `DirectShow` even in latest Windows versions, not even talking about compatibility in previous versions. That is, `DirectShow` is still a perfect choice for multimedia API. – Roman R. Nov 07 '11 at 18:04