c++ - DirectShow's SampleGrabber retrieves erroneous sample -


being newbie ds needed samplegrabber can handle videoinfoheader2, imediadet cannot.

so took samplegrabber dx8.1 samples - in contrast stock grabber - allows kind of media. used sample code quite is, , grabbing 1 single frame seems work fine: graph built without returning errorcodes etc. calling

    hr = pseeking->setpositions(          &seek,          am_seeking_absolutepositioning,          null,          am_seeking_nopositioning ); 

with seek = 2

the callback called:

hresult callback( imediasample * psample, reference_time * starttime, reference_time * stoptime, bool typechanged )

the problem buffer: has right size (getsize () == 691200 = 3 byte * 640 * 320) content "205", cannot (in format ever).

suspicious it: parameters of "callback" starttime = 834168, stoptime = 1251251 , typechanged = 1.

i tried showing graph @ graphedit https://msdn.microsoft.com/en-us/library/windows/desktop/dd390650%28v=vs.85%29.aspx?f=255&mspperror=-2147217396 wasn't successful ("application busy" graphedit).

where might problem be?

on windows, memory set various patterns debug invalid memory references. 205 0xcd in hex, , means uninitialized heap memory. not getting "erroneous" data, data never getting written.

you may not able seek. did try calling isformatsupported


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -