ARToolKit | Mailing List Archive |
![]() |
From: | "Patrick Sinclair" <pass99r@e ..............> | Received: | Feb 4, 2002 |
To | artoolkit@h .................. | ||
Subject: | Trouble with DirectShow versions of the ARToolkit | ||
Hi, 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. I’ve tried recompiling everything and I’ve spent the best part of a week trying to understand what how DirectShow works in case something is going wrong but I can’t find anything. I’m using Windows 2000, DirectX 8.1 SDK and Microsoft Studio.net, could this be part of the problem? Please help! Thanks Patrick Sinclair |
From: | "Dirk Harms" <dirk.harms@g .....> | Received: | Feb 4, 2002 |
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 |