mobile CCTV,mobile surveillance,police body worn cameras
标题:
c++ sdk 语音会议问题3
[打印本页]
author:
tank123456
time:
2022-5-23 17:14
标题:
c++ sdk 语音会议问题3
麻烦确认几个问题:
1、创建会议的模式是
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
这种模式下无需申请发言;
2、创建语音会议的流程:创建会议 -> 安全帽加入会议(客户端已自动加入)-> 开启会议 -> 安全帽和客户端加入语音会议 -> 开始语音对讲;
3、安全帽加入会议传参:
int
CMLibBVCU
::
JoinMeeting
(
const
QString
&
id
,
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
),
id
.
toStdString
().
c_str
()); // 会议id
return
BVCU_SendCmd
(
m_session
,
&
cmdInfo
);
}
return
BVCU_RESULT_E_FAILED
;
}
BVCU_Conf_Participator_Info
中的
szID 填安全帽 id,iAllowedMediaDir
=
BVCU_MEDIADIR_TALKONLY 是否正确?
加入语音会议的子命令是
BVCU_SUBMETHOD_CONF_PARTICIPATOR_JOIN
是否正确?BVCU_Conf_Participator_Info
传的参数和加入会议是否一样?
int
CMLibBVCU
::
ApplyForJoinSpeakMeeting
(
const
QString
&
id
,
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_JOIN
;
cmdInfo
.
OnEvent
=
cmd_OnEvent
;
strcpy_s
(
cmdInfo
.
szTargetID
,
sizeof
(
cmdInfo
.
szTargetID
),
id
.
toStdString
().
c_str
()); // 会议 id
cmdInfo
.
stMsgContent
.
pData
=
infos
;
cmdInfo
.
stMsgContent
.
iDataCount
=
count
;
return
BVCU_SendCmd
(
m_session
,
&
cmdInfo
);
}
return
BVCU_RESULT_E_FAILED
;
}
现在按照上述流程和参数,安全帽加入会议成功(见下面的代码),但加入语音会议失败
-65511,麻烦帮忙分析一下是哪里有问题,谢谢!
case
BVCU_SUBMETHOD_CONF_PARTICIPATOR_ADD_CMD
:
qDebug
()
<<
__func__
<<
"join meeting "
<<
pEvent
->
iResult
; // 为 0
{
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 meeting 0x"
<<
QString
::
number
(
n
,
16
); // 也为0, 按头文件里的说明最高位应为1 才表示对应的安全帽加入成功,当前测试只有一个安全帽
}
m_OnMeetingEvent
(
hSession
,
""
,
BVCU_SUBMETHOD_CONF_PARTICIPATOR_ADD_CMD
,
pEvent
->
iResult
,
result
);
}
break
;
author:
coldflame
time:
2022-5-23 19:57
不建议再折腾SERVER-D的C++ SDK了,那个已经停止维护了。
建议切换到最新的SERVER-E的WEB SDK restful接口上来。
这个网页收藏下,汇总了所有常用的技术文档:
移动视频-智能图传产品和平台常用技术支持文档汇总,
https://www.besovideo.com/detail?t=1&i=198
欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/)
Powered by Discuz! X3.2