开发者

Grabbing images from a DVD using direct show

开发者 https://www.devze.com 2023-01-19 22:59 出处:网络
Is anybody aware of a way of grabbing images from a DVD using DirectShow and C++?The sample grabber is not supported when using the DVD renderer and if I use GetCurrentImage开发者_如何学JAVA, which is

Is anybody aware of a way of grabbing images from a DVD using DirectShow and C++? The sample grabber is not supported when using the DVD renderer and if I use GetCurrentImage开发者_如何学JAVA, which is part of the VMR9 windoless control, it doesn't appear to work.


Check out the "SampVid" sample in the directshow samples:

http://msdn.microsoft.com/en-us/library/dd375468(VS.85).aspx

With that you can write your own video renderer filter. The only issue you'll have is how to capture the frmae as it all goes through "CDrawImage" class. The source code to which is contained in winutil.h &.cpp which are included in the direct show base classes. Rolling your own version would solve your issue and allow you to grab a frame of image data as it is being written to the screen.


Write a trans-in-place video filter, which you can use to grab a sample and write it to disk.

When you detect a keypress (for screenshot), call a callback into your program from the filters' Transform() function.

Have a look at MSDN's guide on Writing Transform Filters for more information on writing filters.

You could check out the EZRGB24 filter sample from MSDN, which demonstrates how to use the CTransformFilter

Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消