Exemple #1
0
 public bool Close()
 {
     try
     {
         //if (_call_back != null)
         //{
         //    _call_back = null;
         //}
         // 关闭音频
         CloseSound();
         // 视频
         StopAllRealPlay();
         // 释放音频解码
         HCNetSDK.NET_DVR_ReleaseG722Encoder(_dec_handle);
         // 关闭警告
         if (_alarm_handle > 0)
         {
             HCNetSDK.NET_DVR_CloseAlarmChan_V30(_alarm_handle);
         }
         if (!HCNetSDK.NET_DVR_Logout(_user_id))
         {
             return(false);
         }
         if (!HCNetSDK.NET_DVR_Cleanup())
         {
             return(false);
         }
         return(true);
     }
     catch (Exception ex)
     {
         WriteLog("硬盘录像机关闭失败:" + ex.Message);
         return(false);
     }
 }
Exemple #2
0
 public bool Close()
 {
     HCNetSDK.NET_DVR_ReleaseG722Encoder(_dec_handle);
     if (!SDK_Logout())
     {
         return(false);
     }
     return(SDK_Cleanup());
 }