无论Libjingle 0.4.0还是0.5.2 (相比较0.4.0有很大改动), 有一个很隐藏却很致命的错误. 这个错误会导致voice call的时候只能听到一方的声音.
fix方法:
[b]physicalsocketserver.cc[/b]
1.
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
[AddMyChange]
[b]#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) [/b]
...
2.
// Creates the underlying OS socket (same as the "socket" function).
virtual bool Create(int type) {
Close();
s_ = ::socket(AF_INET, type, 0);
[AddMyChange]
[b]#ifdef WIN32
DWORD dwBytesReturned = 0;
BOOL bNewBehavior = FALSE;
DWORD status;
// disable new behavior using
// IOCTL: SIO_UDP_CONNRESET
status = WSAIoctl(s_, SIO_UDP_CONNRESET,
&bNewBehavior, sizeof(bNewBehavior),
NULL, 0, &dwBytesReturned,
NULL, NULL);
#endif[/b]
...
加了上面的修改, 终于完美实现Windows下Libjingle ( 0.4.0或0.5.2) + Linphone的语音通信.
fix方法:
[b]physicalsocketserver.cc[/b]
1.
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
[AddMyChange]
[b]#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) [/b]
...
2.
// Creates the underlying OS socket (same as the "socket" function).
virtual bool Create(int type) {
Close();
s_ = ::socket(AF_INET, type, 0);
[AddMyChange]
[b]#ifdef WIN32
DWORD dwBytesReturned = 0;
BOOL bNewBehavior = FALSE;
DWORD status;
// disable new behavior using
// IOCTL: SIO_UDP_CONNRESET
status = WSAIoctl(s_, SIO_UDP_CONNRESET,
&bNewBehavior, sizeof(bNewBehavior),
NULL, 0, &dwBytesReturned,
NULL, NULL);
#endif[/b]
...
加了上面的修改, 终于完美实现Windows下Libjingle ( 0.4.0或0.5.2) + Linphone的语音通信.