mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Update with upstream
This commit is contained in:
commit
d08d032368
|
@ -163,11 +163,11 @@ void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
|
|||
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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -120,11 +120,11 @@ void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
|
|||
//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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -97,15 +97,15 @@ 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;
|
||||
MSISession *msi_session; /** Main msi session */
|
||||
CallSpecific *calls; /** Per-call params */
|
||||
|
||||
void (*audio_callback)(ToxAv *, int32_t, int16_t *, int, void*);
|
||||
void (*video_callback)(ToxAv *, int32_t, vpx_image_t *, void*);
|
||||
void (*audio_callback)(ToxAv *, int32_t, int16_t *, int, void *);
|
||||
void (*video_callback)(ToxAv *, int32_t, vpx_image_t *, void *);
|
||||
|
||||
void *audio_callback_userdata;
|
||||
void *video_callback_userdata;
|
||||
|
@ -272,7 +272,8 @@ void toxav_register_callstate_callback ( ToxAv *av, ToxAVCallback callback, ToxA
|
|||
* @param callback The callback
|
||||
* @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_userdata = user_data;
|
||||
|
@ -284,7 +285,8 @@ void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, in
|
|||
* @param callback The callback
|
||||
* @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_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;
|
||||
pthread_cond_signal(&av->decode_cond);
|
||||
} else {
|
||||
printf("dropped audio frame\n");
|
||||
LOGGER_DEBUG("Dropped audio frame\n");
|
||||
free(p);
|
||||
}
|
||||
|
||||
|
@ -1121,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,8 @@ void toxav_register_callstate_callback (ToxAv *av, ToxAVCallback callback, ToxAv
|
|||
* @param callback The callback
|
||||
* @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
|
||||
|
@ -182,7 +183,8 @@ void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, in
|
|||
* @param callback The callback
|
||||
* @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.
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user