Example #1
0
 void StopEncode()
 {
     videoEncoder.Close();
     StopTrackFrames();
     videoTrack.Close();
     IsEncoding    = false;
     encodedFrames = 0;
 }
Example #2
0
 /// <summary>
 /// 关闭
 /// </summary>
 public void Close()
 {
     if (frameTransmit != null)
     {
         frameTransmit.Dispose();
         frameTransmit = null;
     }
     if (VC != null)
     {
         VC.Close();
         VC = null;
     }
     if (VE != null)
     {
         VE.Close();
         VE = null;
     }
     if (VD != null)
     {
         VD.Close();
         VD = null;
     }
     if (VR != null)
     {
         VR = null;
     }
     if (AC != null)
     {
         AC.Close();
         AC = null;
     }
     if (AE != null)
     {
         AE.Close(); AE = null;
     }
     if (AR != null)
     {
         AR.Close(); AE = null;
     }
     if (cam != null)
     {
         cam.Stop(); cam.Dispose();
         cam = null;
         timer1.Stop();
     }
     //cLocal.Dispose(); cLocal = null;
     //cRemote.Dispose(); cRemote = null;
     //trackBarIn.Dispose(); trackBarIn = null;
     //trackBarOut.Dispose(); trackBarOut = null;
 }