Click to See Complete Forum and Search --> : [HELP] DirectShow Preview / Snapshot using Sample grabber


Bona
March 20th, 2005, 01:53 PM
I built up the following Filter graph:
Route1: SVideo CrossBar --> Video Capture (Capture OutputPin) --> AVI Decompressor --> Sample Grabber --> Video Renderer
Route2: SVideo CrossBar --> Video Capture (VP OutputPin) --> Overlay Mixer --> Video Renderer 0001

The graph is automatically generated by IGraphBuilder2:
RenderStream(&PIN_CATEGORY_PREVIEW, pSrcFilter, NULL, NULL).
RenderStream(&PIN_CATEGORY_CAPTURE, pSrcFilter, pSampleGrabberFilter,NULL).
The Grabber's mediaType settings:
majortype = MEDIATYPE_Video;
subtype = MEDIASUBTYPE_RGB24;
Grabber setting: SetOnShot(FALSE), SetBufferSamples(TRUE)

It seems that this graph runs well in the Graph Edit (Utility of DirectShow), with two Active Video Windows viewed.

However, it doesn't work well in my program.
The Grabbered frame is the one when starting the S-Video, and remain the same afterwards. Why the buffer doesn't update?