Grabbing images from a DVD using direct show

倖福魔咒の 提交于 2020-01-02 08:57:16

问题


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, which is part of the VMR9 windoless control, it doesn't appear to work.


回答1:


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.




回答2:


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!



来源:https://stackoverflow.com/questions/3941680/grabbing-images-from-a-dvd-using-direct-show

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!