Callback Method in new SDK?

Share source code samples for use with the Camera SDK
Post Reply
avelazquez
Posts: 19
Joined: Mon Jun 07, 2010 7:40 am

Callback Method in new SDK?

Post 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!
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Callback Method in new SDK?

Post 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.
Post Reply