summaryrefslogtreecommitdiff
path: root/toxav
AgeCommit message (Collapse)Author
2016-12-03rename messenger function, prepend m_Gregory Mullen (grayhatter)
2016-11-20Fix a memory leak in GroupAVMaxim Biro
2016-11-20Fix NULL pointer dereference in log callsMaxim Biro
2016-11-20Add NONE enumerator to bit mask.iphydf
2016-10-29Rename some internal "group chat" things to "conference".iphydf
This is to allow new group chats to coexist with old group chats. We do not rename everything in group.[ch] to conference, yet, because it's not currently necessary, and a general internal API overhaul is due at some point anyway.
2016-10-28toxav renaming: group.{h,c} -> groupav.{h,c}Dmytro Vorobiov
toxav file for "group" conflicts with toxcore "group" file. While this works fine in almost all cases, Xcode on macOS is confused with that.
2016-10-02Rebuild apidsl'd headers in cmake.iphydf
- Moved apidsl headers next to their generated versions. In the future, perhaps all (or most) headers will be apidsl-generated, so the sources should stay together. - Try to find apidsl/apigen binary and astyle binary and use it for the format test. Don't run the format test if these can't be found.
2016-10-01Minor documentation fixes.iphydf
- Fixed incorrect parameter names (documented name didn't match code name). - Removed `@return` from functions that return `void`. - Make sure every parameter is documented. This required moving the planes and strides documentation to the function docs.
2016-09-30Remove return after no-return situation (and other cleanups).iphydf
Cleanups: - Fix header guards to not use reserved names. - Avoid name shadowing. - Removed an unused variable found by avoiding name shadowing.
2016-09-28v0.0.0 => v0.0.1Gregory Mullen (grayhatter)
2016-09-25Work around bug in opencv3 headers.iphydf
OpenCV 3.1 doesn't define cvRound in C, only in C++. Thus, we now need to compile av_test as C++ code.
2016-09-24Move ring buffer out of toxcore/util into toxav.iphydf
Toxcore itself doesn't use this data structure. Only toxav does, so now toxav owns the code for it.
2016-09-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-09-24Minor cleanups: unused vars, unreachable code, static globals.iphydf
- All global variables should be static unless they have an explicit extern declaration in a header file. - `to_compare` was not used in encryptsave and toxav tests. - `break` in switch cases is not required directly after `return`, `goto`, or a noreturn function like `abort`.
2016-09-23Replace `void*` with `RingBuffer*` to avoid conversions.iphydf
`vbuf_raw` is always a `RingBuffer*` so there is no need to pretend it could ever be anything else (as indicated by it being a pointer to void).
2016-09-19Revert "Make ToxAV stateless"iphydf
This reverts commit 21f8db12c45bd56293262cd4abfb73cd9abec821. It is currently broken. Incoming call callbacks are not invoked, and instead the client goes offline immediately.
2016-09-17Make ToxAV statelessGregory Mullen (grayhatter)
2016-09-16Ensure that all TODOs have an owner.iphydf
In the future, all TODOs added either need a bug number (TODO(#NN)) or a person's github user name. By default, I made irungentoo the owner of all toxcore TODOs, mannol the owner of toxav TODOs, and myself the owner of API TODOs.
2016-09-13Add some astyle options to make it do more.iphydf
It now enforces a bit more formatting. In particular, padding inside parentheses is removed. I would like it to remove padding after unary operators, but there seems to be no option for that.
2016-09-13Group #include directives in 3-4 groups.iphydf
1. Current module (if C file). 2. Headers from current library. 3. Headers from other library (e.g. toxcore includes in toxav). 4. System headers.
2016-09-09Minor cleanups: header reordering, adding {}.iphydf
I hadn't done this for the "fun" code, yet. Also, we should include system headers after our own headers. "In general, a module should be implemented by one or more .cpp files. Each of these .cpp files should include the header that defines their interface first. This ensures that all of the dependences of the module header have been properly added to the module header itself, and are not implicit. System headers should be included after user headers for a translation unit." -- http://llvm.org/docs/CodingStandards.html#a-public-header-file-is-a-module
2016-09-09Use `const` for version numbers.iphydf
ApiDSL generates the lowercase function declarations for us and puts them in the right namespace (TOX_, TOXAV_).
2016-09-08Fix compilation for Windows.iphydf
- Mingw32 didn't read MSDN, so behaves badly despite lean and mean. - Avoid alignment issues on windows with packed bitfields in the RTP header. This change makes the program ill-formed in C99, but I don't know the correct fix at the moment, and I don't want to keep the Windows build broken for too long.
2016-09-08Remove the packet mutation in toxav's bwcontroller.iphydf
1. This mutation is never observed outside the function. 2. If it were (it's not), it would be undefined behaviour, since the packet data goes out of scope a few instructions after the callback returns.
2016-09-07Comment intentional switch fallthroughsJfreegman
2016-09-06Improve static and const correctness.iphydf
- Any non-externally-visible declarations should be `static`. - Casting away the `const` qualifier from pointers-to-const is dangerous. All but one instance of this are now correct. The one instance where we can't keep `const` is one where toxav code actually writes to a chunk of memory marked as `const`. This code also assumes 4 byte alignment of data packets. I don't know whether that is a valid assumption, but it's likely unportable, and *not* obviously correct. - Replaced empty parameter lists with `(void)` to avoid passing parameters to it. Empty parameter lists are old style declarations for unknown number and type of arguments. - Commented out (as `#if DHT_HARDENING` block) the hardening code that was never executed. - Minor style fix: don't use `default` in enum-switches unless the number of enumerators in the default case is very large. In this case, it was 2, so we want to list them both explicitly to be warned about missing one if we add one in the future. - Removed the only two function declarations from nTox.h and put them into nTox.c. They are not used outside and nTox is not a library.
2016-09-06Improve C standard compliance.iphydf
- Don't cast between object and function pointers. - Use standard compliant `__VA_ARGS__` in macros. - Add explicit `__extension__` on unnamed union in struct (it's a GNU extension). - Remove ; after function definitions. - Replace `const T foo = 3;` for integral types `T` with `enum { foo = 3 };`. Folding integral constants like that as compile time constants is a GNU extension. Arrays allocated with `foo` as dimension are VLAs on strictly compliant C99 compilers. - Replace empty initialiser list `{}` with zero-initialiser-list `{0}`. The former is a GNU extension meaning the latter. - Cast `T*` (where `T != void`) to `void *` in format arguments. While any object pointer can be implicitly converted to and from `void *`, this conversion does not happen in variadic function calls. - Replace arithmetic on `void *` with arithmetic on `char *`. The former is non-compliant. - Replace non-`int`-derived types (like `uint16_t`, which is `short`-derived) in bit fields with `int`-derived types. Using any type other than `int` or `unsigned int` (or any of their aliases) in bit fields is a GNU extension.
2016-09-02Do not use `else` after `return`.iphydf
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
2016-09-01Remove useless casts.iphydf
These casts are either completely useless (casting T to T) or implicit (x = y).
2016-09-01Sort #includes in all source files.iphydf
2016-09-01Match parameter names in declarations with their definitions.iphydf
The parameter names were taken from function definitions to update the names in function declarations (prototypes).
2016-08-31Add newlines because astyle wants them.iphydf
We'll revert this once we move to clang-format.
2016-08-31Add braces to all if statements.iphydf
2016-08-27Move logging to a callback.iphydf
This removes the global logger (which by the way was deleted when the first tox was killed, so other toxes would then stop logging). Various bits of the code now carry a logger or pass it around. It's a bit less transparent now, but now there is no need to have a global logger, and clients can decide what to log and where.
2016-08-18Fix some compiler warnings.iphydf
2016-08-12Add and use CMake build scriptiphydf
Also, fix the hstox build that was taking half an hour. It now takes 5 minutes. Also, perform distcheck on travis to ensure that make dist works. It's not actually failing the build at the moment due to broken tests.
2016-08-12Check code formatting on Travis.iphydf
We run astyle on Travis and check if there is a diff. The build terminates if git finds a difference.
2016-08-10Silence/fix some compiler warnings.iphydf
Some of these (like the incompatible pointers one) are really annoying for later refactoring.
2016-03-09Added astyled toxav.h to match toxav.in.hderive
2016-02-13added the dropped ;Gregory Mullen (GrayHatter)
2016-02-13missed a line tox to toxavGregory Mullen (GrayHatter)
2016-02-13update the compatablity function to match the macroGregory Mullen (GrayHatter)
2016-02-13SemVer toxav tooGregory Mullen (GrayHatter)
2016-01-13Fix issue #1497Eniz Vukovic
2015-12-15Fixed use of it after free.irungentoo
2015-11-29Fix error reporting in toxav_call()Eniz Vukovic
2015-11-19Merge branch 'master' of https://github.com/helium-software/toxcoreirungentoo
2015-11-17Mannol toxav fix.irungentoo
2015-11-11fix BWController misspellingTibor Stolz
2015-11-04Prevent debug message from spamming stdoutJfreegman