public void Stop() { DebugTrace.TraceVerbose("Stop called by: \r\n" + new StackTrace(1, true).ToString()); if (playerThread != null) { if (playerThread.IsAlive) { running = false; isRecording = false; DebugTrace.TraceInfo("Camera stop request sent. Waiting ..."); playerThread.Join(500); if (playerThread.IsAlive) { DebugTrace.TraceWarning("Killing camera thread"); playerThread.Abort(); playerThread.Join(); } } playerThread = null; } }