summaryrefslogtreecommitdiff
path: root/toxav
AgeCommit message (Collapse)Author
2020-04-16Remove tokstyle exemptions from build files.iphydf
We put some tokstyle exemptions into the source files themselves, instead. This way we can check some of the code in those files, and more in the future when tokstyle supports more constructs (like apidsl). Also: hacked ping_array.api.h to not emit `_array` as parameter names. We'll need to fix apidsl to do this better. This works for now.
2020-04-09Use public API for sending in RTP.zoff99
2020-04-08Use public API for sending in BWC.zoff99
2020-04-07Remove newlines from the end of LOGGER format strings.iphydf
See https://github.com/TokTok/hs-tokstyle/pull/49 for the corresponding tokstyle analysis.
2020-04-07Change ToxAVCall struct mutex to a more distinct name.zoff99
2020-04-07Create own instance of MonoTime for ToxAV.zoff99
2020-04-05Stop using Messenger's mono_time in bandwidth controller.zoff99
We're actually still using it, but we got a private pointer now, preparing us for having a private mono_time in toxav.
2020-04-05Fix 2 memory leaks in ToxAV.zoff99
2020-03-18Make function defns match their decls regarding storage class.iphydf
We want functions declared as `static` to also be defined as `static`.
2020-03-18Mark file-local function definitions as `static`.iphydf
https://github.com/TokTok/hs-tokstyle/pull/43 implements a validation for this. We should avoid locally declaring functions from another translation unit, and instead use header files to export/import them.
2020-03-15clean groups codezugz (tox)
* make static functions return bool rather than int to indicate success * add peer_in_list() to factor out uniformity over peer and frozen lists * reduce repetition in send_lossy_all_close * rename 'close' to 'connections' * use uint32_t for peernumber (in accord with tox.c) * explain persistence in tox_conference_get_chatlist documentation * clarify "connectedness" in group API documentation * clarify that tox_conference_peer_count counts only online peers * refactor variously
2020-03-14Avoid casting back and forth between void-ptr.iphydf
In windows network code, we implement inet_pton and inet_ntop, which take void pointers. We can do slightly better because we already know the type when we call these functions, so we can avoid casting between void pointer and the addr struct types.
2020-03-14Standardise on having a comma at the end of enums.iphydf
Most of our enums already have one. Some didn't. Tokstyle is going to require commas at the end of enumerator lists in enum definitions.
2020-03-14Fix up comments a bit to start being more uniform.iphydf
Tokstyle (check-cimple) will start enforcing comment formats at some point. It will not support arbitrary stuff in comments, and will parse them. The result can then be semantically analysed.
2020-03-14Use spdx license identifier instead of GPL blurb.iphydf
2020-03-12Use rules_cc instead of native cc_library rules.iphydf
2020-03-06Use `net_pack` instead of casting bytes to ints.iphydf
The current code violates the C standard and causes crashes on strict alignment architectures.
2020-03-02Add "cimple_test" to the bazel build.iphydf
2020-03-02Upgrade bazel to 2.1.1.iphydf
Removed av_test, because it depends on an ancient opencv that starts to really not exist on modern systems anymore.
2020-01-02fix ToxAV threading documentationsudden6
ToxAV is not thread-safe at the moment, remove that claim from the header file.
2019-11-21fix log message creating data racesudden6
2019-11-21fix missing mutexsudden6
2019-11-21fix ToxAV mutex released to earlysudden6
2019-02-10put toxav.h stuff in toxav.api.hzugz (tox)
2019-02-10explain enabling in API commentzugz (tox)
2019-02-10add API function to test whether av is enabledzugz (tox)
2019-02-10Expose api functions for enabling and disabling AV in AV groupszugz (tox)
A group loaded from a savefile starts with AV disabled.
2019-01-05Expose offline conference peers in APIzugz (tox)
2018-10-08Improve Windows compatibility of toxav code.iphydf
- unistd.h doesn't exist on MSVC. - `vpx_codec_iface_t` is already `const`, so adding `const` qualifiers is redundant and causes warnings on MSVC.
2018-09-24Revert "Improve cmake build for MSVC."iphydf
This reverts commit f87f8719d02a9adbc9413256fe22958267cfefee.
2018-09-24Add Cirrus CI configuration.iphydf
This CI can run Bazel tests, because it supports IPv6. This is nice, because now we can run IPv6 tests on every PR.
2018-09-22Improve cmake build for MSVC.Mick Sayson
2018-09-21Fix using uninitialized mutex on call end.Mick Sayson
2018-09-19Fix typosyangfl
2018-09-14Standardise header guards.iphydf
Using the full path including the repo name.
2018-09-14Use C++ style casts in C++ code.iphydf
2018-09-08Always use the passed logger (from Messenger) in msi_kill.iphydf
2018-09-03Avoid use of global mutable state in mono_time on win32.iphydf
This uses a trick to get read-write access to `this` from a `const` member function, similar to C++ `mutable`, but uglier.
2018-08-26Update copyright to 2018.iphydf
2018-08-25Change while-loop to for-loop to express for-each-frame.iphydf
* Assignments can't be used as expressions, therefore `while` loops should not be used as a `for-each` construct. Use `for`, instead.
2018-08-19Avoid redefining macros from different files.iphydf
2018-08-19make Mono_Time an argument to current_time_monotoniczugz (tox)
2018-08-16Use per-instance `Mono_Time` for Messenger and onion.iphydf
2018-08-16Limit the size of a save file in file_saving_test.iphydf
Limited to 4GiB. That ought to be enough for any save file.
2018-08-14Fix style in toxav.c.iphydf
* Use Camel_Snake_Case for type names. * Use at least 4 characters for constant names. I.e. `END` is a type name, but `RETURN` is a constant name. This is because `DHT` is a type name (yay consistency). * Using `min_*` functions instead of MIN, we can avoid a cast. * Use `for`-loops for for-each-frame semantics instead of `while`. * Don't use assignments as expressions. * `++i` instead of `i++`. * Function pointers are dereferenced automatically, so no need to manually do so. * Avoid void pointers that lie about not being spaghetti code. Toxcore and toxav are both spaghetti and shouldn't pretend anything else. * Don't use empty statements (e.g. no `;;` anywhere in the code).
2018-08-13Fix ToxAv's use of `struct Tox`.iphydf
* Fix `toxav_get_tox` to return tox, not messenger. * Fix the casts from Tox* to Messenger* in toxav_old.c. * Pass Tox instead of Messenger to public group AV callbacks.
2018-08-13Fix style in video.c.iphydf
* Constant-style macros can't be function call expressions. These must be function calls themselves. * Assignments can't be used as expressions. * Therefore: `while` loops should not be used as a `for-each` construct. Use `for`, instead.
2018-08-13Fix memory leak in error path in group A/V.iphydf
This probably doesn't happen, but it can in theory, so we avoid it.
2018-08-13Fix groupav.c style and avoid casts in toxav_old.c.iphydf
* No anonymous structs. * No assignment expressions. * Only one declarator per struct member declaration. * Named callback types only, no inline types. * No `;` empty statements. * `++i` instead of `i++`. Avoiding a cast in toxav_old.c avoids some potential (and real) bugs.
2018-08-12Fix coding style in rtp module.iphydf
* Named callback types only. * No anonymous enums or structs. * `++i` instead of `i++`. * Don't use enums to specify integer constants. Enums should be enumerations. All values of an enum type should be listed[1]. [1] I don't know what to do about bit masks yet, but given that enums by C standard can only go up to 32767 portably and 2^31 in reality, they are probably not useful for 64 bit bit masks.