diff --git a/EC.Util/CameraSDK/Common/CameraFactory.cs b/EC.Util/CameraSDK/Common/CameraFactory.cs index aa9dd3e..488f92c 100644 --- a/EC.Util/CameraSDK/Common/CameraFactory.cs +++ b/EC.Util/CameraSDK/Common/CameraFactory.cs @@ -1,7 +1,40 @@ -namespace EC.Util.CameraSDK; +using System.IO.Compression; +using System.Runtime.InteropServices; + +namespace EC.Util.CameraSDK; public class CameraFactory { + static CameraFactory() + { + string zipPath = Path.Combine("libs", "cameraSdks.zip"); + if (!File.Exists(zipPath)) throw new FileNotFoundException(zipPath); + using ZipArchive archive = ZipFile.OpenRead(zipPath); + bool isWin = RuntimeInformation.IsOSPlatform(OSPlatform.Windows), is64 = Environment.Is64BitProcess; + string sysEnv = string.Format("{0}{1}", isWin ? "win" : "linux", is64 ? "64" : "32"); + string hkOrDir = $"cameraSdks/hik/{sysEnv}/"; + string dhOrDir = $"cameraSdks/dahua/{sysEnv}/"; + string ysOrDir = $"cameraSdks/yushi/{sysEnv}/"; + foreach (ZipArchiveEntry entry in archive.Entries) + { + if (entry.Length == 0) continue; + string fullName = entry.FullName, fileExtPath = string.Empty; + if (fullName.StartsWith(hkOrDir)) + fileExtPath = Path.Join("libs", "hik", fullName[(hkOrDir.Length - 1)..]); + else if (fullName.StartsWith(dhOrDir)) + fileExtPath = Path.Join("libs", "dahua", fullName[(dhOrDir.Length - 1)..]); + else if (fullName.StartsWith(ysOrDir)) + fileExtPath = Path.Join("libs", "yushi", fullName[(ysOrDir.Length - 1)..]); + if (string.IsNullOrEmpty(fileExtPath)) continue; + FileInfo fi = new(fileExtPath); + if (fi.Directory != null && !fi.Directory.Exists) fi.Directory.Create(); + if (!fi.Exists) entry.ExtractToFile(fileExtPath); + } + } + + public static void VirtualInit() + { } + public static ICameraSDK BuildCameraSdk(CameraInfo info) { ICameraSDK sdk = (info.Manufactor) switch diff --git a/EC.Util/CameraSDK/DaHua/DaHuaOriSDK.cs b/EC.Util/CameraSDK/DaHua/DaHuaOriSDK.cs index f4408b1..1b8c87f 100644 --- a/EC.Util/CameraSDK/DaHua/DaHuaOriSDK.cs +++ b/EC.Util/CameraSDK/DaHua/DaHuaOriSDK.cs @@ -1,4 +1,6 @@ -using System.Runtime.InteropServices; +#define Win + +using System.Runtime.InteropServices; namespace EC.Util.CameraSDK; @@ -6,9 +8,13 @@ public static class DaHuaOriSDK { #region Lib Attr - private const string LibDhNetSDK = @"./libs/dh-win64/dhnetsdk.dll"; +#if Win + public const string LibSdkPath = @"./libs/dahua/dhnetsdk.dll"; +#else + public const string LibSdkPath = @"./libs/dahua/LibSdkPath.so"; +#endif - private const bool Debug = true; + private const bool Debug = false; #endregion Lib Attr @@ -1443,25 +1449,25 @@ public static class DaHuaOriSDK /// user data from SetAutoReconnect function 用户数据 public delegate void fHaveReConnectCallBack(IntPtr lLoginID, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern bool CLIENT_InitEx(fDisConnectCallBack? cbDisConnect, IntPtr dwUser, IntPtr lpInitParam); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern void CLIENT_Cleanup(); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern int CLIENT_GetLastError(); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern IntPtr CLIENT_LoginWithHighLevelSecurity(ref NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY pstInParam, ref NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY pstOutParam); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern bool CLIENT_Logout(IntPtr lLoginID); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern void CLIENT_SetAutoReconnect(fHaveReConnectCallBack cbAutoConnect, IntPtr dwUser); - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern bool CLIENT_QueryDevState(IntPtr lLoginID, int nType, IntPtr pBuf, int nBufLen, ref int pRetLen, int waittime); /// @@ -1486,7 +1492,7 @@ public static class DaHuaOriSDK /// EM_EXTPTZ_ControlType.SET_FISHEYE_EPTZ:Control fish eye PTZ,param4corresponding to structure NET_PTZ_CONTROL_SET_FISHEYE_EPTZ /// EM_EXTPTZ_ControlType.SET_TRACK_START/SET_TRACK_STOP:param4 corresponding to structure NET_PTZ_CONTROL_SET_TRACK_CONTROL,dwStop set as FALSE,param1、param2、param3 is invalid /// failed return false, successful return true 失败返回false 成功返回true - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern bool CLIENT_DHPTZControlEx2(IntPtr lLoginID, int nChannelID, uint dwPTZCommand, int lParam1, int lParam2, int lParam3, bool dwStop, IntPtr param4); /// @@ -1498,7 +1504,7 @@ public static class DaHuaOriSDK /// display window handle. When value is 0(IntPtr.Zero), data are not decoded or displayed 显示窗口句柄 /// realplay type 监视类型 /// failed return 0, successful return the real time monitorID(real time monitor handle),as parameter of related function. 失败返回0,成功返回大于0的值 - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern IntPtr CLIENT_RealPlayEx(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType); /// @@ -1507,7 +1513,7 @@ public static class DaHuaOriSDK /// /// monitor handle StartRealPlay returns value 监视ID StartRealPlay返回值 /// failed return false, successful return true 失败返回false 成功返回true - [DllImport(LibDhNetSDK)] + [DllImport(LibSdkPath)] public static extern bool CLIENT_StopRealPlayEx(IntPtr lRealHandle); #endregion Common Method diff --git a/EC.Util/CameraSDK/HiK/HiKOriSDK.cs b/EC.Util/CameraSDK/HiK/HiKOriSDK.cs index 04a1a04..b24f602 100644 --- a/EC.Util/CameraSDK/HiK/HiKOriSDK.cs +++ b/EC.Util/CameraSDK/HiK/HiKOriSDK.cs @@ -1,4 +1,6 @@ -using System.Runtime.InteropServices; +#define Win + +using System.Runtime.InteropServices; namespace EC.Util.CameraSDK; @@ -6,10 +8,13 @@ public static class HiKOriSDK { #region Lib Attr - public const string LibHkNetSDK = @"./libs/hk-win64/HCNetSDK.dll"; - //public const string LibHkNetSDK = @"./libs/hk-win64/libhcnetsdk.so"; +#if Win + public const string LibSdkPath = @"./libs/hik/HCNetSDK.dll"; +#else + public const string LibSdkPath = @"./libs/hik/libhcnetsdk.so"; +#endif - private const bool Debug = true; + private const bool Debug = false; #endregion Lib Attr @@ -306,38 +311,38 @@ public static class HiKOriSDK #region Common Method - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_Init(); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_Cleanup(); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_SetLogToFile(int bLogEnable, string strLogDir, bool bAutoDel); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern uint NET_DVR_GetLastError(); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern int NET_DVR_Login_V30(string sDVRIP, int wDVRPort, string sUserName, string sPassword, ref NET_DVR_DEVICEINFO_V30 lpDeviceInfo); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern int NET_DVR_Login_V40(ref NET_DVR_USER_LOGIN_INFO pLoginInfo, ref NET_DVR_DEVICEINFO_V40 lpDeviceInfo); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_Logout(int iUserID); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_SetReconnect(uint dwInterval, int bEnableRecon); //参数配置 begin - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_GetDVRConfig(int lUserID, uint dwCommand, int lChannel, IntPtr lpOutBuffer, uint dwOutBufferSize, ref uint lpBytesReturned); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_PTZControlWithSpeed_Other(int lUserID, int lChannel, uint dwPTZCommand, uint dwStop, uint dwSpeed); - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_PTZPreset_Other(int lUserID, int lChannel, uint dwPTZPresetCmd, uint dwPresetIndex); /********************************************************* @@ -365,7 +370,7 @@ public static class HiKOriSDK Return: 1表示失败,其他值作为NET_DVR_StopRealPlay等函数的句柄参数 **********************************************************/ - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern int NET_DVR_RealPlay_V40(int iUserID, ref NET_DVR_PREVIEWINFO lpPreviewInfo, RealDataCallBack fRealDataCallBack_V30, IntPtr pUser); /********************************************************* @@ -376,7 +381,7 @@ public static class HiKOriSDK Return: **********************************************************/ - [DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)] public static extern bool NET_DVR_StopRealPlay(int iRealHandle); #endregion Common Method diff --git a/EC.Util/CameraSDK/YuShi/YuShiOriSDK.cs b/EC.Util/CameraSDK/YuShi/YuShiOriSDK.cs index ff38d01..dfcdbf7 100644 --- a/EC.Util/CameraSDK/YuShi/YuShiOriSDK.cs +++ b/EC.Util/CameraSDK/YuShi/YuShiOriSDK.cs @@ -1,4 +1,6 @@ -using System.Runtime.InteropServices; +#define Win + +using System.Runtime.InteropServices; namespace EC.Util.CameraSDK; @@ -6,9 +8,13 @@ public static class YuShiOriSDK { #region Lib Attr - public const string LibYsNetSDK = @"./libs/ys-win64/NetDEVSDK.dll"; +#if Win + public const string LibSdkPath = @"./libs/yushi/NetDEVSDK.dll"; +#else + public const string LibSdkPath = @"./libs/yushi/libNetDEVSDK.so"; +#endif - private const bool Debug = true; + private const bool Debug = false; #endregion Lib Attr @@ -213,42 +219,42 @@ public static class YuShiOriSDK #region Common Method - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern bool NETDEV_Init(); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern bool NETDEV_Cleanup(); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int NETDEV_GetLastError(); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern IntPtr NETDEV_Login_V30(ref NETDEV_DEVICE_LOGIN_INFO_S pstDevLoginInfo, ref NETDEV_SELOG_INFO_S pstSELogInfo); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern bool NETDEV_Logout(IntPtr lpUserID); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int NETDEV_QueryVideoChlDetailList(IntPtr lpUserID, ref int pdwChlCount, IntPtr pstVideoChlList); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern bool NETDEV_PTZGetStatus(IntPtr lpUserID, int dwChannelID, ref NETDEV_PTZ_STATUS_S pstPTZStaus); //public boolean NETDEV_GetDevConfig(Pointer lpUserID, int dwChannelID, int dwCommand, Pointer lpOutBuffer, int dwOutBufferSize, IntByReference pdwBytesReturned); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int NETDEV_PTZControl_Other(IntPtr lpUserID, int dwChannelID, int dwPTZCommand, int dwSpeed); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int NETDEV_PTZPreset_Other(IntPtr lpUserID, int dwChannelID, int dwPTZPresetCmd, byte[] szPresetName, int dwPresetID); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern IntPtr NETDEV_RealPlay(IntPtr lpUserID, ref NETDEV_PREVIEWINFO_S pstPreviewInfo, IntPtr cbPlayDataCallBack, IntPtr lpUserData); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int NETDEV_StopRealPlay(IntPtr lpRealHandle); - [DllImport(LibYsNetSDK, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] + [DllImport(LibSdkPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern Int32 NETDEV_GetPTZPresetList(IntPtr lpUserID, Int32 dwChannelID, ref NETDEV_PTZ_ALLPRESETS_S lpOutBuffer); #endregion Common Method diff --git a/EC.Util/Common/LogUnit.cs b/EC.Util/Common/LogUnit.cs index c77064c..a2d2de5 100644 --- a/EC.Util/Common/LogUnit.cs +++ b/EC.Util/Common/LogUnit.cs @@ -15,7 +15,7 @@ public static class LogUnit logger = LogManager.GetLogger(typeof(LogUnit)); } - public static void Init() + public static void VirtualInit() { } diff --git a/EC.Util/EC.Util.csproj b/EC.Util/EC.Util.csproj index ccbf668..976dc73 100644 --- a/EC.Util/EC.Util.csproj +++ b/EC.Util/EC.Util.csproj @@ -7,70 +7,15 @@ - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - + + + - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - + PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - + diff --git a/EC.Util/libs/cameraSdks.zip b/EC.Util/libs/cameraSdks.zip new file mode 100644 index 0000000..b2836ef Binary files /dev/null and b/EC.Util/libs/cameraSdks.zip differ diff --git a/EC.Util/libs/dh-win64/dhnetsdk.dll b/EC.Util/libs/dh-win64/dhnetsdk.dll deleted file mode 100644 index aa3a5e4..0000000 Binary files a/EC.Util/libs/dh-win64/dhnetsdk.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/AudioRender.dll b/EC.Util/libs/hk-win64/AudioRender.dll deleted file mode 100644 index 438acf5..0000000 Binary files a/EC.Util/libs/hk-win64/AudioRender.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/HCCore.dll b/EC.Util/libs/hk-win64/HCCore.dll deleted file mode 100644 index 266afa3..0000000 Binary files a/EC.Util/libs/hk-win64/HCCore.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/HCNetSDK.dll b/EC.Util/libs/hk-win64/HCNetSDK.dll deleted file mode 100644 index 0c4ef60..0000000 Binary files a/EC.Util/libs/hk-win64/HCNetSDK.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/HCNetSDKCom/HCCoreDevCfg.dll b/EC.Util/libs/hk-win64/HCNetSDKCom/HCCoreDevCfg.dll deleted file mode 100644 index 63a8836..0000000 Binary files a/EC.Util/libs/hk-win64/HCNetSDKCom/HCCoreDevCfg.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/HCNetSDKCom/HCPreview.dll b/EC.Util/libs/hk-win64/HCNetSDKCom/HCPreview.dll deleted file mode 100644 index 92a3cf9..0000000 Binary files a/EC.Util/libs/hk-win64/HCNetSDKCom/HCPreview.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/HXVA.dll b/EC.Util/libs/hk-win64/HXVA.dll deleted file mode 100644 index 37a5bb7..0000000 Binary files a/EC.Util/libs/hk-win64/HXVA.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/HmMerge.dll b/EC.Util/libs/hk-win64/HmMerge.dll deleted file mode 100644 index d46a6ac..0000000 Binary files a/EC.Util/libs/hk-win64/HmMerge.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/PlayCtrl.dll b/EC.Util/libs/hk-win64/PlayCtrl.dll deleted file mode 100644 index 4672356..0000000 Binary files a/EC.Util/libs/hk-win64/PlayCtrl.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/SuperRender.dll b/EC.Util/libs/hk-win64/SuperRender.dll deleted file mode 100644 index 5c94d02..0000000 Binary files a/EC.Util/libs/hk-win64/SuperRender.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/libcrypto-1_1-x64.dll b/EC.Util/libs/hk-win64/libcrypto-1_1-x64.dll deleted file mode 100644 index 6731338..0000000 Binary files a/EC.Util/libs/hk-win64/libcrypto-1_1-x64.dll and /dev/null differ diff --git a/EC.Util/libs/hk-win64/libssl-1_1-x64.dll b/EC.Util/libs/hk-win64/libssl-1_1-x64.dll deleted file mode 100644 index ac5e8fd..0000000 Binary files a/EC.Util/libs/hk-win64/libssl-1_1-x64.dll and /dev/null differ diff --git a/EC.Util/libs/ys-win64/NetDEVSDK.dll b/EC.Util/libs/ys-win64/NetDEVSDK.dll deleted file mode 100644 index b705019..0000000 Binary files a/EC.Util/libs/ys-win64/NetDEVSDK.dll and /dev/null differ diff --git a/JiLinApp.Docking/Alarm/AlarmCodeHelper.cs b/JiLinApp.Docking/Alarm/AlarmCodeHelper.cs index 5a9ce1f..18b3273 100644 --- a/JiLinApp.Docking/Alarm/AlarmCodeHelper.cs +++ b/JiLinApp.Docking/Alarm/AlarmCodeHelper.cs @@ -22,7 +22,7 @@ public class AlarmCodeHelper TypeList = list.GroupBy(item => item.Type).Select(it => it.First().Type).ToList(); } - public static void Init() + public static void VirtualInit() { } diff --git a/JiLinApp.Docking/VibrateAlarm/Service/TcpManager.cs b/JiLinApp.Docking/VibrateAlarm/Service/TcpManager.cs index 0d1209c..e839d12 100644 --- a/JiLinApp.Docking/VibrateAlarm/Service/TcpManager.cs +++ b/JiLinApp.Docking/VibrateAlarm/Service/TcpManager.cs @@ -167,7 +167,9 @@ public class TcpManager case 0x00: Console.WriteLine("主机登录:{0}", clientMsg.ClientAddr); ResponseHostLogin_10(clientMsg, mm); + Thread.Sleep(200); RequestHostAutoUploadState_24(clientMsg); + Thread.Sleep(200); RequestSensorList_07(clientMsg); break; @@ -204,7 +206,7 @@ public class TcpManager case 0x17: Console.WriteLine("主机返回传感器列表:{0}", clientMsg.ClientAddr); - for (int j = 2; j < mm.Data.Length; j++) + for (int j = 0; j < mm.Data.Length; j++) { sensorAddr = Convert.ToByte((mm.Data[j] + mm.Data[++j] * 256)); if (clientMsg.SensorDict.ContainsKey(sensorAddr)) continue; diff --git a/JiLinApp/Core/Global.cs b/JiLinApp/Core/Global.cs index 8c5a7cd..233e709 100644 --- a/JiLinApp/Core/Global.cs +++ b/JiLinApp/Core/Global.cs @@ -1,4 +1,5 @@ -using EC.Util.Common; +using EC.Util.CameraSDK; +using EC.Util.Common; using JiLinApp.Biz.TransmitAlarm; using JiLinApp.Docking.Alarm; using JiLinApp.Docking.Military; @@ -56,7 +57,9 @@ public static class Global public static void Init() { - LogUnit.Init(); - AlarmCodeHelper.Init(); + // 静态类在调用之后才会初始化静态类构造方法 + CameraFactory.VirtualInit(); + LogUnit.VirtualInit(); + AlarmCodeHelper.VirtualInit(); } } \ No newline at end of file diff --git a/JiLinApp/config/config.json b/JiLinApp/config/config.json index e40905e..91b8438 100644 --- a/JiLinApp/config/config.json +++ b/JiLinApp/config/config.json @@ -22,7 +22,7 @@ ] }, "military": { - "url": "http://192.168.1.181:8081/military", + "url": "http://192.168.1.119:8080/military", "username": "admin", "password": "123456", "requestTryTime": "5",