Update with upstream

This commit is contained in:
mannol 2014-08-04 00:15:19 +02:00
commit d08d032368
6 changed files with 18 additions and 21 deletions

View File

@ -163,11 +163,11 @@ void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
cast->Alice.status = TimedOut; cast->Alice.status = TimedOut;
} }
static void callback_audio(ToxAv *av, int32_t call_index, int16_t *data, int length, void* userdata) static void callback_audio(ToxAv *av, int32_t call_index, int16_t *data, int length, void *userdata)
{ {
} }
static void callback_video(ToxAv *av, int32_t call_index, vpx_image_t *img, void* userdata) static void callback_video(ToxAv *av, int32_t call_index, vpx_image_t *img, void *userdata)
{ {
} }

View File

@ -120,11 +120,11 @@ void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
//ck_assert_msg(0, "No answer!"); //ck_assert_msg(0, "No answer!");
} }
static void callback_audio(ToxAv *av, int32_t call_index, int16_t *data, int length, void* userdata) static void callback_audio(ToxAv *av, int32_t call_index, int16_t *data, int length, void *userdata)
{ {
} }
static void callback_video(ToxAv *av, int32_t call_index, vpx_image_t *img, void* userdata) static void callback_video(ToxAv *av, int32_t call_index, vpx_image_t *img, void *userdata)
{ {
} }

View File

@ -97,16 +97,16 @@ typedef struct {
} DECODE_PACKET; } DECODE_PACKET;
#define VIDEO_DECODE_QUEUE_SIZE 2 #define VIDEO_DECODE_QUEUE_SIZE 2
#define AUDIO_DECODE_QUEUE_SIZE 8 #define AUDIO_DECODE_QUEUE_SIZE 16
struct _ToxAv { struct _ToxAv {
Messenger *messenger; Messenger *messenger;
MSISession *msi_session; /** Main msi session */ MSISession *msi_session; /** Main msi session */
CallSpecific *calls; /** Per-call params */ CallSpecific *calls; /** Per-call params */
void (*audio_callback)(ToxAv *, int32_t, int16_t *, int, void*); void (*audio_callback)(ToxAv *, int32_t, int16_t *, int, void *);
void (*video_callback)(ToxAv *, int32_t, vpx_image_t *, void*); void (*video_callback)(ToxAv *, int32_t, vpx_image_t *, void *);
void *audio_callback_userdata; void *audio_callback_userdata;
void *video_callback_userdata; void *video_callback_userdata;
@ -272,7 +272,8 @@ void toxav_register_callstate_callback ( ToxAv *av, ToxAVCallback callback, ToxA
* @param callback The callback * @param callback The callback
* @return void * @return void
*/ */
void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, int16_t *, int, void*), void* user_data) void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, int16_t *, int, void *),
void *user_data)
{ {
av->audio_callback = callback; av->audio_callback = callback;
av->audio_callback_userdata = user_data; av->audio_callback_userdata = user_data;
@ -284,7 +285,8 @@ void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, in
* @param callback The callback * @param callback The callback
* @return void * @return void
*/ */
void toxav_register_video_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, vpx_image_t *, void*), void* user_data) void toxav_register_video_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, vpx_image_t *, void *),
void *user_data)
{ {
av->video_callback = callback; av->video_callback = callback;
av->video_callback_userdata = user_data; av->video_callback_userdata = user_data;
@ -1081,7 +1083,7 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg)
av->audio_decode_write = (w + 1) % AUDIO_DECODE_QUEUE_SIZE; av->audio_decode_write = (w + 1) % AUDIO_DECODE_QUEUE_SIZE;
pthread_cond_signal(&av->decode_cond); pthread_cond_signal(&av->decode_cond);
} else { } else {
printf("dropped audio frame\n"); LOGGER_DEBUG("Dropped audio frame\n");
free(p); free(p);
} }
@ -1121,7 +1123,7 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg)
av->video_decode_write = (w + 1) % VIDEO_DECODE_QUEUE_SIZE; av->video_decode_write = (w + 1) % VIDEO_DECODE_QUEUE_SIZE;
pthread_cond_signal(&av->decode_cond); pthread_cond_signal(&av->decode_cond);
} else { } else {
printf("dropped video frame\n"); LOGGER_DEBUG("Dropped video frame\n");
free(p); free(p);
} }

View File

@ -173,7 +173,8 @@ void toxav_register_callstate_callback (ToxAv *av, ToxAVCallback callback, ToxAv
* @param callback The callback * @param callback The callback
* @return void * @return void
*/ */
void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, int16_t *, int, void*), void* user_data); void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, int16_t *, int, void *),
void *user_data);
/** /**
* @brief Register callback for recieving video data * @brief Register callback for recieving video data
@ -182,7 +183,8 @@ void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, in
* @param callback The callback * @param callback The callback
* @return void * @return void
*/ */
void toxav_register_video_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, vpx_image_t *, void*), void* user_data); void toxav_register_video_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, vpx_image_t *, void *),
void *user_data);
/** /**
* @brief Call user. Use its friend_id. * @brief Call user. Use its friend_id.

View File

@ -46,7 +46,6 @@ static void fetch_broadcast_info(uint16_t port)
unsigned long ulOutBufLen = sizeof(pAdapterInfo); unsigned long ulOutBufLen = sizeof(pAdapterInfo);
if (pAdapterInfo == NULL) { if (pAdapterInfo == NULL) {
printf("Error allocating memory for pAdapterInfo\n");
return; return;
} }
@ -55,7 +54,6 @@ static void fetch_broadcast_info(uint16_t port)
pAdapterInfo = malloc(ulOutBufLen); pAdapterInfo = malloc(ulOutBufLen);
if (pAdapterInfo == NULL) { if (pAdapterInfo == NULL) {
printf("Error allocating memory needed to call GetAdaptersinfo\n");
return; return;
} }
} }
@ -78,7 +76,6 @@ static void fetch_broadcast_info(uint16_t port)
ip_port->ip.ip4.uint32 = htonl(broadcast_ip); ip_port->ip.ip4.uint32 = htonl(broadcast_ip);
ip_port->port = port; ip_port->port = port;
broadcast_count++; broadcast_count++;
printf("broadcast ip: %s\n", ip_ntoa(&ip_port->ip));
if (broadcast_count >= MAX_INTERFACES) { if (broadcast_count >= MAX_INTERFACES) {
return; return;
@ -88,10 +85,7 @@ static void fetch_broadcast_info(uint16_t port)
pAdapter = pAdapter->Next; pAdapter = pAdapter->Next;
} }
} else {
printf("Fetching adapter info failed %i\n", ret);
} }
} }
#elif defined(__linux__) #elif defined(__linux__)

View File

@ -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); sock_t sock = socket(ip_port.ip.family, SOCK_STREAM, IPPROTO_TCP);
if (!sock_valid(sock)) { if (!sock_valid(sock)) {
printf("fail1 %u\n", sock);
return NULL; return NULL;
} }