summaryrefslogtreecommitdiff
path: root/auto_tests/toxav_many_test.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2015-05-22 23:22:31 +0200
committermannol <eniz_vukovic@hotmail.com>2015-05-22 23:22:31 +0200
commit3100042a2b78f4f80d23f67e6113797cd8fb5df0 (patch)
treec226f4b25002784d93f9bb6415be4b55b76cddd1 /auto_tests/toxav_many_test.c
parent62c40af1a0c557ba8c77583c972ae3af9af15cf1 (diff)
parent2ba076ac5cc6efb5eb41fb4aa6a77a151885f26c (diff)
Updated with master
Diffstat (limited to 'auto_tests/toxav_many_test.c')
-rw-r--r--auto_tests/toxav_many_test.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c
index f913c9d3..a15acce3 100644
--- a/auto_tests/toxav_many_test.c
+++ b/auto_tests/toxav_many_test.c
@@ -63,8 +63,8 @@ void t_toxav_call_state_cb(ToxAV *av, uint32_t friend_number, uint32_t state, vo
63} 63}
64void t_toxav_receive_video_frame_cb(ToxAV *av, uint32_t friend_number, 64void t_toxav_receive_video_frame_cb(ToxAV *av, uint32_t friend_number,
65 uint16_t width, uint16_t height, 65 uint16_t width, uint16_t height,
66 uint8_t const *y, uint8_t const *u, uint8_t const *v, 66 uint8_t const *y, uint8_t const *u, uint8_t const *v, uint8_t const *a,
67 int32_t ystride, int32_t ustride, int32_t vstride, 67 int32_t ystride, int32_t ustride, int32_t vstride, int32_t stride,
68 void *user_data) 68 void *user_data)
69{ 69{
70 (void) av; 70 (void) av;
@@ -115,8 +115,8 @@ ToxAV* setup_av_instance(Tox* tox, CallControl *CC)
115 115
116 toxav_callback_call(av, t_toxav_call_cb, CC); 116 toxav_callback_call(av, t_toxav_call_cb, CC);
117 toxav_callback_call_state(av, t_toxav_call_state_cb, CC); 117 toxav_callback_call_state(av, t_toxav_call_state_cb, CC);
118 toxav_callback_receive_video_frame(av, t_toxav_receive_video_frame_cb, CC); 118 toxav_callback_video_receive_frame(av, t_toxav_receive_video_frame_cb, CC);
119 toxav_callback_receive_audio_frame(av, t_toxav_receive_audio_frame_cb, CC); 119 toxav_callback_audio_receive_frame(av, t_toxav_receive_audio_frame_cb, CC);
120 120
121 return av; 121 return av;
122} 122}
@@ -161,22 +161,24 @@ void* call_thread(void* pd)
161 uint8_t video_y[800*600]; 161 uint8_t video_y[800*600];
162 uint8_t video_u[800*600 / 2]; 162 uint8_t video_u[800*600 / 2];
163 uint8_t video_v[800*600 / 2]; 163 uint8_t video_v[800*600 / 2];
164 uint8_t video_a[800*600];
164 165
165 memset(PCM, 0, sizeof(PCM)); 166 memset(PCM, 0, sizeof(PCM));
166 memset(video_y, 0, sizeof(video_y)); 167 memset(video_y, 0, sizeof(video_y));
167 memset(video_u, 0, sizeof(video_u)); 168 memset(video_u, 0, sizeof(video_u));
168 memset(video_v, 0, sizeof(video_v)); 169 memset(video_v, 0, sizeof(video_v));
170 memset(video_a, 0, sizeof(video_a));
169 171
170 time_t start_time = time(NULL); 172 time_t start_time = time(NULL);
171 while(time(NULL) - start_time < 4) { 173 while(time(NULL) - start_time < 4) {
172 toxav_iterate(AliceAV); 174 toxav_iterate(AliceAV);
173 toxav_iterate(BobAV); 175 toxav_iterate(BobAV);
174 176
175 toxav_send_audio_frame(AliceAV, friend_number, PCM, 960, 1, 48000, NULL); 177 toxav_audio_send_frame(AliceAV, friend_number, PCM, 960, 1, 48000, NULL);
176 toxav_send_audio_frame(BobAV, 0, PCM, 960, 1, 48000, NULL); 178 toxav_audio_send_frame(BobAV, 0, PCM, 960, 1, 48000, NULL);
177 179
178 toxav_send_video_frame(AliceAV, friend_number, 800, 600, video_y, video_u, video_v, NULL); 180 toxav_video_send_frame(AliceAV, friend_number, 800, 600, video_y, video_u, video_v, video_a, NULL);
179 toxav_send_video_frame(BobAV, 0, 800, 600, video_y, video_u, video_v, NULL); 181 toxav_video_send_frame(BobAV, 0, 800, 600, video_y, video_u, video_v, video_a, NULL);
180 182
181 c_sleep(10); 183 c_sleep(10);
182 } 184 }