Is ISampleGrabber out of date?

I have an old computer vision experiment that uses Video for Windows to capture frames from a camera connected to a PC. This is a hack, it uses VfW to create a preview window, then it makes GetDIBits from the DC window.

Finally, I'm ready to post it to DirectShow. I realized that I can capture frames from the video capture graph using ISampleGrabber, but now I read that ISampleGrabber is out of date .

What an easy way to capture frames from a video stream? Should I implement my own DirectShow filter that really does what ISampleGrabber does?

+6
source share
2 answers

DirectShow is not outdated; just a directshow editing service. I would highly recommend using DirectShow because of the much wider level of support if specific MF features are not needed.

For several years, there was no DES development, but the grabber pattern is a widely used filter that is somewhat DES independent. I would be happy to recommend you use it. If there is a problem in future versions of windows, there will be no more than a day or two to replace the filter.

FROM

+6
source

I think that Windows Media Foundation will be the best choice if you focus only on Vista / Win7, otherwise you can still use the DirectShow / SampleGrabber approach, I doubt that it will be deleted in the near future. A related question is here .

+5
source

Source: https://habr.com/ru/post/889001/


All Articles