1
0
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:
Gregory K 2018-05-25 20:29:23 +03:00 committed by GitHub
commit 4df5beedcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 14 deletions

View File

@ -397,7 +397,7 @@ void AutomaticGainControl::Process(int16_t *inOut, size_t numSamples){
if(passThrough)
return;
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;
}
//LOGV("processing frame through AGC");

View File

@ -219,7 +219,7 @@ void JitterBuffer::PutInternal(jitter_packet_t* pkt){
wasReset=false;
outstandingDelayChange=0;
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++){
@ -386,7 +386,7 @@ void JitterBuffer::Tick(){
minDelay+=diff;
outstandingDelayChange+=diff*60;
dontChangeDelay+=32;
LOGD("new delay from stddev %d", minDelay);
LOGD("new delay from stddev %d", int(minDelay));
if(diff<0){
dontDecMinDelay+=25;
}

View File

@ -64,7 +64,7 @@ private:
bool first;
size_t nextLen;
unsigned int packetsPerFrame;
ssize_t remainingDataLen;
ptrdiff_t remainingDataLen;
};
}

View File

@ -602,7 +602,7 @@ void VoIPGroupController::AddGroupCallParticipant(int32_t userID, unsigned char
//if(streamsLength==0)
// return;
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){
if(p->userID==userID){
@ -1225,11 +1225,11 @@ void VoIPController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint* srcE
uint32_t innerLen=(uint32_t) in.ReadInt32();
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;
}
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;
}
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){
//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){
LOGW("Received packet has wrong length %d", packet.length);
LOGW("Received packet has wrong length %d", (int)packet.length);
return;
}
BufferOutputStream sigData(packet.length);
@ -1863,11 +1863,11 @@ void VoIPGroupController::ProcessIncomingPacket(NetworkPacket &packet, Endpoint
uint32_t innerLen=(uint32_t) in.ReadInt32();
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;
}
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;
}
in=BufferInputStream(decrypted+4, (size_t) innerLen);

View File

@ -35,6 +35,7 @@
#ifdef _WIN32
#undef GetCurrentTime
#undef ERROR_TIMEOUT
#endif
#define TGVOIP_PEER_CAP_GROUP_CALLS 1

View File

@ -271,6 +271,7 @@
'defines': [
'WEBRTC_POSIX',
'WEBRTC_MAC',
'TARGET_OS_OSX',
],
'conditions': [
[ '"<(official_build_target)" == "mac32"', {
@ -280,7 +281,7 @@
},
'include_dirs': [
'/usr/local/macold/include/c++/v1',
'<(DEPTH)/../../../Libraries/macold/openssl-1.0.1h/include',
'<(DEPTH)/../../../Libraries/macold/openssl/include',
],
}, {
'xcode_settings': {
@ -288,7 +289,7 @@
'CLANG_CXX_LIBRARY': 'libc++',
},
'include_dirs': [
'<(DEPTH)/../../../Libraries/openssl-xcode/include',
'<(DEPTH)/../../../Libraries/openssl/include',
],
}]
]
@ -296,7 +297,7 @@
],
[
'"<(OS)" == "win"', {
'msbuild_toolset': 'v140',
'msbuild_toolset': 'v141',
'defines': [
'NOMINMAX',
'_USING_V110_SDK71_',
@ -334,7 +335,7 @@
'_DEBUG',
],
'include_dirs': [
'<(DEPTH)/../../../Libraries/openssl_debug/Debug/include',
'<(DEPTH)/../../../Libraries/openssl/Debug/include',
],
'msvs_settings': {
'VCCLCompilerTool': {