diff options
author | xhe <xw897002528@gmail.com> | 2018-01-14 21:46:06 +0800 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-01-25 14:29:01 +0000 |
commit | 0becafd272997ab1fcbe93ce3d56b27aae6cd80a (patch) | |
tree | e09f947a654b05e173229f6dd9c8be8124464536 /docs/TCP_Network.txt | |
parent | cd8080f6d180677d03edff4878305c655c29bd69 (diff) |
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.
Diffstat (limited to 'docs/TCP_Network.txt')
0 files changed, 0 insertions, 0 deletions