eleni@1: #include eleni@1: #include eleni@1: eleni@1: #include "frame.h" eleni@1: eleni@1: static pthread_mutex_t video_mutex = PTHREAD_MUTEX_INITIALIZER; eleni@1: static pthread_mutex_t depth_mutex = PTHREAD_MUTEX_INITIALIZER; eleni@1: eleni@1: void init_frame_mx() eleni@1: { eleni@1: pthread_mutex_init(&video_mutex, NULL); eleni@1: pthread_mutex_init(&depth_mutex, NULL); eleni@1: } eleni@1: eleni@1: void video_cb(freenect_device *kin_dev, void *rgb, uint32_t time) eleni@1: { eleni@1: pthread_mutex_lock(&video_mutex); eleni@1: printf("Started video.\n"); eleni@1: pthread_mutex_unlock(&video_mutex); eleni@1: } eleni@1: eleni@1: void depth_cb(freenect_device *kin_dev, void *depth, uint32_t time) eleni@1: { eleni@1: pthread_mutex_lock(&depth_mutex); eleni@1: printf("Started depth.\n"); eleni@1: pthread_mutex_unlock(&depth_mutex); eleni@1: }