Dear All,
I am studying the Cloud Recognition application on Android platform and have a specific question regarding a callback function. In CloudReco.java, the initApplicationNative method is called in the main thread in the onCreate method. Looking at the implementation of this method in CloudReco.cpp, it registers a callback function through "QCAR::registerCallback(&updateCallback);". Digging into the updateCallback object, the function to be called is identified as virtual void QCAR_onUpdate(QCAR::State& state). My question is: when this function is called, does it start a new thread or not? If so, what other functions in CloudReco.cpp also live in this new thread? Thank you for your time.
Best Regards,
Peng
Hi, the QCAR_onUpdate(QCAR::State& state) is called for every camera frame that is processed by QCAR;
the function itself does not create a new thread; the QCAR engien will block on it, i.e. it will not continue processing until that method is completely executed; this also means that if you put very computational intensive tasks in it, you may slow down the frame rate