您好,欢迎光临本网站![请登录][注册会员]  
文件名称: Delphi XE10编写的《海康摄像机SDK测试DEMO》
  所属分类: Delphi
  开发工具:
  文件大小: 13mb
  下载次数: 0
  上传时间: 2018-06-25
  提 供 者: dnli*****
 详细说明: type TShowStr = record X: Word; Y: Word; S: array [0 .. 43] of AnsiChar; end; type TCamera = record pHWND: HWND; strict private aCam: LongInt; g_nPort: LongInt; struDeviceInfo: NET_DVR_DEVICEINFO_V30; lRealHandle: LongInt; struPlayInfo: NET_DVR_CLIENTINFO; pUser: Pointer; dwRet: Integer; public property ErrCode: Integer read dwRet; procedure HCLogin(IP, User, Psd: String; Port: Word); procedure HCPlay(aHWND: HWND); procedure HCAddChar(str: TArray); function HCGetJpeg(JpgName: String; JpgSize: Word = 0; JpgQua: Word = 19): Boolean; procedure HCStop; procedure HCLogout; end; {$ENDIF //} implementation procedure TCamera.HCLogin(IP, User, Psd: String; Port: Word); begin NET_DVR_Init(); lRealHandle := -1; dwRet := 0; aCam := NET_DVR_Login_V30(PAnsiChar(ansistring(IP)), Port, PAnsiChar(ansistring(User)), PAnsiChar(ansistring(Psd)), @struDeviceInfo); dwRet := NET_DVR_GetLastError; end; procedure TCamera.HCPlay(aHWND: HWND); begin struPlayInfo.lChannel := 1; struPlayInfo.lLinkMode := 0; struPlayInfo.sMultiCastIP := NIL; struPlayInfo.hPlayWnd := aHWND; lRealHandle := NET_DVR_RealPlay_V30(aCam, @struPlayInfo, nil, pUser, true); dwRet := NET_DVR_GetLastError; end; procedure TCamera.HCAddChar(str: TArray); var i: Integer; aStr: NET_DVR_SHOWSTRING; begin if length(str) > MAX_STRINGNUM then begin setlength(str, MAX_STRINGNUM); end; for i := 0 to length(str) - 1 do begin aStr.struStringInfo[i].wShowString := 1; aStr.struStringInfo[i].wStringSize := length(str[i].S); aStr.struStringInfo[i].wShowStringTopLeftX := str[i].X; aStr.struStringInfo[i].wShowStringTopLeftY := str[i].Y; move(str[i].S[0], aStr.struStringInfo[i].sString[0], length(str[i].S)); end; aStr.dwSize := sizeof(aStr); NET_DVR_SetDVRConfig(aCam, NET_DVR_SET_SHOWSTRING, 1, @aStr, sizeof(NET_DVR_SHOWSTRING)); dwRet := NET_DVR_GetLastError; end; procedure TCamera.HCAddChar_V30(str: TArray); var i: Integer; aStr: NET_DVR_SHOWSTRING_V30; begin if length(str) > MAX_STRINGNUM_V30 then begin setlength(str, MAX_STRINGNUM_V30); end; for i := 0 to length(str) - 1 do begin aStr.struStringInfo[i].wShowString := 1; aStr.struStringInfo[i].wStringSize := length(str[i].S); aStr.struStringInfo[i].wShowStringTopLeftX := str[i].X; aStr.struStringInfo[i].wShowStringTopLeftY := str[i].Y; move(str[i].S[0], aStr.struStringInfo[i].sString[0], length(str[i].S)); end; aStr.dwSize := sizeof(aStr); NET_DVR_SetDVRConfig(aCam, NET_DVR_SET_SHOWSTRING_V30, 1, @aStr, sizeof(NET_DVR_SET_SHOWSTRING_V30)); dwRet := NET_DVR_GetLastError; end; function TCamera.HCGetJpeg(JpgName: String; JpgSize: Word = 0; JpgQua: Word = 19): Boolean; var aJpg: NET_DVR_JPEGPARA; begin aJpg.wPicSize := JpgSize; aJpg.wPicQuality := JpgQua; if aCam >= 0 then begin result := NET_DVR_CaptureJPEGPicture(aCam, 1, aJpg, PAnsiChar(ansistring(JpgName))); dwRet := NET_DVR_GetLastError(); end else result := false; dwRet := NET_DVR_GetLastError; end; procedure TCamera.HCStop; begin if lRealHandle >= 0 then begin NET_DVR_StopRealPlay(lRealHandle); lRealHandle := -1; end; PlayM4_CloseStream(g_nPort); PlayM4_FreePort(g_nPort); end; procedure TCamera.HCLogout; begin if lRealHandle > -1 then begin HCStop; end; if aCam >= 0 then begin NET_DVR_Logout_V30(aCam); aCam := -1; end; NET_DVR_Cleanup(); end; ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 海康 摄像机 录像机 SDK DEMO
 输入关键字,在本站1000多万海量源码库中尽情搜索: