不传安全帽的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
|