public int Close()
 {
     try
     {
         HCNetSDK.NET_DVR_Logout_V30(_deviceInfo.ServiceID);
         HikPlayer.PlayM4_ReleaseDDrawDevice();
         foreach (var c in HikVideoServerCameraDriver.ListSerialHandle)
         {
             if (c.Key == _deviceInfo.DeviceId)
             {
                 HCNetSDK.NET_DVR_SerialStop(c.Value);
             }
         }
         HikVideoServerCameraDriver.ListSerialHandle.Remove(_deviceInfo.DeviceId);
         return(1);
     }
     catch (Exception ex)
     {
         ErrMessage = ex.Message;
         return(-1);
     }
 }