From c527979daa5b65ec9a838c1b3fe998af6375953a Mon Sep 17 00:00:00 2001 From: notsecure Date: Mon, 7 Jul 2014 17:37:05 -0400 Subject: make autotests compile --- auto_tests/toxav_many_test.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'auto_tests/toxav_many_test.c') diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index 2a931cb0..106d2f32 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c @@ -124,6 +124,14 @@ void callback_requ_timeout ( 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) +{ +} + +static void callback_video(ToxAv *av, int32_t call_index, vpx_image_t *img) +{ +} /*************************************************************************************************/ @@ -142,6 +150,11 @@ void *in_thread_call (void *arg) uint8_t prepared_payload[RTP_PAYLOAD_SIZE]; + toxav_register_audio_recv_callback(this_call->Caller.av, callback_audio); + toxav_register_video_recv_callback(this_call->Caller.av, callback_video); + toxav_register_audio_recv_callback(this_call->Callee.av, callback_audio); + toxav_register_video_recv_callback(this_call->Callee.av, callback_video); + /* NOTE: CALLEE WILL ALWAHYS NEED CALL_IDX == 0 */ while (running) { @@ -192,18 +205,18 @@ void *in_thread_call (void *arg) int recved; /* Payload from CALLER */ - recved = toxav_recv_audio(this_call->Callee.av, 0, frame_size, storage); + /*recved = toxav_recv_audio(this_call->Callee.av, 0, frame_size, storage); if ( recved ) { - /*ck_assert_msg(recved == 10 && memcmp(storage, sample_payload, 10) == 0, "Payload from CALLER is invalid");*/ - } + //ck_assert_msg(recved == 10 && memcmp(storage, sample_payload, 10) == 0, "Payload from CALLER is invalid"); + }*/ /* Payload from CALLEE */ - recved = toxav_recv_audio(this_call->Caller.av, call_idx, frame_size, storage); + /*recved = toxav_recv_audio(this_call->Caller.av, call_idx, frame_size, storage); if ( recved ) { - /*ck_assert_msg(recved == 10 && memcmp(storage, sample_payload, 10) == 0, "Payload from CALLEE is invalid");*/ - } + //ck_assert_msg(recved == 10 && memcmp(storage, sample_payload, 10) == 0, "Payload from CALLEE is invalid"); + }*/ c_sleep(20); } @@ -335,7 +348,6 @@ START_TEST(test_AV_three_calls) toxav_register_callstate_callback(callback_requ_timeout, av_OnRequestTimeout, &status_control); - for ( i = 0; i < 3; i++ ) pthread_create(&status_control.calls[i].tid, NULL, in_thread_call, &status_control.calls[i]); @@ -403,4 +415,4 @@ int main(int argc, char *argv[]) // test_AV_three_calls(); // // return 0; -} \ No newline at end of file +} -- cgit v1.2.3