I found something interesting I hope someone can explain to me this behaviour.
Following this example if I use the regular code (around line 108) :
while(_running)
{
cvGetImageRawData(pCapImage, &pCapBuffer;);
CLEyeCameraGetFrame(_cam, pCapBuffer);
cvShowImage(_windowName, pCapImage);
}
The pCapBuffer is updated, BUT if I just do:
while(_running)
{
CLEyeCameraGetFrame(_cam, pCapBuffer);
}
pCapBuffer remais NULL! So for what I see CLEyeCameraGetFrame() just updates pCapBuffer when someone “consumes” it…what I don’t get is how does CLEyeCameraGetFrame() knows that the buffer was read? I was expecting the pCapBuffer to be updated everytime I called CLEyeCameraGetFrame()....is this the regular behaviour for this function or my system has a problem? How can I make CLEyeCameraGetFrame() update the buffer without having to copy it?
Also if someone could point me out how to make a QImage out of this pCapBuffer it will be very helpful!