基本信息
源码名称:海康威视DEMO(DS40xxSDK)
源码大小:9.02M
文件格式:.rar
开发语言:C#
更新时间:2019-12-16
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
实时监控
HK-VCRDemo.rar
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace HK_VCRDemo
{
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
public RECT(int left, int top, int right, int bottom)
{
this.Left = left;
this.Top = top;
this.Right = right;
this.Bottom = bottom;
}//构造函数
}
public enum VideoFormat
{
vdfRGB8A_233 = 0x00000001,
vdfRGB8R_332 = 0x00000002,
vdfRGB15Alpha = 0x00000004,
vdfRGB16 = 0x00000008,
vdfRGB24 = 0x00000010,
vdfRGB24Alpha = 0x00000020,
vdfYUV420Planar = 0x00000040,
vdfYUV422Planar = 0x00000080,
vdfYUV411Planar = 0x00000100,
vdfYUV420Interspersed = 0x00000200,
vdfYUV422Interspersed = 0x00000400,
vdfYUV411Interspersed = 0x00000800,
vdfYUV422Sequence = 0x00001000, /* U0, Y0, V0, Y1: For VO overlay */
vdfYUV422SequenceAlpha = 0x00002000,
/* U0, Y0, V0, Y1: For VO overlay, with low bit for alpha blending */
vdfMono = 0x00004000, /* 8 bit monochrome */
vdfYUV444Planar = 0x00008000,
};
public class ImportCS
{
[DllImport("DS40xxSDK.dll")]
public static extern int InitDSPs();
[DllImport("DS40xxSDK.dll")]
public static extern IntPtr ChannelOpen(int channel);
[DllImport("DS40xxSDK.dll")]
public static extern int GetTotalChannels();
[DllImport("DS40xxSDK.dll")]
public static extern int StartVideoPreview(IntPtr hChannelHandle,IntPtr WndHandle, ref RECT rect, int bOverlay, int VideoFormat, int FrameRate);
}
}