Replaced mjpeg_thread_t with std::thread
Made static function passed to std::thread a member function