资源简介
大华摄像头的集成demo已经使用说明书,库文件,头文件,让使用者更加方便地对摄像头进行二次开发
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NetSDKCS;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace AlarmDemo
{
public partial class AlarmDemo : Form
{
private static fDisConnectCallBack m_DisConnectCallBack;
private static fHaveReConnectCallBack m_ReConnectCallBack;
private static fMessCallBackEx m_AlarmCallBack;
private const int ALARM_START = 1;
private const int ALARM_STOP = 0;
private const int ListViewCount = 100;
private IntPtr m_LoginID = IntPtr.Zero;
private NET_DEVICEINFO_Ex m_DeviceInfo;
private bool m_IsListen = false;
private Int64 m_ID = 1;
private List m_ManangeAlarmInfo = new List();
private byte[] data;
public AlarmDemo()
{
InitializeComponent();
this.Load += new EventHandler(AlarmDemo_Load);
}
private void AlarmDemo_Load(object sender EventArgs e)
{
m_DisConnectCallBack = new fDisConnectCallBack(DisConnectCallBack);
m_ReConnectCallBack = new fHaveReConnectCallBack(ReConnectCallBack);
m_AlarmCallBack = new fMessCallBackEx(AlarmCallBackEx);
try
{
NETClient.Init(m_DisConnectCallBack IntPtr.Zero null);
NETClient.SetAutoReconnect(m_ReConnectCallBack IntPtr.Zero);
NETClient.SetDVRMessCallBack(m_AlarmCallBack IntPtr.Zero);
InitOrLogoutUI();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
Process.GetCurrentProcess().Kill();
}
}
private bool AlarmCallBackEx(int lCommand IntPtr lLoginID IntPtr pBuf uint dwBufLen IntPtr pchDVRIP int nDVRPort bool bAlarmAckFlag int nEventID IntPtr dwUser)
{
EM_ALARM_TYPE type = (EM_ALARM_TYPE)lCommand;
switch (type)
{
case EM_ALARM_TYPE.ALARM_ALARM_EX:
case EM_ALARM_TYPE.MOTION_ALARM_EX:
case EM_ALARM_TYPE.VIDEOLOST_ALARM_EX:
case EM_ALARM_TYPE.SHELTER_ALARM_EX:
case EM_ALARM_TYPE.DISKFULL_ALARM_EX:
case EM_ALARM_TYPE.DISKERROR_ALARM_EX:
data = new byte[dwBufLen];
Marshal.Copy(pBuf data 0 (int)dwBufLen);
for (int i = 0; i < dwBufLen; i++)
{
if (data[i] == ALARM_START) // alarm start 报警开始
{
AlarmInfo info = new AlarmInfo();
info.AlarmType = type;
info.ID = m_ID;
相关资源
- Qt开发的海康威视摄像头开发
- OpenCvSharp 读摄像头及图像拼接功能
- 鱼眼摄像头标定与畸变校正双OPENCV版
- 用两个摄像头实现,双目标定,双目
- 视频摄像头SSD模型目标检测.zip
- openCV库文件卷2
- openCV库文件181283
- 奥比中光摄像头外文官网SDK.rar
- 使用DirectShow采集摄像头并对视音频进
- 批量入侵本地摄像头.zip
- 飞卡智能车全套资料
- KCF使用摄像头实现行人自主跟踪.zip
- 十二届恩智浦智能车摄像头组国一完
- 解决thinkpad 黑将s5摄像头不能启动问题
- 单目摄像头实时视觉定位
- 基于FPGAOV7725摄像头采集及VGA显示程序
- 电脑摄像头二维码条形码扫描读取p
- linux+qt+v4l2 摄像头视频捕捉--源代码
- 基于superSocket——AForge的UDP摄像并传输
- 基于OpenCV的云台控制系统
- QT+OpenCV+USB摄像头
- IMAQ Labview打开USB摄像头.vi
- OV7670摄像头模块原理图.rar
- 四向边沿跟踪算子.c
- qml+Gstreamer实现网络摄像头播放硬解码
- Qt编写调用网络摄像头完成视频录制、
- IE+Flash+vue项目调用摄像头拍照
- Ov9650-Coms摄像头在Linux环境下的代码开
- ros下usb摄像头视频发布
- unity3d打开外置摄像头
评论
共有 条评论