tags:

views:

41

answers:

2

Hi All,

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  A: 

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.

Goz
Thanks for the input, will look into that. Not sure how effective this will be with a DVD though but will let you know.
paj7777
+1  A: 

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!

freefallr