using namespace testing;
using namespace std;
-
-
// A part of PoseVector should be moved to a common header.
struct Point3f
{
bool is_loop_exit = false;
};
+static Context context {};
+
+static void signalCallbackHandler(int signum)
+{
+ cout << "Terminating..." << endl;
+ context.is_loop_exit = true;
+}
+
void user_callback(void *user_data)
{
Context *context = static_cast<Context *>(user_data);
int main(const int argc, const char *argv[])
{
- Context context {};
-
+ signal(SIGINT, signalCallbackHandler);
singleo_service_create("service=smart_pointer, input_feed=camera, camera_id=4, fps=30, async=0",
&context.handle);