1、libjingle库所带例子只支持rtpdump文件传递语音,不支持实时语音通话;
2、最新的几个版本的libjingle库去掉了GIPS voiceEngine的相关部分(可能是因为google收购了GIPS);
3、那么在windows下要支持实时语音通话,可以用linphone media engine,不过这个库是linux下的,所以迁移过来会费不少精力(不知有没有更好的方法):
要想在windows下用linphone media engine, 首先,按照README的说明添加如下代码:
In the "talk.Library(env, name = "libjingle",..." section, you need to add:
"HAVE_LINPHONE",
"HAVE_SPEEX",
"HAVE_ILBC",
to the "cppdefines = [".
add:
add:
"third_party/mediastreamer/include",
In the "talk.App(env, name = "call",..." section, you need to add:
"ortp"
"mediastreamer",
to the "libs = [".
然后,
访问 http://download.savannah.gnu.org/releases-noredirect/linphone/ortp/sources/下载ortp代码,
并复制到libjingle库的third_party中,文件夹名需与上一步添加的路径名一致。
在windows下需要dll,所以还得编译两个库的dll,方法转自:
接着,
copy .lib文件到talk\build\dbg\lib目录,
copy .dll到talk\build\dbg\staging目录。
然后,修改libjingle库的socketaddress.cc里的一个bug,参考 http://mysuperbaby.iteye.com/blog/910830
增加红色,解决域名转IP的问题:
in_addr addr;
struct hostent *host;
if (isalpha(hostname.c_str()[0]))
{
host = gethostbyname(hostname.c_str());
if (host == NULL)
{
printf("gethostbyname error\n");
return false;
}
memcpy(&addr.s_addr, host->h_addr_list[0],host->h_length);
}
else if (inet_aton(hostname.c_str(), &addr) == 0)
{
return false;
}
*ip = NetworkToHost32(addr.s_addr);
return true;
}
按照README的方法,编译。
通过后运行call.exe,与Gtalk通话。
如果音质不好,断断续续,可以在mingw&msys下,
还有就是关于receiving RTCP packet: Connection reset by peer. 参考 http://mysuperbaby.iteye.com/blog/911159
1万+



被折叠的 条评论
为什么被折叠?



