mirror of
https://github.com/danog/libtgvoip.git
synced 2024-11-27 04:34:42 +01:00
Merge pull request #44 from telegramdesktop/tdesktop
Fix some warnings and push changes for tdesktop upstream.
This commit is contained in:
commit
4df5beedcd
@ -397,7 +397,7 @@ void AutomaticGainControl::Process(int16_t *inOut, size_t numSamples){
|
|||||||
if(passThrough)
|
if(passThrough)
|
||||||
return;
|
return;
|
||||||
if(numSamples!=960){
|
if(numSamples!=960){
|
||||||
LOGW("AutomaticGainControl only works on 960-sample buffers (got %u samples)", numSamples);
|
LOGW("AutomaticGainControl only works on 960-sample buffers (got %u samples)", (unsigned int)numSamples);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//LOGV("processing frame through AGC");
|
//LOGV("processing frame through AGC");
|
||||||
|
@ -219,7 +219,7 @@ void JitterBuffer::PutInternal(jitter_packet_t* pkt){
|
|||||||
wasReset=false;
|
wasReset=false;
|
||||||
outstandingDelayChange=0;
|
outstandingDelayChange=0;
|
||||||
nextTimestamp=((int64_t)pkt->timestamp)-step*minDelay;
|
nextTimestamp=((int64_t)pkt->timestamp)-step*minDelay;
|
||||||
LOGI("jitter: resyncing, next timestamp = %lld (step=%d, minDelay=%d)", (long long int)nextTimestamp, step, minDelay);
|
LOGI("jitter: resyncing, next timestamp = %lld (step=%d, minDelay=%d)", (long long int)nextTimestamp, step, int(minDelay));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0;i<JITTER_SLOT_COUNT;i++){
|
for(i=0;i<JITTER_SLOT_COUNT;i++){
|
||||||
@ -386,7 +386,7 @@ void JitterBuffer::Tick(){
|
|||||||
minDelay+=diff;
|
minDelay+=diff;
|
||||||
outstandingDelayChange+=diff*60;
|
outstandingDelayChange+=diff*60;
|
||||||
dontChangeDelay+=32;
|
dontChangeDelay+=32;
|
||||||
LOGD("new delay from stddev %d", minDelay);
|
LOGD("new delay from stddev %d", int(minDelay));
|
||||||
if(diff<0){
|
if(diff<0){
|
||||||
dontDecMinDelay+=25;
|
dontDecMinDelay+=25;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ private:
|
|||||||
bool first;
|
bool first;
|
||||||
size_t nextLen;
|
size_t nextLen;
|
||||||
unsigned int packetsPerFrame;
|
unsigned int packetsPerFrame;
|
||||||
ssize_t remainingDataLen;
|
ptrdiff_t remainingDataLen;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,7 +602,7 @@ void VoIPGroupController::AddGroupCallParticipant(int32_t userID, unsigned char
|
|||||||
//if(streamsLength==0)
|
//if(streamsLength==0)
|
||||||
// return;
|
// return;
|
||||||
MutexGuard m(participantsMutex);
|
MutexGuard m(participantsMutex);
|
||||||
LOGV("Adding group call user %d, streams length %u, streams %X", userID, streamsLength, serializedStreams);
|
//LOGV("Adding group call user %d, streams length %u, streams %X", userID, streamsLength, serializedStreams);
|
||||||
|
|
||||||
for(std::vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){
|
for(std::vector<GroupCallParticipant>::iterator p=participants.begin();p!=participants.end();++p){
|
||||||
if(p->userID==userID){
|
if(p->userID==userID){
|
||||||
@ -1225,11 +1225,11 @@ void VoIPController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint* srcE
|
|||||||
|
|
||||||
uint32_t innerLen=(uint32_t) in.ReadInt32();
|
uint32_t innerLen=(uint32_t) in.ReadInt32();
|
||||||
if(innerLen>decryptedLen-4){
|
if(innerLen>decryptedLen-4){
|
||||||
LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, decryptedLen);
|
LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, (unsigned int)decryptedLen);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(decryptedLen-innerLen<12){
|
if(decryptedLen-innerLen<12){
|
||||||
LOGW("Received packet has too little padding (%u)", decryptedLen-innerLen);
|
LOGW("Received packet has too little padding (%u)", (unsigned int)(decryptedLen-innerLen));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy(buffer, decrypted+4, innerLen);
|
memcpy(buffer, decrypted+4, innerLen);
|
||||||
@ -1706,7 +1706,7 @@ simpleAudioBlock random_id:long random_bytes:string raw_data:string = DecryptedA
|
|||||||
void VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint *srcEndpoint){
|
void VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint *srcEndpoint){
|
||||||
//LOGD("Received incoming packet from %s:%u, %u bytes", packet.address->ToString().c_str(), packet.port, packet.length);
|
//LOGD("Received incoming packet from %s:%u, %u bytes", packet.address->ToString().c_str(), packet.port, packet.length);
|
||||||
if(packet.length<17 || packet.length>2000){
|
if(packet.length<17 || packet.length>2000){
|
||||||
LOGW("Received packet has wrong length %d", packet.length);
|
LOGW("Received packet has wrong length %d", (int)packet.length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BufferOutputStream sigData(packet.length);
|
BufferOutputStream sigData(packet.length);
|
||||||
@ -1863,11 +1863,11 @@ void VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint
|
|||||||
|
|
||||||
uint32_t innerLen=(uint32_t) in.ReadInt32();
|
uint32_t innerLen=(uint32_t) in.ReadInt32();
|
||||||
if(innerLen>decryptedLen-4){
|
if(innerLen>decryptedLen-4){
|
||||||
LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, decryptedLen);
|
LOGW("Received packet has wrong inner length (%d with total of %u)", innerLen, (unsigned int)decryptedLen);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(decryptedLen-innerLen<12){
|
if(decryptedLen-innerLen<12){
|
||||||
LOGW("Received packet has too little padding (%u)", decryptedLen-innerLen);
|
LOGW("Received packet has too little padding (%u)", (unsigned int)(decryptedLen-innerLen));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
in=BufferInputStream(decrypted+4, (size_t) innerLen);
|
in=BufferInputStream(decrypted+4, (size_t) innerLen);
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#undef GetCurrentTime
|
#undef GetCurrentTime
|
||||||
|
#undef ERROR_TIMEOUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TGVOIP_PEER_CAP_GROUP_CALLS 1
|
#define TGVOIP_PEER_CAP_GROUP_CALLS 1
|
||||||
|
@ -271,6 +271,7 @@
|
|||||||
'defines': [
|
'defines': [
|
||||||
'WEBRTC_POSIX',
|
'WEBRTC_POSIX',
|
||||||
'WEBRTC_MAC',
|
'WEBRTC_MAC',
|
||||||
|
'TARGET_OS_OSX',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
[ '"<(official_build_target)" == "mac32"', {
|
[ '"<(official_build_target)" == "mac32"', {
|
||||||
@ -280,7 +281,7 @@
|
|||||||
},
|
},
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'/usr/local/macold/include/c++/v1',
|
'/usr/local/macold/include/c++/v1',
|
||||||
'<(DEPTH)/../../../Libraries/macold/openssl-1.0.1h/include',
|
'<(DEPTH)/../../../Libraries/macold/openssl/include',
|
||||||
],
|
],
|
||||||
}, {
|
}, {
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
@ -288,7 +289,7 @@
|
|||||||
'CLANG_CXX_LIBRARY': 'libc++',
|
'CLANG_CXX_LIBRARY': 'libc++',
|
||||||
},
|
},
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(DEPTH)/../../../Libraries/openssl-xcode/include',
|
'<(DEPTH)/../../../Libraries/openssl/include',
|
||||||
],
|
],
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
@ -296,7 +297,7 @@
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'"<(OS)" == "win"', {
|
'"<(OS)" == "win"', {
|
||||||
'msbuild_toolset': 'v140',
|
'msbuild_toolset': 'v141',
|
||||||
'defines': [
|
'defines': [
|
||||||
'NOMINMAX',
|
'NOMINMAX',
|
||||||
'_USING_V110_SDK71_',
|
'_USING_V110_SDK71_',
|
||||||
@ -334,7 +335,7 @@
|
|||||||
'_DEBUG',
|
'_DEBUG',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(DEPTH)/../../../Libraries/openssl_debug/Debug/include',
|
'<(DEPTH)/../../../Libraries/openssl/Debug/include',
|
||||||
],
|
],
|
||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
|
Loading…
Reference in New Issue
Block a user