capture/motiondetector/fileaction: change the thread sync mechanism for mutexes / condition variables.