linphone-sdk windows10 Qt5.13.0-qtcreater demo

本文详细介绍了如何在Windows10上使用Qt5.13.0集成linphone-sdk进行开发,包括引用静态库、设置日志、初始化SDK、注册号码、呼出电话、挂断、转移和接听电话等功能的实现步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

linphone-sdk windows10 Qt5.13.0 开发

1.引用c静态lib库
bctoolbox、liblinphone、ortp、mediastreamer
2.添加引用include

3.定义结构体
struct PhoneS{
QString myExtension ;
QString myPassword ;
QString myDomain ;
QString myDisplay;
bool isRecord=0;
bool_t running=1;
FILE* myfile;//write log
QString linfile;
QString account_path;
QString exePath ;
QString config_name;
QString config_fact;
QString server_addr;
LinphoneCoreVTable vtable = { 0 };
LinphoneCore lc ;
LinphoneProxyConfig
proxy_cfg;
LinphoneAddress *from ;
LinphoneAuthInfo info;
};
4.初始化linphone-sdk
windows下的日志
linphone_core_set_log_level(ORTP_ERROR);//设置日志等级
linphone_core_set_log_handler(LinLog);//设置日志回调方法
void LinLog(const char domain,BctbxLogLevel lev,const charfmt,va_list args){//日志回调方法
char * content =bctbx_strdup_vprintf(fmt,args);
QDateTime time =QDateTime::currentDateTime();
QString date =time.toString(“yyyy-MM-dd”);
QString date_time =time.toString(“yyyy-MM-dd hh:mm:ss.zzz”);
QString path=QCoreApplication::applicationDirPath()+"/log/";
QDir dir(path);
if(!dir.exists())
{
dir.mkdir(path);
}
QFile file(path+

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

天下乌贼1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值