PJSIP在线程中调用出现提示注册线程pj_thread_register的解决方案
作者:admin 日期:2012-06-14
在多线程中调用PJLIB里面的函数,报错如下:
Calling pjlib from unknown/external thread. You must
register external threads with pj_thread_register()
before calling any pjlib functions.
解决办法
pj_thread_desc rtpdesc;
pj_thread_t *thread = 0;
if( !pj_thread_is_registered())
{
if (pj_thread_register(NULL,rtpdesc,&thread) == PJ_SUCCESS)
{
}
}
Calling pjlib from unknown/external thread. You must
register external threads with pj_thread_register()
before calling any pjlib functions.
解决办法
pj_thread_desc rtpdesc;
pj_thread_t *thread = 0;
if( !pj_thread_is_registered())
{
if (pj_thread_register(NULL,rtpdesc,&thread) == PJ_SUCCESS)
{
}
}






评论: 1 | 引用: 0 | 查看次数: -
发表评论