I have a DLL for which I have to set a callback function for it (in fact it is a camera SDK and it is Callback my function when it receives a photo). I have more than one (user input) camera but I can not do as I should make an unknown number of callback functions.
The easy way to create a class (camera) is its callback function. But I can not pass the point to the CLL member DLL (this only accepts (zero) (image *))
Any possible solution?
Does the camera SDK support many camera connections? If not, you need to talk to the SDK provider.
If SDK supports multiple connections, then it must provide a way to identify the camera in the callback function. But the actual answer is in the SDK what is the "image" type, maybe it has a camera ID? Maybe the camera ID is provided when creating a client code callback subscription? Something like this:
zero callback (image *); Zero callback 1 (image *); Subscriber Image Callback (0, Callback 0); // Camera 0 Subscription Image Callback (1, Callback 1); // camera 1
The actual answer to your question depends on the camera SDK interface.
Comments
Post a Comment