toxcore/toxav
xhe 0becafd272
Split bit_rate_set(), one for audio, one for video.
Fixes #572.

As discussed in the issue, there's a risk that toxcore may not hold the
maximum bitrates libvpx supports, if toxcore insists on using integer
type. I initially proposed to have another flag in set(), so that we can
use unsigned type instead. iphydf came up with a better solution, that is
splitting the original functions, one for audio, one for video. Now, we
could safely replace int32_t with uint32_t.

Also: clean video_bit_rate_invalid()

Though this is not a part of issue #572, as it's used in the
toxav_bit_rate_set(), i cleaned the code. As mannol said, there should be
a check. Uint32_t is large enough to hold the maximum bitrates libvpx
supports, but user may pass a value larger than uint while smaller than
uint32_t. Thanks to the reminding from nurupo, it's no longer a stub
function.

Bitrate error enums are shared for both audio and video
https://github.com/TokTok/c-toxcore/pull/578#issuecomment-360095609, just
as iphydf said.
2018-01-25 14:29:01 +00:00
..
audio.c Add some explanatory comments to the toxav audio code. 2018-01-19 22:27:04 +00:00
audio.h Extract named constants from magic numbers in toxav/audio.c. 2018-01-19 20:20:36 +00:00
BUILD Publish a single public BUILD target for c-toxcore. 2018-01-22 21:18:24 +00:00
bwcontroller.c Use more descriptive names in bwcontroller. 2018-01-19 21:03:48 +00:00
bwcontroller.h Update license headers and remove redundant file name comment. 2017-01-19 00:01:44 +00:00
groupav.c Add part of platform-independent network API implementation 2017-02-26 23:16:16 +03:00
groupav.h Update license headers and remove redundant file name comment. 2017-01-19 00:01:44 +00:00
Makefile.inc Setup autotools to read .so version info from a separate file 2017-01-18 11:20:07 +01:00
msi.c Fix typo 2017-11-19 23:52:23 +01:00
msi.h Update license headers and remove redundant file name comment. 2017-01-19 00:01:44 +00:00
ring_buffer.c Add comment from #629 in ring_buffer.c. 2018-01-21 17:42:19 +00:00
ring_buffer.h Update license headers and remove redundant file name comment. 2017-01-19 00:01:44 +00:00
rtp.c Rename some rtp header struct members to be clearer. 2018-01-25 09:42:01 +00:00
rtp.h Rename some rtp header struct members to be clearer. 2018-01-25 09:42:01 +00:00
toxav_old.c Add a monolith_test that includes all toxcore sources. 2017-06-04 17:48:23 +00:00
toxav.api.h Split bit_rate_set(), one for audio, one for video. 2018-01-25 14:29:01 +00:00
toxav.c Split bit_rate_set(), one for audio, one for video. 2018-01-25 14:29:01 +00:00
toxav.h Split bit_rate_set(), one for audio, one for video. 2018-01-25 14:29:01 +00:00
video.c Update license headers and remove redundant file name comment. 2017-01-19 00:01:44 +00:00
video.h Update license headers and remove redundant file name comment. 2017-01-19 00:01:44 +00:00