Dispose() public method

Calls Stop, releases all references. If a capture is in progress it will be stopped, but the CaptureComplete event will NOT fire.
public Dispose ( ) : void
return void
Beispiel #1
0
        //public double[] PreivewWindowLoc()
        //{
        //    try
        //    {
        //        //ClsException.WriteToLogFile("PreivewWindowLoc called");
        //        double[] winXY = new double[2];
        //        winXY = capture.PreviewWidowTag();

        //        return winXY;
        //    }
        //    catch (Exception ex)
        //    {
        //        //MessageBox.Show("PreivewWindowLoc"+ex.Message);
        //        return null;
        //    }
        //}

        //public void ShowVideo()
        //{
        //    capture.showVideo();
        //}

        //public void HideVideo()
        //{
        //    capture.hideVideo();
        //}


        void Current_Exit(object sender, ExitEventArgs e)
        {
            try
            {
                if (capture != null)
                {
                    capture.Stop();
                    capture.Dispose();
                }
                if (netp2pDirectXVideoChannel != null)
                {
                    netp2pDirectXVideoChannel = null;
                }
                if (httpDirectXVideoChannel != null)
                {
                    httpDirectXVideoChannel = null;
                }
                VMuktiAPI.VMuktiHelper.UnRegisterEvent("SignOut");
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "Current_Exit", "ctlUserVideo.xaml.cs");
            }
        }
 public void Dispose()
 {
     if (capture != null)
         capture.Dispose();
 }