Am 24.09.2012 um 20:12 schrieb William Koperwhats <[email protected]>:

> Christian (et. al.),
> 
> I've got most of the pieces of the DirectShow version of my app figured out, 
> but there is one thing that I am still confused about, that is dynamically 
> updating the size of the DirectShow grabber frame. I see how this is 
> accomplished in the example app, the DS video window is resized to match the 
> size of the canvas. This effectively resizes the *window* image, but the 
> actual frame (DirectShowSampleGrabber.Current) remains at the default size. 

Yes. Isn't the frame size the resolution of the camera?

> My app requires processing the grabber image *before* it gets displayed so I 
> currently dynamically resize and move the DSVideoWindow "off screen" during 
> the main window's "Resizing" and "Resized" events. In the graber NewFrame 
> event I pass the Current [frame] to the main window for display. The problem 
> is that the Current [frame] doesn't get resized with the video window. Using 
> the QuickTime grabber class, all that was required was to re-initalize the QT 
> frame buffer to the new window size, but this doesn't seem to be possible in 
> DirectShow. I could process and scale the frame to match the new window size, 
> but not only is that incredibly processor intensive, the frame has *already* 
> been scaled for the (hidden) video window…

The image is not available in that size. The grabber gets it earlier in the 
chain, so it has original size.

> 1. Is there some way to dynamically change the size of the 
> DirectShowSampleGrabber.Current [frame]?

As far as I know: no

> 2. If not, what would be the most efficient method of accomplishing what I 
> need to do?

Use draw picture with right destination size, so the gdi functions can scale 
it. Hopefully with hardware acceleration.


Greetings
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to