Added mutexs to frame and video to ensure they are threadsafe. Also made adjustments to graphdrawer and fixed small but crucial typo in Tools for affine transform.