These were the changes I was advised to make by Dirk.
Patrick
---------- Forwarded message ----------
Date: Mon, 4 Feb 2002 21:30:41 +0100
From: Dirk Harms <dirk.harms@g .....>
To: Patrick Sinclair <pass99r@e ..............>, artoolkit@h ..................
Subject: Re: Trouble with DirectShow versions of the ARToolkit
> I'm still having the same problem with the DirectShow versions of the
> ARToolkit. When I start any of the example programs they start up,
> capture the first frame and displays it but they don't get the next
> frame. The problem is almost definitely in the ARFrameGrabber capture
> bit.
Had the same Problem when using a tv Card but it worked with an USB Cam.
Pehaps it dosn't work rigth with VfW Drivers.
Try the following changes:
in ARFrameGrabber::Init
instead of
pSampleGrabber->SetBufferSamples(TRUE);
pSampleGrabber->SetOneShot(TRUE);
pSampleGrabber->SetBufferSamples(FALSE);
pSampleGrabber->SetOneShot(FALSE);
and remove
pMediaEvent->WaitForCompletion(INFINITE, &evCode);
And in the ARFrameGrabber::GrabFrame
remove
pMediaEvent->WaitForCompletion(INFINITE, &evCode);
But then it can happen that the first Frames have the frong Size, so you
have to check the if the Size of the Frame is x*y*4 and if not ruturn
ZUero and change the mainloop of the exview to abourt if the
Framegrabbing returns Zero.
Hope this helps
|