• solphyn
    了解作者
  • Unix_Linux
    开发工具
  • 608KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2020-01-03 04:05
    上传日期
App demo console player
consoleDemo.zip
  • include
  • HCNetSDK.h
    2.3MB
  • src
  • ConfigParams.cpp
    15.9KB
  • Voice.h
    312B
  • CapPicture.h
    233B
  • tool.cpp
    703B
  • Alarm.cpp
    4.2KB
  • GetStream.h
    414B
  • ConfigParams.h
    1.2KB
  • Voice.cpp
    2.9KB
  • Alarm.h
    327B
  • playback.cpp
    13.4KB
  • playback.h
    520B
  • consoleMain.cpp
    3.1KB
  • GetStream.cpp
    5.9KB
  • CapPicture.cpp
    1.7KB
  • tool.h
    290B
  • public.h
    396B
内容介绍
/* * Copyright(C) 2010,Hikvision Digital Technology Co., Ltd * * File name��ConfigParams.cpp * Discription�� * Version ��1.0 * Author ��panyadong * Create Date��2010_3_29 * Modification History�� */ #include "ConfigParams.h" #include <stdio.h> #include <string.h> #include "public.h" #include <iostream> using namespace std; //#define DEMO_DVRCONFIG_IP "172.2.87.101" #define DEMO_DVRCONFIG_IP "172.4.4.221" /******************************************************************* Function: Demo_ConfigParams Description: Set params. Parameter: (IN) none Return: 0--successful��-1--fail�� **********************************************************************/ int Demo_ConfigParams(LONG lUserID) { //Demo_CompressParams_V30(lUserID); //Demo_GetDeviceState(lUserID); //Demo_DiskRaidInfo(lUserID); //if (Demo_CompressParams_V30() == HPR_ERROR) //{ // return HPR_ERROR; //} //Demo_Synchronous_IPC(lUserID); //Demo_IPCPasswd(lUserID); //Demo_GetDeviceNetUsingInfo(lUserID); //Demo_SetIPCNet(lUserID); //picture //Demo_PictureParams(lUserID); //IPC configure v40 Demo_IPParaCfg_v31(lUserID); //IPC configure v40 //Demo_IPParaCfg_V40(lUserID); //channel record status //Demo_ChannelRecordStatus(lUserID); return HPR_OK; } //NET_DVR_GET_COMPRESSCFG int Demo_CompressParams() { NET_DVR_Init(); long lUserID; //login NET_DVR_USER_LOGIN_INFO struLoginInfo = {0}; NET_DVR_DEVICEINFO_V40 struDeviceInfoV40 = {0}; struLoginInfo.bUseAsynLogin = false; struLoginInfo.wPort = 8000; memcpy(struLoginInfo.sDeviceAddress, "10.8.98.80", NET_DVR_DEV_ADDRESS_MAX_LEN); memcpy(struLoginInfo.sUserName, "admin", NAME_LEN); memcpy(struLoginInfo.sPassword, "hik12345", NAME_LEN); lUserID = NET_DVR_Login_V40(&struLoginInfo, &struDeviceInfoV40); if (lUserID < 0) { printf("pyd1---Login error\n"); return HPR_ERROR; } int iRet; //set params DWORD uiReturnLen; NET_DVR_COMPRESSIONCFG struParams = {0}; iRet = NET_DVR_GetDVRConfig(lUserID, NET_DVR_GET_COMPRESSCFG, struDeviceInfoV40.struDeviceV30.byStartChan, \ &struParams, sizeof(NET_DVR_COMPRESSIONCFG), &uiReturnLen); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_GET_COMPRESSCFG_V30 error.\n"); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_ERROR; } printf("pyd---size is %d\n", sizeof(NET_DVR_COMPRESSIONCFG_V30)); //stop a minute. char cUserChoose; printf("pyd---press any key to set :"); cin>>cUserChoose; //Set params. struParams.struRecordPara.dwVideoBitrate = 2; iRet = NET_DVR_SetDVRConfig(lUserID, NET_DVR_SET_COMPRESSCFG, struDeviceInfoV40.struDeviceV30.byStartChan, \ &struParams, sizeof(NET_DVR_COMPRESSIONCFG)); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_SET_COMPRESSCFG_V30 error.\n"); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_ERROR; } printf("pyd---press any key to get :"); cin>>cUserChoose; //Get params. iRet = NET_DVR_GetDVRConfig(lUserID, NET_DVR_GET_COMPRESSCFG, struDeviceInfoV40.struDeviceV30.byStartChan, \ &struParams, sizeof(NET_DVR_COMPRESSIONCFG), &uiReturnLen); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_GET_COMPRESSCFG_V30 error.\n"); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_ERROR; } printf("pyd---press any key to stop:"); cin>>cUserChoose; printf("pyd---%d\n", struParams.struRecordPara.dwVideoBitrate); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_OK; } //NET_DVR_GET_COMPRESSCFG_V30 int Demo_CompressParams_V30(LONG lUserID) { int iRet; //set params DWORD uiReturnLen; NET_DVR_COMPRESSIONCFG_V30 struParams = {0}; iRet = NET_DVR_GetDVRConfig(lUserID, NET_DVR_GET_COMPRESSCFG_V30, 33, \ &struParams, sizeof(NET_DVR_COMPRESSIONCFG_V30), &uiReturnLen); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_GET_COMPRESSCFG_V30 error.\n"); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_ERROR; } printf("pyd---size is %d\n", sizeof(NET_DVR_COMPRESSIONCFG_V30)); //stop a minute. char cUserChoose; printf("pyd---press any key to set :"); cin>>cUserChoose; //Set params. struParams.struNormHighRecordPara.dwVideoBitrate = 2; iRet = NET_DVR_SetDVRConfig(lUserID, NET_DVR_SET_COMPRESSCFG_V30, 33, \ &struParams, sizeof(NET_DVR_COMPRESSIONCFG_V30)); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_SET_COMPRESSCFG_V30 error.\n"); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_ERROR; } printf("pyd---press any key to get :"); cin>>cUserChoose; //Get params. iRet = NET_DVR_GetDVRConfig(lUserID, NET_DVR_GET_COMPRESSCFG_V30, 33, \ &struParams, sizeof(NET_DVR_COMPRESSIONCFG_V30), &uiReturnLen); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_GET_COMPRESSCFG_V30 error.\n"); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_ERROR; } printf("pyd---press any key to stop:"); cin>>cUserChoose; printf("pyd---%d\n", struParams.struNormHighRecordPara.dwVideoBitrate); NET_DVR_Logout_V30(lUserID); NET_DVR_Cleanup(); return HPR_OK; } //NET_DVR_GET_DVR_SYNCHRONOUS_IPC int Demo_Synchronous_IPC(LONG lUserID) { int iRet = -1; DWORD uiReturnLen = 0; LONG lChannel = 0; NET_DVR_SYNCHRONOUS_IPC struParams = {0}; struParams.dwSize = sizeof(struParams); iRet = NET_DVR_GetDVRConfig(lUserID, NET_DVR_GET_DVR_SYNCHRONOUS_IPC, lChannel, \ &struParams, sizeof(NET_DVR_SYNCHRONOUS_IPC), &uiReturnLen); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_GET_DVR_SYNCHRONOUS_IPC error.%d\n", NET_DVR_GetLastError()); return HPR_ERROR; } //printf("pyd---size is %d\n", sizeof(NET_DVR_COMPRESSIONCFG_V30)); struParams.byEnable = !struParams.byEnable; //Set params. iRet = NET_DVR_SetDVRConfig(lUserID, NET_DVR_SET_DVR_SYNCHRONOUS_IPC, lChannel, \ &struParams, sizeof(NET_DVR_SYNCHRONOUS_IPC)); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_SET_COMPRESSCFG_V30 error.%d\n", NET_DVR_GetLastError()); return HPR_ERROR; } //Get params. iRet = NET_DVR_GetDVRConfig(lUserID, NET_DVR_GET_DVR_SYNCHRONOUS_IPC, lChannel, \ &struParams, sizeof(NET_DVR_SYNCHRONOUS_IPC), &uiReturnLen); if (!iRet) { printf("pyd---NET_DVR_GetDVRConfig NET_DVR_GET_DVR_SYNCHRONOUS_IPC error.%d\n", NET_DVR_GetLastError()); return HPR_ERROR; } printf("pyd---byEnable:%d\n", struParams.byEnable); return HPR_OK; } /** @fn int Demo_IPCPasswd(LONG lUserID) * @brief NET_DVR_SET_DVR_IPC_PASSWD * @param (IN) LONG lUserID * @return 0--success��-1--fail. */ int Demo_IPCPasswd(LONG lUserID) { int iRet = -1; LONG lChannel = 33; NET_DVR_IPC_PASSWD struParams = {0}; struParams.dwSize = sizeof(NET_DVR_IPC_PASSWD); strcpy(struParams.sOldPasswd, "12345"); strcpy(struParams.sNewPasswd, "12345"); iRet = NET_DVR_SetDVRConfig(lUserID, NET_DVR_SET_DVR_IPC_PASSWD, lChannel, &struParams, sizeof(NET_DVR_IPC_PASSWD)); if (!iRet) { printf("pyd---Set NET_DVR_SET_DVR_IPC_PASSWD error:%d\n", NET_DVR_GetLastError()); return HPR_ERROR; } return HPR_OK; } int Demo_GetDeviceNetU
评论
    相关推荐
    • HIKVISION ISAPI.zip
      ISAPI manual HIKVISION
    • hikvision.zip
      ISAPI, used to set Hikvision OSD
    • 04296147hikvision.zip
      vb 摄像头 采用vb开发的监控类代码,可以使用该代码将海康卡的码流进行解析
    • hikvision-master.zip
      海康python调用!!!!!!!!!!!!
    • AnyDesk.zip
      hikvision any desk application
    • hikvision-decrypter.zip
      下载hikvision海康威视设备的配置文件,通过该解密工具可以解密,解密后得到的文件用十六进制编辑器打开后,能看到密码的明文,实测很强大!
    • hikvision.zip
      海康威视摄像头sdk二次开发布防报警回调,maven工程,导入即用(examples的jar包需要maven打入本地库或者单独引用依赖)
    • hikvision.zip
      利用海康工业相机的python代码接口,借鉴其他博主的简化的接口函数,开发了能够实现用opencv显示实时图像和保存图像的多线程的代码。
    • qt_hikvision.zip
      qt显示hikvision网络摄像头播放器demo