EasyCVR接入华为视频云系统查询集群编码和查询网关
【摘要】 在经过我们的测试之后,EasyCVR已经能够接入华为视频云系统。本文介绍一下EasyCVR接入华为视频云系统查询集群编码和查询网关的步骤。
EasyCVR是TSINGSEE青犀视频平台中接入协议较为广泛的平台,在经过我们的测试之后,已经能够接入华为视频云系统。本文介绍一下EasyCVR接入华为视频云系统查询集群编码和查询网关的步骤。
1、查询集群编码。该接口适配支持集群功能的产品:
//cpp code
IVS_INT32 IVS_SDK_GetClusterList(
IVS_INT32 iSessionID,
const IVS_CHAR* pDomainCode,
IVS_CLUSTER_INFO_LIST* pClusterList);
//cpp code
IVS_INT32 iRet = IVS_FAIL;
iRet = IVS_SDK_Init();
if (IVS_SUCCEED != iRet)
{
return 0;
}
IVS_LOGIN_INFO LoginReqInfo = {0};
LoginReqInfo.stIP.uiIPType = IP_V4;
strncpy(LoginReqInfo.stIP.cIP, "192.168.1.1", IVS_IP_LEN);
LoginReqInfo.uiPort = 9900;
strncpy(LoginReqInfo.cUserName, "Admin", IVS_NAME_LEN);
strncpy(LoginReqInfo.pPWD, "super123", IVS_PWD_LEN);
iRet = IVS_SDK_Login(&LoginReqInfo, &iSessionID);
if (IVS_SUCCEED == iRet)
{
const IVS_CHAR* pDomainCode = "6a7d3ca5ec984fe48ac634e3b22ff36a";
IVS_CLUSTER_INFO_LIST clusterInfoList;
iRet = IVS_SDK_GetClusterList(iSessionID, pDomainCode, &clusterInfoList);
if (IVS_SUCCEED == iRet)
{
//成功
}
}
2、查询网关接口。该接口适配支持集群功能的产品:
//cpp code
IVS_INT32 IVS_SDK_GetClusterCgList(
IVS_INT32 iSessionID,
const IVS_CHAR* pDomainCode,
const IVS_CHAR* pClusterCode,
IVS_CHAR** pClusterCgList);
iSessionID 代表登录成功后的会话ID
pDomainCode 域编码
pClusterCode 集群编码
pClusterList 查询网关响应XML,详见 如下表1查询网关响应XML
响应XML:
//cpp code
IVS_INT32 iRet = IVS_FAIL;
iRet = IVS_SDK_Init();
if (IVS_SUCCEED != iRet)
{
return 0;
}
IVS_LOGIN_INFO LoginReqInfo = {0};
LoginReqInfo.stIP.uiIPType = IP_V4;
strncpy(LoginReqInfo.stIP.cIP, "192.168.1.1", IVS_IP_LEN);
LoginReqInfo.uiPort = 9900;
strncpy(LoginReqInfo.cUserName, "Admin", IVS_NAME_LEN);
strncpy(LoginReqInfo.pPWD, "super123", IVS_PWD_LEN);
iRet = IVS_SDK_Login(&LoginReqInfo, &iSessionID);
if (IVS_SUCCEED == iRet)
{
const IVS_CHAR* pDomainCode = "6a7d3ca5ec984fe48ac634e3b22ff36a";
const IVS_CHAR* pClusterCode = "2BCBC3DEA03211E78000643E8C33B73B";
IVS_CHAR* pRspXml = NULL;
iRet = IVS_SDK_GetClusterCgList(iSessionID, pDomainCode, pClusterCode, &pRspXml);
if (NULL != pRspXml)
{
IVS_SDK_ReleaseBuffer(pRspXml);
pRspXml = NULL;
}
}
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)