You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
402 lines
19 KiB
402 lines
19 KiB
1 year ago
|
//#define Win32
|
||
|
#define Win64
|
||
|
|
||
|
//#define Linux32
|
||
|
//#define Linux64
|
||
|
using System.Runtime.InteropServices;
|
||
|
|
||
|
namespace EC.Util.CameraSDK;
|
||
|
|
||
|
public class HiKOriSdk
|
||
|
{
|
||
|
#region Fields
|
||
|
|
||
|
#if Win32
|
||
|
public const string LibSdkPath = @"./libs/hik/win32/HCNetSDK.dll";
|
||
|
#elif Win64
|
||
|
public const string LibSdkPath = @"./libs/hik/win64/HCNetSDK.dll";
|
||
|
#elif Linux32
|
||
|
public const string LibSdkPath = @"./libs/hik/linux32/libhcnetsdk.so";
|
||
|
#elif Linux64
|
||
|
public const string LibSdkPath = @"./libs/hik/linux64/libhcnetsdk.so";
|
||
|
#endif
|
||
|
|
||
|
private const bool Debug = true;
|
||
|
|
||
|
#endregion Fields
|
||
|
|
||
|
static HiKOriSdk()
|
||
|
{
|
||
|
GlobalInit();
|
||
|
}
|
||
|
|
||
|
#region Global
|
||
|
|
||
|
public static bool InitSuccess { get; private set; }
|
||
|
|
||
|
public static bool GlobalInit()
|
||
|
{
|
||
|
if (InitSuccess) return true;
|
||
|
bool ret = NET_DVR_Init();
|
||
|
InitSuccess = ret;
|
||
|
if (!ret) throw new Exception("HiKOriSdk global init failure.");
|
||
|
if (Debug) NET_DVR_SetLogToFile(3, Path.Combine("./log", "hikSdkLog"), true);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
public static bool GlobalDestory()
|
||
|
{
|
||
|
if (!InitSuccess) return true;
|
||
|
bool ret = NET_DVR_Cleanup();
|
||
|
if (ret) InitSuccess = false;
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
#endregion Global
|
||
|
|
||
|
#region Sdk Const
|
||
|
|
||
|
public const int SERIALNO_LEN = 48; //序列号长度
|
||
|
|
||
|
public const int PtzSpeedMin = 1;
|
||
|
public const int PtzSpeedMax = 7;
|
||
|
|
||
|
public const int NET_DVR_DEV_ADDRESS_MAX_LEN = 129;
|
||
|
public const int NET_DVR_LOGIN_USERNAME_MAX_LEN = 64;
|
||
|
public const int NET_DVR_LOGIN_PASSWD_MAX_LEN = 64;
|
||
|
|
||
|
#region 用于 NET_DVR_SetDVRConfig 和 NET_DVR_GetDVRConfig
|
||
|
|
||
|
public const int NET_DVR_SET_PTZPOS = 292; //云台设置PTZ位置
|
||
|
public const int NET_DVR_GET_PTZPOS = 293; //云台获取PTZ位置
|
||
|
public const int NET_DVR_GET_PTZSCOPE = 294; //云台获取PTZ范围
|
||
|
|
||
|
#endregion 用于 NET_DVR_SetDVRConfig 和 NET_DVR_GetDVRConfig
|
||
|
|
||
|
/********************预览回调函数*********************/
|
||
|
public const int NET_DVR_SYSHEAD = 1;//系统头数据
|
||
|
public const int NET_DVR_STREAMDATA = 2;//视频流数据(包括复合流和音视频分开的视频流数据)
|
||
|
public const int NET_DVR_AUDIOSTREAMDATA = 3;//音频流数据
|
||
|
public const int NET_DVR_STD_VIDEODATA = 4;//标准视频流数据
|
||
|
public const int NET_DVR_STD_AUDIODATA = 5;//标准音频流数据
|
||
|
|
||
|
#region PtzMove
|
||
|
|
||
|
public const int ZOOM_IN = 11;// 焦距以速度SS变大(倍率变大)
|
||
|
public const int ZOOM_OUT = 12;// 焦距以速度SS变小(倍率变小)
|
||
|
public const int FOCUS_NEAR = 13;// 焦点以速度SS前调
|
||
|
public const int FOCUS_FAR = 14;// 焦点以速度SS后调
|
||
|
public const int IRIS_OPEN = 15;// 光圈以速度SS扩大
|
||
|
public const int IRIS_CLOSE = 16;// 光圈以速度SS缩小
|
||
|
|
||
|
public const int TILT_UP = 21; /* 云台以SS的速度上仰 */
|
||
|
public const int TILT_DOWN = 22; /* 云台以SS的速度下俯 */
|
||
|
public const int PAN_LEFT = 23; /* 云台以SS的速度左转 */
|
||
|
public const int PAN_RIGHT = 24; /* 云台以SS的速度右转 */
|
||
|
public const int UP_LEFT = 25; /* 云台以SS的速度上仰和左转 */
|
||
|
public const int UP_RIGHT = 26; /* 云台以SS的速度上仰和右转 */
|
||
|
public const int DOWN_LEFT = 27; /* 云台以SS的速度下俯和左转 */
|
||
|
public const int DOWN_RIGHT = 28; /* 云台以SS的速度下俯和右转 */
|
||
|
public const int PAN_AUTO = 29; /* 云台以SS的速度左右自动扫描 */
|
||
|
public const int GOTO_PRESET = 39; /* 快球转到预置点 */
|
||
|
|
||
|
#endregion PtzMove
|
||
|
|
||
|
#endregion Sdk Const
|
||
|
|
||
|
#region Sdk Struct
|
||
|
|
||
|
//NET_DVR_Login()参数结构
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_DEVICEINFO
|
||
|
{
|
||
|
[MarshalAs(
|
||
|
UnmanagedType.ByValArray,
|
||
|
SizeConst = SERIALNO_LEN,
|
||
|
ArraySubType = UnmanagedType.I1
|
||
|
)]
|
||
|
public byte[] sSerialNumber; //序列号
|
||
|
|
||
|
public byte byAlarmInPortNum; //DVR报警输入个数
|
||
|
public byte byAlarmOutPortNum; //DVR报警输出个数
|
||
|
public byte byDiskNum; //DVR硬盘个数
|
||
|
public byte byDVRType; //DVR类型, 1:DVR 2:ATM DVR 3:DVS ......
|
||
|
public byte byChanNum; //DVR 通道个数
|
||
|
public byte byStartChan; //起始通道号,例如DVS-1,DVR - 1
|
||
|
}
|
||
|
|
||
|
//NET_DVR_Login_V30()参数结构
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_DEVICEINFO_V30
|
||
|
{
|
||
|
[MarshalAs(
|
||
|
UnmanagedType.ByValArray,
|
||
|
SizeConst = SERIALNO_LEN,
|
||
|
ArraySubType = UnmanagedType.I1
|
||
|
)]
|
||
|
public byte[] sSerialNumber; //序列号
|
||
|
|
||
|
public byte byAlarmInPortNum; //报警输入个数
|
||
|
public byte byAlarmOutPortNum; //报警输出个数
|
||
|
public byte byDiskNum; //硬盘个数
|
||
|
public byte byDVRType; //设备类型, 1:DVR 2:ATM DVR 3:DVS ......
|
||
|
public byte byChanNum; //模拟通道个数
|
||
|
public byte byStartChan; //起始通道号,例如DVS-1,DVR - 1
|
||
|
public byte byAudioChanNum; //语音通道数
|
||
|
public byte byIPChanNum; //最大数字通道个数,低位
|
||
|
public byte byZeroChanNum; //零通道编码个数 //2010-01-16
|
||
|
public byte byMainProto; //主码流传输协议类型 0-private, 1-rtsp,2-同时支持private和rtsp
|
||
|
public byte bySubProto; //子码流传输协议类型0-private, 1-rtsp,2-同时支持private和rtsp
|
||
|
public byte bySupport; //能力,位与结果为0表示不支持,1表示支持,
|
||
|
|
||
|
//bySupport & 0x1, 表示是否支持智能搜索
|
||
|
//bySupport & 0x2, 表示是否支持备份
|
||
|
//bySupport & 0x4, 表示是否支持压缩参数能力获取
|
||
|
//bySupport & 0x8, 表示是否支持多网卡
|
||
|
//bySupport & 0x10, 表示支持远程SADP
|
||
|
//bySupport & 0x20, 表示支持Raid卡功能
|
||
|
//bySupport & 0x40, 表示支持IPSAN 目录查找
|
||
|
//bySupport & 0x80, 表示支持rtp over rtsp
|
||
|
public byte bySupport1; // 能力集扩充,位与结果为0表示不支持,1表示支持
|
||
|
|
||
|
//bySupport1 & 0x1, 表示是否支持snmp v30
|
||
|
//bySupport1 & 0x2, 支持区分回放和下载
|
||
|
//bySupport1 & 0x4, 是否支持布防优先级
|
||
|
//bySupport1 & 0x8, 智能设备是否支持布防时间段扩展
|
||
|
//bySupport1 & 0x10, 表示是否支持多磁盘数(超过33个)
|
||
|
//bySupport1 & 0x20, 表示是否支持rtsp over http
|
||
|
//bySupport1 & 0x80, 表示是否支持车牌新报警信息2012-9-28, 且还表示是否支持NET_DVR_IPPARACFG_V40结构体
|
||
|
public byte bySupport2; /*能力,位与结果为0表示不支持,非0表示支持
|
||
|
|
||
|
bySupport2 & 0x1, 表示解码器是否支持通过URL取流解码
|
||
|
bySupport2 & 0x2, 表示支持FTPV40
|
||
|
bySupport2 & 0x4, 表示支持ANR
|
||
|
bySupport2 & 0x8, 表示支持CCD的通道参数配置
|
||
|
bySupport2 & 0x10, 表示支持布防报警回传信息(仅支持抓拍机报警 新老报警结构)
|
||
|
bySupport2 & 0x20, 表示是否支持单独获取设备状态子项
|
||
|
bySupport2 & 0x40, 表示是否是码流加密设备*/
|
||
|
public ushort wDevType; //设备型号
|
||
|
public byte bySupport3; //能力集扩展,位与结果为0表示不支持,1表示支持
|
||
|
|
||
|
//bySupport3 & 0x1, 表示是否多码流
|
||
|
// bySupport3 & 0x4 表示支持按组配置, 具体包含 通道图像参数、报警输入参数、IP报警输入、输出接入参数、
|
||
|
// 用户参数、设备工作状态、JPEG抓图、定时和时间抓图、硬盘盘组管理
|
||
|
//bySupport3 & 0x8为1 表示支持使用TCP预览、UDP预览、多播预览中的"延时预览"字段来请求延时预览(后续都将使用这种方式请求延时预览)。而当bySupport3 & 0x8为0时,将使用 "私有延时预览"协议。
|
||
|
//bySupport3 & 0x10 表示支持"获取报警主机主要状态(V40)"。
|
||
|
//bySupport3 & 0x20 表示是否支持通过DDNS域名解析取流
|
||
|
|
||
|
public byte byMultiStreamProto; //是否支持多码流,按位表示,0-不支持,1-支持,bit1-码流3,bit2-码流4,bit7-主码流,bit-8子码流
|
||
|
public byte byStartDChan; //起始数字通道号,0表示无效
|
||
|
public byte byStartDTalkChan; //起始数字对讲通道号,区别于模拟对讲通道号,0表示无效
|
||
|
public byte byHighDChanNum; //数字通道个数,高位
|
||
|
public byte bySupport4;
|
||
|
public byte byLanguageType; // 支持语种能力,按位表示,每一位0-不支持,1-支持
|
||
|
|
||
|
// byLanguageType 等于0 表示 老设备
|
||
|
// byLanguageType & 0x1表示支持中文
|
||
|
// byLanguageType & 0x2表示支持英文
|
||
|
[MarshalAs(
|
||
|
UnmanagedType.ByValArray,
|
||
|
SizeConst = 9,
|
||
|
ArraySubType = UnmanagedType.I1
|
||
|
)]
|
||
|
public byte[] byRes2; //保留
|
||
|
}
|
||
|
|
||
|
public delegate void LOGINRESULTCALLBACK(int lUserID, int dwResult, IntPtr lpDeviceInfo, IntPtr pUser);
|
||
|
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_USER_LOGIN_INFO
|
||
|
{
|
||
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_DEV_ADDRESS_MAX_LEN, ArraySubType = UnmanagedType.I1)]
|
||
|
public byte[] sDeviceAddress;
|
||
|
|
||
|
public byte byUseTransport;
|
||
|
public ushort wPort;
|
||
|
|
||
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_LOGIN_USERNAME_MAX_LEN, ArraySubType = UnmanagedType.I1)]
|
||
|
public byte[] sUserName;
|
||
|
|
||
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_LOGIN_PASSWD_MAX_LEN, ArraySubType = UnmanagedType.I1)]
|
||
|
public byte[] sPassword;
|
||
|
|
||
|
public LOGINRESULTCALLBACK cbLoginResult;
|
||
|
public IntPtr pUser;
|
||
|
public bool bUseAsynLogin;
|
||
|
public byte byProxyType; //0:不使用代理,1:使用标准代理,2:使用EHome代理
|
||
|
public byte byUseUTCTime; //0-不进行转换,默认,1-接口上输入输出全部使用UTC时间,SDK完成UTC时间与设备时区的转换,2-接口上输入输出全部使用平台本地时间,SDK完成平台本地时间与设备时区的转换
|
||
|
public byte byLoginMode; //0-Private, 1-ISAPI, 2-自适应
|
||
|
public byte byHttps; //0-不适用tls,1-使用tls 2-自适应
|
||
|
public int iProxyID; //代理服务器序号,添加代理服务器信息时,相对应的服务器数组下表值
|
||
|
public byte byVerifyMode; //认证方式,0-不认证,1-双向认证,2-单向认证;认证仅在使用TLS的时候生效;
|
||
|
|
||
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 119, ArraySubType = UnmanagedType.I1)]
|
||
|
public byte[] byRes3;
|
||
|
}
|
||
|
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_DEVICEINFO_V40
|
||
|
{
|
||
|
public NET_DVR_DEVICEINFO_V30 struDeviceV30;
|
||
|
public byte bySupportLock; //设备支持锁定功能,该字段由SDK根据设备返回值来赋值的。bySupportLock为1时,dwSurplusLockTime和byRetryLoginTime有效
|
||
|
public byte byRetryLoginTime; //剩余可尝试登陆的次数,用户名,密码错误时,此参数有效
|
||
|
public byte byPasswordLevel; //admin密码安全等级0-无效,1-默认密码,2-有效密码,3-风险较高的密码。当用户的密码为出厂默认密码(12345)或者风险较高的密码时,上层客户端需要提示用户更改密码。
|
||
|
public byte byProxyType;//代理类型,0-不使用代理, 1-使用socks5代理, 2-使用EHome代理
|
||
|
public uint dwSurplusLockTime; //剩余时间,单位秒,用户锁定时,此参数有效
|
||
|
public byte byCharEncodeType; //字符编码类型(SDK所有接口返回的字符串编码类型,透传接口除外):0- 无字符编码信息(老设备),1- GB2312(简体中文),2- GBK,3- BIG5(繁体中文),4- Shift_JIS(日文),5- EUC-KR(韩文),6- UTF-8,7- ISO8859-1,8- ISO8859-2,9- ISO8859-3,…,依次类推,21- ISO8859-15(西欧)
|
||
|
public byte bySupportDev5;//支持v50版本的设备参数获取,设备名称和设备类型名称长度扩展为64字节
|
||
|
public byte bySupport; //能力集扩展,位与结果:0- 不支持,1- 支持
|
||
|
|
||
|
// bySupport & 0x1: 保留
|
||
|
// bySupport & 0x2: 0-不支持变化上报 1-支持变化上报
|
||
|
public byte byLoginMode; //登录模式 0-Private登录 1-ISAPI登录
|
||
|
|
||
|
public int dwOEMCode;
|
||
|
public int iResidualValidity; //该用户密码剩余有效天数,单位:天,返回负值,表示密码已经超期使用,例如“-3表示密码已经超期使用3天”
|
||
|
public byte byResidualValidity; // iResidualValidity字段是否有效,0-无效,1-有效
|
||
|
|
||
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 243, ArraySubType = UnmanagedType.I1)]
|
||
|
public byte[] byRes2;
|
||
|
}
|
||
|
|
||
|
//球机位置信息
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_PTZPOS
|
||
|
{
|
||
|
public ushort wAction; //获取时该字段无效
|
||
|
public ushort wPanPos; //水平参数
|
||
|
public ushort wTiltPos; //垂直参数
|
||
|
public ushort wZoomPos; //变倍参数
|
||
|
}
|
||
|
|
||
|
//球机范围信息
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_PTZSCOPE
|
||
|
{
|
||
|
public ushort wPanPosMin; //水平参数min
|
||
|
public ushort wPanPosMax; //水平参数max
|
||
|
public ushort wTiltPosMin; //垂直参数min
|
||
|
public ushort wTiltPosMax; //垂直参数max
|
||
|
public ushort wZoomPosMin; //变倍参数min
|
||
|
public ushort wZoomPosMax; //变倍参数max
|
||
|
}
|
||
|
|
||
|
//邦诺CVR
|
||
|
public const int MAX_ID_COUNT = 256;
|
||
|
|
||
|
public const int MAX_STREAM_ID_COUNT = 1024;
|
||
|
public const int STREAM_ID_LEN = 32;
|
||
|
public const int PLAN_ID_LEN = 32;
|
||
|
|
||
|
//预览V40接口
|
||
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
public struct NET_DVR_PREVIEWINFO
|
||
|
{
|
||
|
public int lChannel; //通道号
|
||
|
public uint dwStreamType; // 码流类型,0-主码流,1-子码流,2-码流3,3-码流4 等以此类推
|
||
|
public uint dwLinkMode; // 0:TCP方式,1:UDP方式,2:多播方式,3 - RTP方式,4-RTP/RTSP,5-RSTP/HTTP
|
||
|
public IntPtr hPlayWnd; //播放窗口的句柄,为NULL表示不播放图象
|
||
|
public bool bBlocked; //0-非阻塞取流, 1-阻塞取流, 如果阻塞SDK内部connect失败将会有5s的超时才能够返回,不适合于轮询取流操作.
|
||
|
public bool bPassbackRecord; //0-不启用录像回传,1启用录像回传
|
||
|
public byte byPreviewMode; //预览模式,0-正常预览,1-延迟预览
|
||
|
|
||
|
[MarshalAs(
|
||
|
UnmanagedType.ByValArray,
|
||
|
SizeConst = STREAM_ID_LEN,
|
||
|
ArraySubType = UnmanagedType.I1
|
||
|
)]
|
||
|
public byte[] byStreamID; //流ID,lChannel为0xffffffff时启用此参数
|
||
|
|
||
|
public byte byProtoType; //应用层取流协议,0-私有协议,1-RTSP协议
|
||
|
public byte byRes1;
|
||
|
public byte byVideoCodingType; //码流数据编解码类型 0-通用编码数据 1-热成像探测器产生的原始数据(温度数据的加密信息,通过去加密运算,将原始数据算出真实的温度值)
|
||
|
public uint dwDisplayBufNum; //播放库播放缓冲区最大缓冲帧数,范围1-50,置0时默认为1
|
||
|
public byte byNPQMode; //NPQ是直连模式,还是过流媒体 0-直连 1-过流媒体
|
||
|
|
||
|
[MarshalAs(
|
||
|
UnmanagedType.ByValArray,
|
||
|
SizeConst = 215,
|
||
|
ArraySubType = UnmanagedType.I1
|
||
|
)]
|
||
|
public byte[] byRes;
|
||
|
}
|
||
|
|
||
|
#endregion Sdk Struct
|
||
|
|
||
|
#region Common Method
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_Init();
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_Cleanup();
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_SetLogToFile(int bLogEnable, string strLogDir, bool bAutoDel);
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern uint NET_DVR_GetLastError();
|
||
|
|
||
|
[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(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(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_Logout(int iUserID);
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_SetReconnect(uint dwInterval, int bEnableRecon);
|
||
|
|
||
|
//参数配置 begin
|
||
|
[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(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_PTZControlWithSpeed_Other(int lUserID, int lChannel, uint dwPTZCommand, uint dwStop, uint dwSpeed);
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_PTZPreset_Other(int lUserID, int lChannel, uint dwPTZPresetCmd, uint dwPresetIndex);
|
||
|
|
||
|
/*********************************************************
|
||
|
Function: REALDATACALLBACK
|
||
|
Desc: 预览回调
|
||
|
Input: lRealHandle 当前的预览句柄
|
||
|
dwDataType 数据类型
|
||
|
pBuffer 存放数据的缓冲区指针
|
||
|
dwBufSize 缓冲区大小
|
||
|
pUser 用户数据
|
||
|
Output:
|
||
|
Return: void
|
||
|
**********************************************************/
|
||
|
|
||
|
public delegate void RealDataCallBack(int lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr pUser);
|
||
|
|
||
|
/*********************************************************
|
||
|
Function: NET_DVR_RealPlay_V40
|
||
|
Desc: 实时预览扩展接口。
|
||
|
Input: lUserID [in] NET_DVR_Login()或NET_DVR_Login_V30()的返回值
|
||
|
lpPreviewInfo [in] 预览参数
|
||
|
fRealDataCallBack_V30 [in] 码流数据回调函数
|
||
|
pUser [in] 用户数据
|
||
|
Output:
|
||
|
Return: 1表示失败,其他值作为NET_DVR_StopRealPlay等函数的句柄参数
|
||
|
**********************************************************/
|
||
|
|
||
|
[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);
|
||
|
|
||
|
/*********************************************************
|
||
|
Function: NET_DVR_StopRealPlay
|
||
|
Desc: 停止预览。
|
||
|
Input: lRealHandle [in] 预览句柄,NET_DVR_RealPlay或者NET_DVR_RealPlay_V30的返回值
|
||
|
Output:
|
||
|
Return:
|
||
|
**********************************************************/
|
||
|
|
||
|
[DllImport(LibSdkPath, CallingConvention = CallingConvention.StdCall)]
|
||
|
public static extern bool NET_DVR_StopRealPlay(int iRealHandle);
|
||
|
|
||
|
#endregion Common Method
|
||
|
}
|