Tucodec基于网络通信协议所集成的 VoIP 技术
Tucodec 详细介绍
tucodec 是图鸭科技基于网络通信协议所集成的VoIP技术, 由C/C++语言实现.
具有以下特点:
智能化调整码率.
端对端延时50~100ms.
P2P穿透70%, 节约服务器带宽.
兼容MAC OS, iOS, Android, Windows, Linux等平台.
可应用于多人视频会议, 端到端视频通话, 连麦直播等场景.
单台服务器并发超过nginx_rtmp, 支持集群.
Android启动代码示例
``` java private VoipAndroid mVoIPClient; private VoipVideoRender mMainRender, render1, render2, render3; private int mUserId, render1_id, render2_id, render3_id; /* 省略以上变量初始化代码*/ private VoipAndroid.VideoCallback mVideoCallback = new VoipAndroid.VideoCallback() { @override public void priviewImage(VoipImage voipImage) { mMainRender.setMirror(false); mMainRender.pushVideoFrame(voipImage); } @override public void decodedImage(VoipImage voipImage) { if (voipImage.userId != mUserId) { mVoIPeers.get(voipImage.userId).setMirror(false); mVoIPeers.get(voipImage.userId).pushVideoFrame(voipImage); } } } private void initGroupChat() { mVoIPClient = new VoipAndroid(new Handler(),getApplication(),null); mVoIPClient.loginRelayServer(ip, (short)port, mUserId, 0); mVideoCapture = new VoipVideoCapture(mVoIPClient, new VoipVideoCapture.CaptureParam(mVoIPClient.getConfig().videoWith, mVoIPClient.getConfig().videoHeight)); mVideoCapture.start(true, mVoIPClient.getConfig(), (ViewGroup)mMainRender.getParent()); mVoIPClient.registerVideoCallback(mVideoCallback); mVoIPClient.registerAudioCallback(mAudioCallback); mVoIPClient.init((mVoIPClient.benchmark() + mVoIPClient.benchmark() + mVoIPClient.benchmark()) / 3, mVideoCapture); mVoIPClient.startCallWithUserName("android_client", mUserId); mVoIPClient.startVideoPipeline(new VoipAndroid.VideoParameter(512, false)); mVoIPClient.startAudioPipeline(new VoipAndroid.AudioParameter(1600, false)); } ```
评论