private void Record_Button_Unchecked(object sender, RoutedEventArgs e) { activeEncodingThread = false; pauseEvent.Reset(); h264Encoder.FlushEncode(); h264Encoder.Dispose(); frameNumber = 0; }
public int StopRecord2() { try { isEncodingThreadRunning2 = false; isEncodingEvent2.Reset(); h264Encoder2.FlushEncode(); h264Encoder2.Dispose(); frameNumber2 = 0; isRecordComplete2 = true; } catch (Exception ex) { Console.WriteLine(ex.ToString()); return(-1); } return(0); }