diff options
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r-- | toxav/toxav.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 68402020..ee7f49a6 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -176,14 +176,14 @@ uint32_t toxav_do_interval(ToxAv *av) | |||
176 | void toxav_do(ToxAv *av) | 176 | void toxav_do(ToxAv *av) |
177 | { | 177 | { |
178 | msi_do(av->msi_session); | 178 | msi_do(av->msi_session); |
179 | 179 | ||
180 | uint64_t start = current_time_monotonic(); | 180 | uint64_t start = current_time_monotonic(); |
181 | 181 | ||
182 | uint32_t i = 0; | 182 | uint32_t i = 0; |
183 | 183 | ||
184 | for (; i < av->max_calls; i ++) { | 184 | for (; i < av->max_calls; i ++) { |
185 | pthread_mutex_lock(av->calls[i].mutex_control); | 185 | pthread_mutex_lock(av->calls[i].mutex_control); |
186 | 186 | ||
187 | if (av->calls[i].active) { | 187 | if (av->calls[i].active) { |
188 | pthread_mutex_lock(av->calls[i].mutex_do); | 188 | pthread_mutex_lock(av->calls[i].mutex_do); |
189 | pthread_mutex_unlock(av->calls[i].mutex_control); | 189 | pthread_mutex_unlock(av->calls[i].mutex_control); |
@@ -193,12 +193,12 @@ void toxav_do(ToxAv *av) | |||
193 | pthread_mutex_unlock(av->calls[i].mutex_control); | 193 | pthread_mutex_unlock(av->calls[i].mutex_control); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | uint64_t end = current_time_monotonic(); | 197 | uint64_t end = current_time_monotonic(); |
198 | 198 | ||
199 | /* TODO maybe use variable for sizes */ | 199 | /* TODO maybe use variable for sizes */ |
200 | av->dectmsstotal += end - start; | 200 | av->dectmsstotal += end - start; |
201 | 201 | ||
202 | if (++av->dectmsscount == 3) { | 202 | if (++av->dectmsscount == 3) { |
203 | av->avgdectms = av->dectmsstotal / 3 + 2 /* NOTE Magic Offset */; | 203 | av->avgdectms = av->dectmsstotal / 3 + 2 /* NOTE Magic Offset */; |
204 | av->dectmsscount = 0; | 204 | av->dectmsscount = 0; |
@@ -432,7 +432,7 @@ static int toxav_send_rtp_payload(ToxAv *av, | |||
432 | int i; | 432 | int i; |
433 | 433 | ||
434 | for (i = 0; i < parts; i++) { | 434 | for (i = 0; i < parts; i++) { |
435 | iter = cs_get_split_video_frame(call->cs, &part_size); | 435 | iter = cs_iterate_split_video_frame(call->cs, &part_size); |
436 | 436 | ||
437 | if (rtp_send_msg(call->crtps[video_index], av->messenger, iter, part_size) < 0) | 437 | if (rtp_send_msg(call->crtps[video_index], av->messenger, iter, part_size) < 0) |
438 | return av_ErrorSendingPayload; | 438 | return av_ErrorSendingPayload; |