public bool VideoClose()
        {
            CommonMethod.LogWrite.WriteEventLog("EzvizLog", "VideClose", ProgParameter.ProgLogAddress);
            bool bolResult = false;

            SDK_EzvizSDK.OpenSDK_StopRealPlayEx(intptrSessionID);
            SDK_EzvizSDK.OpenSDK_FreeSession(intptrSessionID.ToString());

            //if (Ezviz_gchMsgBack != null && Ezviz_gchMsgBack.IsAllocated)
            //{
            //    Ezviz_gchMsgBack.Free();
            //}
            if (CurrentVideoPlaySet.VideoRecordEnable)
            {
                byte[] bytsSource = lstVideoRecord.ToArray();
                lstVideoRecord.Clear();
                Ezviz_GenerateRecord(bytsSource, strRealSavePath);
                //if (Ezviz_gchVideoRecord != null && Ezviz_gchVideoRecord.IsAllocated)
                //{
                //    Ezviz_gchVideoRecord.Free();
                //}
            }
            else
            {
                lstVideoRecord = new List <byte>();
            }
            VideoRecordStatus = false;
            intptrSessionID   = IntPtr.Zero;
            strRealSavePath   = "";
            if (ProgParameter.Ezviz_VideoPlayEnvironmentReset)
            {
                SDKState.Ezviz_SDKRelease();
            }
            return(bolResult);
        }
 private void button3_Click(object sender, EventArgs e)
 {
     SDKState.Ezviz_SDKRelease();
 }
 private void Frm_VideoPlayGroupControls_PTZAndTalk_FormClosing(object sender, FormClosingEventArgs e)
 {
     videoPlayGroupControls_PTZAndTalk1.ControlClose();
     SDKState.Ezviz_SDKRelease();
 }