mobile CCTV,mobile surveillance,police body worn cameras
标题: c++ sdk 安全帽加入语音会议的问题 [打印本页]
author: tank123456 time: 2022-4-24 18:07
标题: c++ sdk 安全帽加入语音会议的问题
不传安全帽的id 也能加入会议成功(根据头文件里描述的返回结果bitmap 判断),客户端不传任何参数也能加入,
安全帽端听不到客户端的声音。
int CMLibBVCU::CreateMeeting(const QString &name)
{
if (m_session)
{
BVCU_Conf_BaseInfo sBaseInfo;
memset(&sBaseInfo, 0x00, sizeof(sBaseInfo));
strcpy_s(sBaseInfo.szName, sizeof (sBaseInfo.szName), name.toStdString().c_str());
sBaseInfo.iMode = BVCU_CONF_MODE_SPEAK_DISCUSSIONGROUP
| BVCU_CONF_MODE_JOIN_FREE
| BVCU_CONF_MODE_APPLY_AUTOAGREE
| BVCU_CONF_MODE_START_STOPADMIN
| BVCU_CONF_MODE_RECORD_STOPADMIN;
BVCU_Command cmdInfo;
memset(&cmdInfo, 0, sizeof(cmdInfo));
cmdInfo.iSize = sizeof(cmdInfo);
cmdInfo.iMethod = BVCU_METHOD_CONTROL;
cmdInfo.iSubMethod = BVCU_SUBMETHOD_CONF_CREATE;
cmdInfo.OnEvent = cmd_OnEvent;
cmdInfo.stMsgContent.pData = &sBaseInfo;
cmdInfo.stMsgContent.iDataCount = 1;
return BVCU_SendCmd(m_session, &cmdInfo);
}
return BVCU_RESULT_E_FAILED;
}
int CMLibBVCU::StartMeeting(const QString &id)
{
if (m_session)
{
BVCU_Command cmdInfo;
memset(&cmdInfo, 0, sizeof(cmdInfo));
cmdInfo.iSize = sizeof(cmdInfo);
cmdInfo.iMethod = BVCU_METHOD_CONTROL;
cmdInfo.iSubMethod = BVCU_SUBMETHOD_CONF_START;
strcpy_s(cmdInfo.szTargetID, sizeof (cmdInfo.szTargetID), id.toStdString().c_str());
cmdInfo.OnEvent = cmd_OnEvent;
return BVCU_SendCmd(m_session, &cmdInfo);
}
return BVCU_RESULT_E_FAILED;
}
int CMLibBVCU::JoinMeeting(const QString &meetingId, BVCU_Conf_Participator_Info*infos, int count)
{
if (m_session)
{
BVCU_Command cmdInfo;
memset(&cmdInfo, 0, sizeof(cmdInfo));
cmdInfo.iSize = sizeof(cmdInfo);
cmdInfo.iMethod = BVCU_METHOD_CONTROL;
cmdInfo.iSubMethod = BVCU_SUBMETHOD_CONF_PARTICIPATOR_ADD;
cmdInfo.OnEvent = cmd_OnEvent;
cmdInfo.stMsgContent.pData = infos;
cmdInfo.stMsgContent.iDataCount = count;
strcpy_s(cmdInfo.szTargetID, sizeof (cmdInfo.szTargetID), meetingId.toStdString().c_str());
return BVCU_SendCmd(m_session, &cmdInfo);
}
return BVCU_RESULT_E_FAILED;
}
void Camera::joinMeeting()
{
BVCU_Conf_Participator_Info info;
memset(&info, 0, sizeof (info));
// strcpy_s(info.szID, sizeof (info.szID), sipInfo.thirdDeviceId.toStdString().c_str()); 不传安全帽id也能加入
info.iAllowedMediaDir = BVCU_MEDIADIR_TALKONLY;
CMLibBVCU::JoinMeeting(CMLibBVCU::meetingId, &info, 1);
}
返回结果:
case BVCU_SUBMETHOD_CONF_PARTICIPATOR_ADD_CMD:
qDebug() << __func__ << "join meeting "<< pEvent->iResult;
{
BVCU_Conf_Participator_AddResult *result = (BVCU_Conf_Participator_AddResult*)pEvent->stContent.pData;
if (result) {
int m = result->iResultBits[0]; // 每次只加一个
int n = m & ((unsigned int)1 << (31-(0&31)));
qDebug() << __func__ << "join meeting0x" << QString::number(n, 16) << result->iResultBits[1];
}
}
break;
输出:
cmd_OnEvent join meeting 0
cmd_OnEvent join meeting 0x"ffffffff80000000" 0 // ‘8‘ 即是int 最高位为1
author: fanghj90 time: 2022-5-9 14:31
客户端不传任何参数也能加入:客户端创建会议时会自动加入。
不传安全帽的id 也能加入会议成功:应该是服务器返回值错误,具体服务器是哪个版本?会议成员是否加入成功,和成员的状态,需要以通知和查询结果为准。
安全帽端听不到客户端的声音:获取会议成员列表,确保设备在会议中,且状态是已加入会议,确保客户端状态是发言中(需要发申请发言请求)。
author: tank123456 time: 2022-5-9 14:59
确保客户端状态是发言中(需要发申请发言请求)
发请求要传什么参数吗?客户端id ?
author: fanghj90 time: 2022-5-9 15:28
BVCU_Command.szTargetID设置为CONF_ID
BVCU_SUBMETHOD_CONF_PARTICIPATOR_APPLYFOR_STARTSPEAK,//申请发言,仅对
BVCU_CONF_MODE_SPEAK_CHAIRMAN模式的语音会议有意义。输入类型:无;输出类型:无;
author: tank123456 time: 2022-5-9 16:58
BVCU_Command.szTargetID设置为CONF_ID,这个CONF_ID 从哪里来?
欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/) |
Powered by Discuz! X3.2 |