I have a dll which requires me to set a callback function for it (actually it’s a camera sdk and it will callback my function when it receives a picture).
I want to have multiple (user input) cameras but I can’t.
Since I should make unknown number of callback functions.
The easy way is to make a class (camera) which have a function for its callback.
but I cannot pass the pointer of member of the class to the dll (it only accept (void)(image*))
Any possible solution?
Does camera SDK support multiple cameras connection? If not, you need to talk with SDK provider.
If SDK supports multiple connection, it must provide the way to recognize the camera in callback function. But actual answer is in SDK itself. What is the “image” type, maybe it contains camera ID? Maybe camera ID is supplied when a client code makes callback subscription? Something like this:
Actual answer to your question depends on the camera SDK interface.