Commit Graph

32 Commits

Author SHA1 Message Date
Joni Räsänen 3b31367da4 common: Add better name for fragment pacing 2022-09-19 14:22:10 +03:00
Joni Räsänen 80433cfcc4 common: Move internal definition out from public header 2022-09-19 09:34:02 +03:00
Joni Räsänen 72224ce909 common: Reduce the default MTU size by 8 bytes
This helps account for various protocols that add an extra 8 bytes on
top of sent UDP traffic.
2022-09-16 16:35:59 +03:00
Joni Räsänen 76b13879e5 common: Separate fps enforcement and fragment pacing
This commit also fixes (mostly) the fps enforcement.
2022-09-16 16:15:36 +03:00
Joni Räsänen 1b2996fd25 common: Release the memory of copy with RTP_COPY flag
uvgRTP does not indeed take ownership of the data when used with non-
smart pointer API. Now the copy is deleted by making it a unique_ptr.
2022-09-15 12:00:57 +03:00
Joni Räsänen 47c126262c common: Uniform ssize_t definition between MSVC and others 2022-09-15 08:52:46 +03:00
Joni Räsänen 4dba1d55d1 common: Update documentation of public API
This commit makes Doxygen generation create better documentation.
2022-09-15 08:17:58 +03:00
Joni Räsänen f0ee28bd67 common: Add possibility for adjusting rtp clock rate 2022-09-12 14:12:28 +03:00
Joni Räsänen 21c9528a0e common: Use the correct MTU size for ring buffer
Using the new correct MTU size seems to work. This enables much more
slots in the ring buffer, which in turn helps a lot with receiver
performance.
2022-09-12 14:02:35 +03:00
Joni Räsänen 9df2d0d459 common: Use the correct MTU size
The MTU size was too small since it subtracted the Ethernet header size
which is not included in MTU. This fix results in 14 bytes larger
RTP frames, which increases throughput slightly.

Also added few sizes for IPv6, but they are not used yet.
2022-09-12 13:19:02 +03:00
Joni Räsänen 938efe1176 common: Implement RTP_COPY flag 2022-09-09 13:29:50 +03:00
Joni Räsänen 570fc01a2b common: Have System Call Clustering (SCC) be disabled by default
SCC has an increased chance of losing frames at the receiving end if
used and I think this justifies it disabling. The benefit of SCC is
reduce CPU usage at the sender. Added a flag for enabling it.
2022-09-09 11:09:21 +03:00
Joni Räsänen f7040a4992 formats: Make restoration of stream the default option
This may break some implementation if they don't want start code prefix
for some reason or if they already implemented start code prefix in
their code.

Those who implemented themselves are using an inferior solution
(one extra stream copy for fragmented frames) and should update anyway.
Those who use the flag will just get a warning to update their flags.
Those whose decoder doesn't want start code prefix may not work without
adding a flag.
2022-09-08 08:14:52 +03:00
Joni Räsänen e06fc3c46c common: Remove unnecessary stuff from util.hh 2022-09-07 15:03:16 +03:00
Joni Räsänen 237e71d465 common: Separate setting the ring buffer size from socket buffer
Gives user more control over internals of uvgRTP.
2022-09-06 13:42:00 +03:00
Joni Räsänen d68fcb0690 common: Add possibility only send or only receive
The API forced uvgRTP to both bind to local port even if user does not
need or want this and it also expects the user to know the remote
remote address which is not always possible.

This commit adds API to session for specifying only one port when
creating media_stream. This commit also adds RCE_SEND_ONLY and
RCE_RECEIVE_ONLY flags which can be used to prevent binding and specify
the meaning of single address and port parameters.
2022-09-06 11:45:19 +03:00
Joni Räsänen fe28c423a9 common: Add support for formats that don't require packetization 2022-09-05 13:21:57 +03:00
Joni Räsänen d359371040 formats: Modify RCE_FRAGMENT_GENERIC to follow existing definitions
I noticed that H263 uses a very similar fragmentation as
RCE_FRAGMENT_GENERIC and this commit modifies the implementation to use
the exactly same scheme in case we want to support H263 at some point.
2022-09-05 09:57:39 +03:00
Joni Räsänen f915b2aa17 common: Remove most MSVC compiler warnings 2022-08-25 17:30:09 +03:00
Joni Räsänen 8b05132deb zrtp: Fix race condition in performing DH 2022-08-24 14:33:30 +03:00
Joni Räsänen f9a89f7408 common: Rename all flags to distinguish between types
I've already created one bug by not being able to distinguish between
different flags. uvgRTP has four types of flags: enable, context, rtp
and socket. I'm planning on adding one more flag type which makes this
a good point to rename all flags.
2022-08-23 09:47:41 +03:00
Joni Räsänen 55ac0d3909 common: Document new fps configuration variables 2022-08-22 12:01:18 +03:00
Joni Räsänen 2abf0bc4ef common: FPS API for sending 2022-08-22 11:34:06 +03:00
Joni Räsänen 0b7f4604c9 formats: Make reference discarding disabled by default 2022-07-07 10:55:40 +03:00
Joni Räsänen bca3bdb18e formats: Add RTP flag that can be used to disable SCL
This obsoletes the old RCE flag, that did not work.
2022-07-04 12:01:49 +03:00
Joni Räsänen b7ff2777b5 formats: Have only one system of timeout in h26x
The garbage collection is now the only system of timing out frames, the
old one did not make sense to me.
2022-06-17 10:33:22 +03:00
Joni Räsänen 57f7440c80 formats: Increase timout 2022-06-17 10:29:46 +03:00
Joni Räsänen bfd6d3eff5 formats: Add frag for disabling no reference frame drops 2022-06-17 08:26:18 +03:00
Joni Räsänen 84c66b7c1c formats: Add a way to disable H26x SCL 2022-04-01 08:24:37 +03:00
Joni Räsänen cce653b9b7 common: Rename pkt_dispatch to reception_flow
The dispatching is what technique the class uses, but it does not
describe its responsibilities at all making it very hard to figure out
what role it plays in the architecture just by looking at the name.

Also removed all references to obsolete System call dispatcher
(different concept) in all the comments.
2022-03-03 09:16:09 +02:00
Joni Räsänen f62ade9c70 Merge branch 'example_improvements'
# Conflicts:
#	CMakeLists.txt
#	src/formats/h264.hh
#	src/formats/h265.hh
#	src/formats/h266.hh
#	src/formats/h26x.cc
#	src/formats/h26x.hh
#	src/lib.cc
#	src/pkt_dispatch.hh
#	src/rtp.cc
#	uvgRTP.pro
2022-02-22 14:03:49 +02:00
Joni Räsänen 3b5acb7f88 build: Move includes to include/uvgrtp folder 2021-07-09 12:11:05 +03:00