Browse Source

[feat] 更新 camerasdk 文件库放置方式

master
fajiao 1 year ago
parent
commit
fd0c3772cc
  1. 35
      EC.Util/CameraSDK/Common/CameraFactory.cs
  2. 32
      EC.Util/CameraSDK/DaHua/DaHuaOriSDK.cs
  3. 39
      EC.Util/CameraSDK/HiK/HiKOriSDK.cs
  4. 36
      EC.Util/CameraSDK/YuShi/YuShiOriSDK.cs
  5. 2
      EC.Util/Common/LogUnit.cs
  6. 65
      EC.Util/EC.Util.csproj
  7. BIN
      EC.Util/libs/cameraSdks.zip
  8. BIN
      EC.Util/libs/dh-win64/dhnetsdk.dll
  9. BIN
      EC.Util/libs/hk-win64/AudioRender.dll
  10. BIN
      EC.Util/libs/hk-win64/HCCore.dll
  11. BIN
      EC.Util/libs/hk-win64/HCNetSDK.dll
  12. BIN
      EC.Util/libs/hk-win64/HCNetSDKCom/HCCoreDevCfg.dll
  13. BIN
      EC.Util/libs/hk-win64/HCNetSDKCom/HCPreview.dll
  14. BIN
      EC.Util/libs/hk-win64/HXVA.dll
  15. BIN
      EC.Util/libs/hk-win64/HmMerge.dll
  16. BIN
      EC.Util/libs/hk-win64/PlayCtrl.dll
  17. BIN
      EC.Util/libs/hk-win64/SuperRender.dll
  18. BIN
      EC.Util/libs/hk-win64/libcrypto-1_1-x64.dll
  19. BIN
      EC.Util/libs/hk-win64/libssl-1_1-x64.dll
  20. BIN
      EC.Util/libs/ys-win64/NetDEVSDK.dll
  21. 2
      JiLinApp.Docking/Alarm/AlarmCodeHelper.cs
  22. 4
      JiLinApp.Docking/VibrateAlarm/Service/TcpManager.cs
  23. 9
      JiLinApp/Core/Global.cs
  24. 2
      JiLinApp/config/config.json

35
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 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) public static ICameraSDK BuildCameraSdk(CameraInfo info)
{ {
ICameraSDK sdk = (info.Manufactor) switch ICameraSDK sdk = (info.Manufactor) switch

32
EC.Util/CameraSDK/DaHua/DaHuaOriSDK.cs

@ -1,4 +1,6 @@
using System.Runtime.InteropServices; #define Win
using System.Runtime.InteropServices;
namespace EC.Util.CameraSDK; namespace EC.Util.CameraSDK;
@ -6,9 +8,13 @@ public static class DaHuaOriSDK
{ {
#region Lib Attr #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 #endregion Lib Attr
@ -1443,25 +1449,25 @@ public static class DaHuaOriSDK
/// <param name="dwUser">user data from SetAutoReconnect function 用户数据</param> /// <param name="dwUser">user data from SetAutoReconnect function 用户数据</param>
public delegate void fHaveReConnectCallBack(IntPtr lLoginID, IntPtr pchDVRIP, int nDVRPort, IntPtr dwUser); 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); public static extern bool CLIENT_InitEx(fDisConnectCallBack? cbDisConnect, IntPtr dwUser, IntPtr lpInitParam);
[DllImport(LibDhNetSDK)] [DllImport(LibSdkPath)]
public static extern void CLIENT_Cleanup(); public static extern void CLIENT_Cleanup();
[DllImport(LibDhNetSDK)] [DllImport(LibSdkPath)]
public static extern int CLIENT_GetLastError(); 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); 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); public static extern bool CLIENT_Logout(IntPtr lLoginID);
[DllImport(LibDhNetSDK)] [DllImport(LibSdkPath)]
public static extern void CLIENT_SetAutoReconnect(fHaveReConnectCallBack cbAutoConnect, IntPtr dwUser); 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); public static extern bool CLIENT_QueryDevState(IntPtr lLoginID, int nType, IntPtr pBuf, int nBufLen, ref int pRetLen, int waittime);
/// <summary> /// <summary>
@ -1486,7 +1492,7 @@ public static class DaHuaOriSDK
/// <para>EM_EXTPTZ_ControlType.SET_FISHEYE_EPTZ:Control fish eye PTZ,param4corresponding to structure NET_PTZ_CONTROL_SET_FISHEYE_EPTZ</para> /// <para>EM_EXTPTZ_ControlType.SET_FISHEYE_EPTZ:Control fish eye PTZ,param4corresponding to structure NET_PTZ_CONTROL_SET_FISHEYE_EPTZ</para>
/// <para>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</para></param> /// <para>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</para></param>
/// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
[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); public static extern bool CLIENT_DHPTZControlEx2(IntPtr lLoginID, int nChannelID, uint dwPTZCommand, int lParam1, int lParam2, int lParam3, bool dwStop, IntPtr param4);
/// <summary> /// <summary>
@ -1498,7 +1504,7 @@ public static class DaHuaOriSDK
/// <param name="hWnd">display window handle. When value is 0(IntPtr.Zero), data are not decoded or displayed 显示窗口句柄</param> /// <param name="hWnd">display window handle. When value is 0(IntPtr.Zero), data are not decoded or displayed 显示窗口句柄</param>
/// <param name="rType">realplay type 监视类型</param> /// <param name="rType">realplay type 监视类型</param>
/// <returns>failed return 0, successful return the real time monitorID(real time monitor handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns> /// <returns>failed return 0, successful return the real time monitorID(real time monitor handle),as parameter of related function. 失败返回0,成功返回大于0的值</returns>
[DllImport(LibDhNetSDK)] [DllImport(LibSdkPath)]
public static extern IntPtr CLIENT_RealPlayEx(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType); public static extern IntPtr CLIENT_RealPlayEx(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType);
/// <summary> /// <summary>
@ -1507,7 +1513,7 @@ public static class DaHuaOriSDK
/// </summary> /// </summary>
/// <param name="lRealHandle">monitor handle StartRealPlay returns value 监视ID StartRealPlay返回值</param> /// <param name="lRealHandle">monitor handle StartRealPlay returns value 监视ID StartRealPlay返回值</param>
/// <returns>failed return false, successful return true 失败返回false 成功返回true</returns> /// <returns>failed return false, successful return true 失败返回false 成功返回true</returns>
[DllImport(LibDhNetSDK)] [DllImport(LibSdkPath)]
public static extern bool CLIENT_StopRealPlayEx(IntPtr lRealHandle); public static extern bool CLIENT_StopRealPlayEx(IntPtr lRealHandle);
#endregion Common Method #endregion Common Method

39
EC.Util/CameraSDK/HiK/HiKOriSDK.cs

@ -1,4 +1,6 @@
using System.Runtime.InteropServices; #define Win
using System.Runtime.InteropServices;
namespace EC.Util.CameraSDK; namespace EC.Util.CameraSDK;
@ -6,10 +8,13 @@ public static class HiKOriSDK
{ {
#region Lib Attr #region Lib Attr
public const string LibHkNetSDK = @"./libs/hk-win64/HCNetSDK.dll"; #if Win
//public const string LibHkNetSDK = @"./libs/hk-win64/libhcnetsdk.so"; 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 #endregion Lib Attr
@ -306,38 +311,38 @@ public static class HiKOriSDK
#region Common Method #region Common Method
[DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
public static extern bool NET_DVR_Init(); public static extern bool NET_DVR_Init();
[DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
public static extern bool NET_DVR_Cleanup(); 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); 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(); 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); 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); 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); 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); public static extern bool NET_DVR_SetReconnect(uint dwInterval, int bEnableRecon);
//参数配置 begin //参数配置 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); 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); 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); 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: 1NET_DVR_StopRealPlay等函数的句柄参数 Return: 1NET_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); 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: Return:
**********************************************************/ **********************************************************/
[DllImport(LibHkNetSDK, CallingConvention = CallingConvention.StdCall)] [DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
public static extern bool NET_DVR_StopRealPlay(int iRealHandle); public static extern bool NET_DVR_StopRealPlay(int iRealHandle);
#endregion Common Method #endregion Common Method

36
EC.Util/CameraSDK/YuShi/YuShiOriSDK.cs

@ -1,4 +1,6 @@
using System.Runtime.InteropServices; #define Win
using System.Runtime.InteropServices;
namespace EC.Util.CameraSDK; namespace EC.Util.CameraSDK;
@ -6,9 +8,13 @@ public static class YuShiOriSDK
{ {
#region Lib Attr #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 #endregion Lib Attr
@ -213,42 +219,42 @@ public static class YuShiOriSDK
#region Common Method #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(); 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(); 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(); 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); 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); 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); 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 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); //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); 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); 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); 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); 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); public static extern Int32 NETDEV_GetPTZPresetList(IntPtr lpUserID, Int32 dwChannelID, ref NETDEV_PTZ_ALLPRESETS_S lpOutBuffer);
#endregion Common Method #endregion Common Method

2
EC.Util/Common/LogUnit.cs

@ -15,7 +15,7 @@ public static class LogUnit
logger = LogManager.GetLogger(typeof(LogUnit)); logger = LogManager.GetLogger(typeof(LogUnit));
} }
public static void Init() public static void VirtualInit()
{ {
} }

65
EC.Util/EC.Util.csproj

@ -7,70 +7,15 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="libs\dh-win64\dhnetsdk.dll" /> <PackageReference Include="log4net" Version="2.0.15" />
<None Remove="libs\hk-win64\AudioRender.dll" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<None Remove="libs\hk-win64\HCCore.dll" /> <PackageReference Include="System.IO.Ports" Version="7.0.0" />
<None Remove="libs\hk-win64\HCNetSDK.dll" />
<None Remove="libs\hk-win64\HCNetSDKCom\HCCoreDevCfg.dll" />
<None Remove="libs\hk-win64\HCNetSDKCom\HCPreview.dll" />
<None Remove="libs\hk-win64\HmMerge.dll" />
<None Remove="libs\hk-win64\HXVA.dll" />
<None Remove="libs\hk-win64\libcrypto-1_1-x64.dll" />
<None Remove="libs\hk-win64\libssl-1_1-x64.dll" />
<None Remove="libs\hk-win64\PlayCtrl.dll" />
<None Remove="libs\hk-win64\SuperRender.dll" />
<None Remove="libs\ys-win64\NetDEVSDK.dll" />
</ItemGroup>
<ItemGroup>
<Content Include="libs\dh-win64\dhnetsdk.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\HXVA.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="libs\hk-win64\AudioRender.dll"> <None Update="libs\cameraSdks.zip">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\HCCore.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\HCNetSDK.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\HCNetSDKCom\HCCoreDevCfg.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\HCNetSDKCom\HCPreview.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </None>
<Content Include="libs\hk-win64\HmMerge.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\libcrypto-1_1-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\libssl-1_1-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\PlayCtrl.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\hk-win64\SuperRender.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="libs\ys-win64\NetDEVSDK.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.IO.Ports" Version="7.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

BIN
EC.Util/libs/cameraSdks.zip

Binary file not shown.

BIN
EC.Util/libs/dh-win64/dhnetsdk.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/AudioRender.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/HCCore.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/HCNetSDK.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/HCNetSDKCom/HCCoreDevCfg.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/HCNetSDKCom/HCPreview.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/HXVA.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/HmMerge.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/PlayCtrl.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/SuperRender.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/libcrypto-1_1-x64.dll

Binary file not shown.

BIN
EC.Util/libs/hk-win64/libssl-1_1-x64.dll

Binary file not shown.

BIN
EC.Util/libs/ys-win64/NetDEVSDK.dll

Binary file not shown.

2
JiLinApp.Docking/Alarm/AlarmCodeHelper.cs

@ -22,7 +22,7 @@ public class AlarmCodeHelper
TypeList = list.GroupBy(item => item.Type).Select(it => it.First().Type).ToList(); TypeList = list.GroupBy(item => item.Type).Select(it => it.First().Type).ToList();
} }
public static void Init() public static void VirtualInit()
{ {
} }

4
JiLinApp.Docking/VibrateAlarm/Service/TcpManager.cs

@ -167,7 +167,9 @@ public class TcpManager
case 0x00: case 0x00:
Console.WriteLine("主机登录:{0}", clientMsg.ClientAddr); Console.WriteLine("主机登录:{0}", clientMsg.ClientAddr);
ResponseHostLogin_10(clientMsg, mm); ResponseHostLogin_10(clientMsg, mm);
Thread.Sleep(200);
RequestHostAutoUploadState_24(clientMsg); RequestHostAutoUploadState_24(clientMsg);
Thread.Sleep(200);
RequestSensorList_07(clientMsg); RequestSensorList_07(clientMsg);
break; break;
@ -204,7 +206,7 @@ public class TcpManager
case 0x17: case 0x17:
Console.WriteLine("主机返回传感器列表:{0}", clientMsg.ClientAddr); 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)); sensorAddr = Convert.ToByte((mm.Data[j] + mm.Data[++j] * 256));
if (clientMsg.SensorDict.ContainsKey(sensorAddr)) continue; if (clientMsg.SensorDict.ContainsKey(sensorAddr)) continue;

9
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.Biz.TransmitAlarm;
using JiLinApp.Docking.Alarm; using JiLinApp.Docking.Alarm;
using JiLinApp.Docking.Military; using JiLinApp.Docking.Military;
@ -56,7 +57,9 @@ public static class Global
public static void Init() public static void Init()
{ {
LogUnit.Init(); // 静态类在调用之后才会初始化静态类构造方法
AlarmCodeHelper.Init(); CameraFactory.VirtualInit();
LogUnit.VirtualInit();
AlarmCodeHelper.VirtualInit();
} }
} }

2
JiLinApp/config/config.json

@ -22,7 +22,7 @@
] ]
}, },
"military": { "military": {
"url": "http://192.168.1.181:8081/military", "url": "http://192.168.1.119:8080/military",
"username": "admin", "username": "admin",
"password": "123456", "password": "123456",
"requestTryTime": "5", "requestTryTime": "5",

Loading…
Cancel
Save