diff options
author | mannol <eniz_vukovic@hotmail.com> | 2015-04-30 00:40:30 +0200 |
---|---|---|
committer | mannol <eniz_vukovic@hotmail.com> | 2015-04-30 00:40:30 +0200 |
commit | b2b11f0fba52bcba5acb3ba9e4aa4da119d76093 (patch) | |
tree | 9a990d3c14b668fd10044233b1260a10ac726c57 /toxav/toxav.c | |
parent | d8c34f4ffafedc256e9a52af5e591c4998c0003d (diff) |
Added many test and fixed various warnings
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r-- | toxav/toxav.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 25a2857c..e7807592 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -224,7 +224,7 @@ void toxav_iterate(ToxAV* av) | |||
224 | } | 224 | } |
225 | 225 | ||
226 | uint64_t start = current_time_monotonic(); | 226 | uint64_t start = current_time_monotonic(); |
227 | uint32_t rc = 500; | 227 | int32_t rc = 500; |
228 | 228 | ||
229 | ToxAVCall* i = av->calls[av->calls_head]; | 229 | ToxAVCall* i = av->calls[av->calls_head]; |
230 | for (; i; i = i->next) { | 230 | for (; i; i = i->next) { |
@@ -292,7 +292,7 @@ void toxav_iterate(ToxAV* av) | |||
292 | 292 | ||
293 | if (i->msi_call->self_capabilities & msi_CapRVideo && | 293 | if (i->msi_call->self_capabilities & msi_CapRVideo && |
294 | i->msi_call->peer_capabilities & msi_CapSVideo) | 294 | i->msi_call->peer_capabilities & msi_CapSVideo) |
295 | rc = MIN(i->video.second->lcfd, rc); | 295 | rc = MIN(i->video.second->lcfd, (uint32_t) rc); |
296 | 296 | ||
297 | uint32_t fid = i->friend_number; | 297 | uint32_t fid = i->friend_number; |
298 | 298 | ||
@@ -821,7 +821,7 @@ bool toxav_send_video_frame(ToxAV* av, uint32_t friend_number, uint16_t width, u | |||
821 | } | 821 | } |
822 | } | 822 | } |
823 | 823 | ||
824 | if (call->vba.end_time == ~0) | 824 | if (call->vba.end_time == (uint64_t) ~0) |
825 | call->vba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; | 825 | call->vba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; |
826 | } | 826 | } |
827 | 827 | ||
@@ -921,7 +921,7 @@ bool toxav_send_audio_frame(ToxAV* av, uint32_t friend_number, const int16_t* pc | |||
921 | rc = TOXAV_ERR_SEND_FRAME_RTP_FAILED; | 921 | rc = TOXAV_ERR_SEND_FRAME_RTP_FAILED; |
922 | } | 922 | } |
923 | 923 | ||
924 | if (call->aba.end_time == ~0) | 924 | if (call->aba.end_time == (uint64_t) ~0) |
925 | call->aba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; | 925 | call->aba.end_time = current_time_monotonic() + BITRATE_CHANGE_TESTING_TIME_MS; |
926 | } | 926 | } |
927 | } | 927 | } |
@@ -1056,6 +1056,7 @@ bool audio_bit_rate_invalid(uint32_t bit_rate) | |||
1056 | 1056 | ||
1057 | bool video_bit_rate_invalid(uint32_t bit_rate) | 1057 | bool video_bit_rate_invalid(uint32_t bit_rate) |
1058 | { | 1058 | { |
1059 | (void) bit_rate; | ||
1059 | /* TODO: If anyone knows the answer to this one please fill it up */ | 1060 | /* TODO: If anyone knows the answer to this one please fill it up */ |
1060 | return false; | 1061 | return false; |
1061 | } | 1062 | } |
@@ -1123,7 +1124,7 @@ ToxAVCall* call_new(ToxAV* av, uint32_t friend_number, TOXAV_ERR_CALL* error) | |||
1123 | av->calls = tmp; | 1124 | av->calls = tmp; |
1124 | 1125 | ||
1125 | /* Set fields in between to null */ | 1126 | /* Set fields in between to null */ |
1126 | int32_t i = av->calls_tail + 1; | 1127 | uint32_t i = av->calls_tail + 1; |
1127 | for (; i < friend_number; i ++) | 1128 | for (; i < friend_number; i ++) |
1128 | av->calls[i] = NULL; | 1129 | av->calls[i] = NULL; |
1129 | 1130 | ||