From 07833b673170a0f1b1f78f5797059224e35ba6fd Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 2 Aug 2014 20:45:39 -0400 Subject: [PATCH 1/2] Increase dequeue queue size to 16 to prevent stuttering. --- toxav/toxav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toxav/toxav.c b/toxav/toxav.c index 11827f57..9f99ce92 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -97,7 +97,7 @@ typedef struct { } DECODE_PACKET; #define VIDEO_DECODE_QUEUE_SIZE 2 -#define AUDIO_DECODE_QUEUE_SIZE 8 +#define AUDIO_DECODE_QUEUE_SIZE 16 struct _ToxAv { Messenger *messenger; From 82c40b9c8a70968ce82ac0d56bdd15334da3599e Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Sun, 3 Aug 2014 15:56:09 -0400 Subject: [PATCH 2/2] remove unneeded printf's/prevent stdout spam --- toxav/toxav.c | 4 ++-- toxcore/LAN_discovery.c | 6 ------ toxcore/TCP_client.c | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/toxav/toxav.c b/toxav/toxav.c index 9f99ce92..870dd111 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -1083,7 +1083,7 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg) av->audio_decode_write = (w + 1) % AUDIO_DECODE_QUEUE_SIZE; pthread_cond_signal(&av->decode_cond); } else { - printf("dropped audio frame\n"); + LOGGER_DEBUG("Dropped audio frame\n"); free(p); } @@ -1123,7 +1123,7 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg) av->video_decode_write = (w + 1) % VIDEO_DECODE_QUEUE_SIZE; pthread_cond_signal(&av->decode_cond); } else { - printf("dropped video frame\n"); + LOGGER_DEBUG("Dropped video frame\n"); free(p); } diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index 420c490d..3c05fe8d 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -46,7 +46,6 @@ static void fetch_broadcast_info(uint16_t port) unsigned long ulOutBufLen = sizeof(pAdapterInfo); if (pAdapterInfo == NULL) { - printf("Error allocating memory for pAdapterInfo\n"); return; } @@ -55,7 +54,6 @@ static void fetch_broadcast_info(uint16_t port) pAdapterInfo = malloc(ulOutBufLen); if (pAdapterInfo == NULL) { - printf("Error allocating memory needed to call GetAdaptersinfo\n"); return; } } @@ -78,7 +76,6 @@ static void fetch_broadcast_info(uint16_t port) ip_port->ip.ip4.uint32 = htonl(broadcast_ip); ip_port->port = port; broadcast_count++; - printf("broadcast ip: %s\n", ip_ntoa(&ip_port->ip)); if (broadcast_count >= MAX_INTERFACES) { return; @@ -88,10 +85,7 @@ static void fetch_broadcast_info(uint16_t port) pAdapter = pAdapter->Next; } - } else { - printf("Fetching adapter info failed %i\n", ret); } - } #elif defined(__linux__) diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c index 45220538..ff92d215 100644 --- a/toxcore/TCP_client.c +++ b/toxcore/TCP_client.c @@ -460,7 +460,6 @@ TCP_Client_Connection *new_TCP_connection(IP_Port ip_port, const uint8_t *public sock_t sock = socket(ip_port.ip.family, SOCK_STREAM, IPPROTO_TCP); if (!sock_valid(sock)) { - printf("fail1 %u\n", sock); return NULL; }