1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-04 02:27:46 +01:00

Changed opus signal type to music, increased size of outgoing packet buffer

This commit is contained in:
Daniil Gentili 2017-08-03 16:41:38 +02:00
parent 5b3248482e
commit b6b40ac70a
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ tgvoip::OpusEncoder::OpusEncoder(MediaStreamItf *source):queue(11), bufferPool(9
opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10)); opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10));
opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(15)); opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(15));
opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(1)); opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(1));
opus_encoder_ctl(enc, OPUS_SET_SIGNAL(OPUS_SIGNAL_VOICE)); opus_encoder_ctl(enc, OPUS_SET_SIGNAL(OPUS_SIGNAL_MUSIC));
opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND)); opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND));
requestedBitrate=32000; requestedBitrate=32000;
currentBitrate=0; currentBitrate=0;

View File

@ -161,7 +161,7 @@ VoIPController::VoIPController() : activeNetItfName(""),
proxyAddress(""), proxyAddress(""),
proxyUsername(""), proxyUsername(""),
proxyPassword(""), proxyPassword(""),
outgoingPacketsBufferPool(1024, 20){ outgoingPacketsBufferPool(1024, 64){
seq=1; seq=1;
lastRemoteSeq=0; lastRemoteSeq=0;
state=STATE_WAIT_INIT; state=STATE_WAIT_INIT;
@ -276,6 +276,7 @@ VoIPController::~VoIPController(){
sendQueue->Put(PendingOutgoingPacket{0}); sendQueue->Put(PendingOutgoingPacket{0});
if(openingTcpSocket) if(openingTcpSocket)
openingTcpSocket->Close(); openingTcpSocket->Close();
LOGD("before join sendThread"); LOGD("before join sendThread");
join_thread(sendThread); join_thread(sendThread);
LOGD("before join recvThread"); LOGD("before join recvThread");