Page 1 of 1

Callback Method in new SDK?

Posted: Mon Nov 15, 2010 11:47 am
by avelazquez
Is the callback method set up differently on the new SDK, if so how do I go about getting my hands on Sample code...

Thanks!

Re: Callback Method in new SDK?

Posted: Mon Nov 15, 2010 3:54 pm
by beckdo
Callbacks are similar in nature, but much easier to implement with the Camera SDK.

If you have an object that you want to receive callbacks you inherit the camera listener. Then register the listener with the camera as such:

class cMyClass : public cCameraListener
{
...
}

then lets say you have created a cMyClass and have a pointer to it named myClass:

camera->RegisterListener(myClass);

Then you just override the FrameAvailable callback function in your class and it will get called whenever a new frame is available for the camera(s) the listener is attached to.