博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
pjsip 同时使用多套音频设备
阅读量:6894 次
发布时间:2019-06-27

本文共 1448 字,大约阅读时间需要 4 分钟。

hot3.png

pjsip同时进行多路通话, 每路通话都能指定使用不同的mic和喇叭,搞它?

二话不说,抄代码:

HHow can I use multiple sound devices simultaneously?You can use multiple audio devices simultaneously with PJSUA-LIB. The first sound device is managed by PJSUA-LIB as usual, and you access it as slot #0 in the conference bridge. The following steps describe how to open and use the second and subsequent sound devices in your application:Create a ​sound device port for the sound device you want to use.pjmedia_snd_port *sndport;pj_status_t status;status = pjmedia_snd_port_create(..., &sndport);Create a ​splitter/combiner port.pjmedia_port *splitcomb;status = pjmedia_splitcomb_create(..., &splitcomb);Create a reverse channel from the splitcomb.pjmedia_port *revch;status = pjmedia_splitcomb_create_rev_channel(pool, splitcomb, 0, 0, &revch);Register the reverse channel above to the conference bridge.int slot;status = pjsua_conf_add_port(pool, revch, &slot);Connect the sound device port to the splitcomb.status = pjmedia_snd_port_connect(sndport, splitcomb);After these, you can use the sound device (that you open in step 1 above) by using the slot number (step 4) just as you would with other media ports. For example, to play a media to the sound device, just connect (with pjsua_conf_connect()) the slot number of that media to the slot number of the sound device, and vice versa.原文链接 https://trac.pjsip.org/repos/wiki/FAQ#multi-snd

 

转载于:https://my.oschina.net/mingyuejingque/blog/2223001

你可能感兴趣的文章
poj 3461 Oulipo(KMP模板题)
查看>>
libavcodev may be vulnerable or is not supported, and should be updated for play video
查看>>
ECMAScript 5 —— Function 类型 (二)
查看>>
Java Web 自动登录
查看>>
IOS中文本框输入自动隐藏和自动显示
查看>>
邮件发送封装方法
查看>>
网络安全维护九眼智能大数据显身手
查看>>
算法导论笔记——第二十章 van Emde Boas树
查看>>
TCP的三次握手/四次挥手
查看>>
主席树(区间第k小)
查看>>
iOS开发:告诉git不要跟踪UserInterfaceState.xcuserstate
查看>>
一个简单的WPF界面框架
查看>>
zt:Linux查看程序端口占用情况
查看>>
iis下thinkphp配置url rewrite伪静态
查看>>
jQuery-表单选择器
查看>>
Unique Binary Search Trees-计算表示相同序列的不同BST个数
查看>>
git 第三天 SSH免密码登录 1
查看>>
Notepad++ 列操作
查看>>
window.XMLHttpRequest
查看>>
【原】iOS学习之ARC和非ARC文件混编
查看>>