summaryrefslogtreecommitdiff
path: root/auto_tests/toxav_many_test.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2015-06-13 15:00:34 +0200
committermannol <eniz_vukovic@hotmail.com>2015-06-13 15:00:34 +0200
commita3132feddb25656e33c7ce8c9bc6abc78657a01e (patch)
treeba91fdc208b4cc7ff7a9bca12a10bb165ea48ddf /auto_tests/toxav_many_test.c
parent979d7730aa85502881788223a1fb4e30badaa159 (diff)
Fixed sample size in callback and other stuff
Diffstat (limited to 'auto_tests/toxav_many_test.c')
-rw-r--r--auto_tests/toxav_many_test.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c
index 761a4525..438f2789 100644
--- a/auto_tests/toxav_many_test.c
+++ b/auto_tests/toxav_many_test.c
@@ -61,8 +61,8 @@ void t_toxav_call_state_cb(ToxAV *av, uint32_t friend_number, uint32_t state, vo
61} 61}
62void t_toxav_receive_video_frame_cb(ToxAV *av, uint32_t friend_number, 62void t_toxav_receive_video_frame_cb(ToxAV *av, uint32_t friend_number,
63 uint16_t width, uint16_t height, 63 uint16_t width, uint16_t height,
64 uint8_t const *y, uint8_t const *u, uint8_t const *v, uint8_t const *a, 64 uint8_t const *y, uint8_t const *u, uint8_t const *v,
65 int32_t ystride, int32_t ustride, int32_t vstride, int32_t stride, 65 int32_t ystride, int32_t ustride, int32_t vstride,
66 void *user_data) 66 void *user_data)
67{ 67{
68 (void) av; 68 (void) av;
@@ -159,13 +159,11 @@ void* call_thread(void* pd)
159 uint8_t video_y[800*600]; 159 uint8_t video_y[800*600];
160 uint8_t video_u[800*600 / 2]; 160 uint8_t video_u[800*600 / 2];
161 uint8_t video_v[800*600 / 2]; 161 uint8_t video_v[800*600 / 2];
162 uint8_t video_a[800*600];
163 162
164 memset(PCM, 0, sizeof(PCM)); 163 memset(PCM, 0, sizeof(PCM));
165 memset(video_y, 0, sizeof(video_y)); 164 memset(video_y, 0, sizeof(video_y));
166 memset(video_u, 0, sizeof(video_u)); 165 memset(video_u, 0, sizeof(video_u));
167 memset(video_v, 0, sizeof(video_v)); 166 memset(video_v, 0, sizeof(video_v));
168 memset(video_a, 0, sizeof(video_a));
169 167
170 time_t start_time = time(NULL); 168 time_t start_time = time(NULL);
171 while(time(NULL) - start_time < 4) { 169 while(time(NULL) - start_time < 4) {
@@ -175,8 +173,8 @@ void* call_thread(void* pd)
175 toxav_audio_send_frame(AliceAV, friend_number, PCM, 960, 1, 48000, NULL); 173 toxav_audio_send_frame(AliceAV, friend_number, PCM, 960, 1, 48000, NULL);
176 toxav_audio_send_frame(BobAV, 0, PCM, 960, 1, 48000, NULL); 174 toxav_audio_send_frame(BobAV, 0, PCM, 960, 1, 48000, NULL);
177 175
178 toxav_video_send_frame(AliceAV, friend_number, 800, 600, video_y, video_u, video_v, video_a, NULL); 176 toxav_video_send_frame(AliceAV, friend_number, 800, 600, video_y, video_u, video_v, NULL);
179 toxav_video_send_frame(BobAV, 0, 800, 600, video_y, video_u, video_v, video_a, NULL); 177 toxav_video_send_frame(BobAV, 0, 800, 600, video_y, video_u, video_v, NULL);
180 178
181 c_sleep(10); 179 c_sleep(10);
182 } 180 }