Commit Graph

54 Commits

Author SHA1 Message Date
iphydf
df9033dcb9
Fix coding style in rtp module.
* 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.
2018-08-12 23:32:59 +00:00
iphydf
4ed6e59992
Fix enumerator names to comply with toxcore naming standards. 2018-08-12 20:07:18 +00:00
iphydf
8e00294b3c
Add Logger to various net_crypto functions.
In preparation for adding log statements.

Also, fix an uninitialised variable warning in cppcheck.
2018-06-24 19:17:32 +00:00
zoff99
721358208b
Improve video key frame sending.
This change does not include the addition of VP9. We do that in a
separate pull request.

Changes:

* fix the video bug (video frames larger than 65KBytes) by sending full
  frame length in alternate header field
* improve video frame reconstruction logic with slots
* configure video encoder and decoder to be multihtreaded
* set error resilience flags on video codec
* change encoder and decoder softdeadline
2018-02-11 23:31:46 +00:00
iphydf
36ba80aacb
Remove csrc from the RTPHeader struct.
This is not used by anything in the code, so we shouldn't have it in the
header.
2018-02-08 13:20:40 +00:00
iphydf
83779a21ea
Manually serialise RTPHeader struct instead of memcpy. 2018-02-01 23:35:44 +00:00
iphydf
ba176f767a
Change the "capabilities" field to a "flags" field.
This is more appropriate for RTP headers. Capabilities may be negotiated
up front, but flags are useful in each packet.
2018-01-31 13:50:12 +00:00
iphydf
623e9ac331
Add RTP header fields for the full frame length and offset.
This also adds RTPCapabilities and a header field to tell the receiver
about capabilities used in encoding this frame. It is intended to contain
settings relevant to the current frame being sent.
2018-01-29 23:01:13 +00:00
iphydf
cd8080f6d1
Rename some rtp header struct members to be clearer.
These are the names used in the next PR, in RTPHeaderV3, so here we
rename the old struct members already.
2018-01-25 09:42:01 +00:00
yangfl
2651193b99
Fix typo 2017-11-19 23:52:23 +01:00
iphydf
8f96ca6d86
Update license headers and remove redundant file name comment.
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
2017-01-19 00:01:44 +00:00
Maxim Biro
44ac196936 Fix NULL pointer dereference in log calls 2016-11-20 20:32:48 -05:00
iphydf
a8823830d3
Add some astyle options to make it do more.
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-13 01:07:02 +01:00
iphydf
0aa2840164
Group #include directives in 3-4 groups.
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-13 00:32:02 +01:00
iphydf
54de13c1c7
Fix compilation for Windows.
- 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-08 11:37:35 +01:00
iphydf
5b57ab6332
Improve C standard compliance.
- 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-06 11:09:10 +01:00
iphydf
77db27331e
Sort #includes in all source files. 2016-09-01 16:35:46 +01:00
iphydf
45d1f9acb9
Match parameter names in declarations with their definitions.
The parameter names were taken from function definitions to update the names in
function declarations (prototypes).
2016-09-01 14:54:17 +01:00
Eniz Vukovic
bd62c6a359 Fix issue #1497 2016-01-13 23:14:51 +01:00
Tibor Stolz
edbfca5474 fix BWController misspelling 2015-11-11 10:33:03 +01:00
Eniz Vukovic
e730bd54e6 Fix possible misalignment of RTP header 2015-10-26 22:29:23 +01:00
Eniz Vukovic
d6fdf16520 New Adaptive BR algorithm, cleanups and fixes 2015-10-10 23:54:23 +02:00
mannol
c641b0fceb Updated with upstream 2015-08-09 12:39:21 +02:00
mannol
73fbc22961 Fixed inconsistencies 2015-05-07 23:14:03 +02:00
mannol
9bba7a0434 Done 2015-04-29 01:01:25 +02:00
mannol
27e0254a98 Almooooooost 2015-04-27 00:15:57 +02:00
mannol
144fc94d69 Almost done 2015-04-26 00:31:03 +02:00
mannol
1bfd93e64a Finished refactoring 2015-04-22 02:09:37 +02:00
mannol
da6c17222f The pretty basic adaptive bitrate is *working* 2015-04-16 02:00:34 +02:00
mannol
2465f486ac Started custom RTCP 2015-04-13 01:45:53 +02:00
mannol
9c003c9dd2 Video works now 2015-04-08 01:00:19 +02:00
mannol
bf9f7e2ae8 Video works but there is one deadlock left and video replay is slow 2015-04-07 01:24:36 +02:00
mannol
fdaad0b7c0 A little CS cleanup 2015-03-29 01:10:34 +01:00
mannol
29601feb76 New msi protocol 2015-02-21 01:07:22 +01:00
mannol
483a6ffa32 Added 2 new headers into msi for buffer control 2015-02-17 23:34:40 +01:00
mannol
7329f3b3d4 Fixed header protectors and cleaning up the msi 2015-02-16 23:30:20 +01:00
mannol
39680f31d0 Progress 2015-02-01 23:43:54 +01:00
mannol
1450c22d01 Current progress 2015-01-24 23:29:54 +01:00
mannol
e62ded3a6d More av cleanup 2014-11-29 13:42:19 +01:00
irungentoo
279c33c01a
Merge branch 'master' of https://github.com/mannol/toxcore 2014-11-24 20:24:59 -05:00
mannol
386c9748d4 av refactor 2014-11-18 00:46:46 +01:00
mannol
1aeeef58b2 Improved protocol and cleaned code a bit 2014-07-21 01:10:57 +02:00
mannol
8b9d3992a4 Make rtp & codec actions thread-safe 2014-07-05 15:11:25 +02:00
mannol
aeaf997ca5 Removed redundant encryption and asserts 2014-06-28 04:13:38 +02:00
Maxim Biro
741ad009e0 Removed IRC references 2014-06-18 17:58:01 -04:00
irungentoo
82e38883a2
Merge branch 'mannol1-Multicalls' into multi-av 2014-05-25 12:27:48 -04:00
mannol
9db41e7582 Merge remote-tracking branch 'upstream/master' into Multicalls-patch 2014-05-22 00:08:19 +02:00
irungentoo
f818c1a197
Added functions to send and receive lossy encrypted packets over
the Tox connection.

A/V should now work over TCP.
2014-05-21 15:28:14 -04:00
mannol
0fa03b9240 Bunch of random changes 2014-05-03 01:46:03 +02:00
mannol
6a78e2e71c Fixed several bugs and added some features 2014-03-07 03:13:04 +01:00