Commit Graph

432 Commits

Author SHA1 Message Date
Heikki Tampio 8f10e220ad rtcp: Fix mistake in send_app_packet() documentation 2023-05-10 15:45:30 +03:00
Heikki Tampio d38aea6adc multiplex: Improve documentation in rtcp_reader 2023-05-10 15:05:42 +03:00
Heikki Tampio 0dde713b63 multiplex: Fix bug when closing RTCP report reader 2023-05-10 14:22:15 +03:00
Heikki Tampio de82b282a5 multiplex: remove remote_sockaddr (4 and 6) from socket along with functions that used them 2023-05-04 15:02:22 +03:00
Heikki Tampio 4d56a20943 multiplex: remove add_zrtp_ctx() from media_stream 2023-05-04 12:43:33 +03:00
Heikki Tampio 83440274b5 multiplex: Remove old unused report_reader from RTCP 2023-05-04 12:31:10 +03:00
Heikki Tampio 8037e730b4 multiplex: Configure RTCP to use rtcp_reader class for reception 2023-05-04 12:15:44 +03:00
Heikki Tampio 828a288bc6 multiplex: Add functionality to rtcp_reader 2023-05-04 09:24:38 +03:00
Heikki Tampio c68bc0a963 multiplex: Add function add_zrtp_ctx
You can start ZRTP initialization with this function. Used like add_srtp_ctx().
2023-05-03 14:58:58 +03:00
Heikki Tampio 985a33d043 multiplex: Add ability to set RCC_SSRC and RCC_REMOTE_SSRC before stream is initialized
Also add body for add_zrtp_ctx() in media_stream
2023-04-28 12:55:17 +03:00
Heikki Tampio 01d84f303a multiplex: Modify RTCP to use socketfactory for socket management 2023-04-28 12:16:21 +03:00
Heikki Tampio 8f8e58ba01 multiplex: Map hooks to remote SSRCs 2023-04-26 14:56:17 +03:00
Heikki Tampio e276490db0 multiplex: Separate reception_flow and socketfactory 2023-04-25 13:51:45 +03:00
Heikki Tampio 7efce9901a multiplex: Add universal hook to socketfactory 2023-04-19 15:19:50 +03:00
Heikki Tampio 0a554938d0 multiplex: Add option to manually set remote SSRC of media stream 2023-04-19 12:47:36 +03:00
Heikki Tampio 4684d9e7e4 multiplex: basic rtp functionality works 2023-04-05 13:27:20 +03:00
Heikki Tampio 5091876961 multiplex: basic sending and receiving works on ipv6, but not on ipv4 2023-04-05 12:18:50 +03:00
Heikki Tampio fab904a39a multiplex: clean up functions that went in the wrong design direction 2023-04-05 10:55:24 +03:00
Heikki Tampio 9e8678e433 multiplex: socketfactory is used to distribute and control sockets 2023-04-05 10:42:58 +03:00
Heikki Tampio 6bb49cccc9 multiplex: add is_single_socket() to media_stream 2023-04-05 09:43:00 +03:00
Heikki Tampio 076f06c57d multiplex: all sessions share a single socketfactory 2023-04-05 09:30:27 +03:00
Heikki Tampio ac7023f9f3 multiplex: receive multiple streams in one socket 2023-04-03 14:23:03 +03:00
Heikki Tampio 8f29d88ac8 multiplex: refine socketfactory 2023-04-03 12:15:26 +03:00
Heikki Tampio ae6726731c multiplex: add socket factory 2023-04-03 11:48:14 +03:00
Heikki Tampio 2b4fd4418f ipv6: updated documentation 2023-03-20 15:15:08 +02:00
Heikki Tampio 0d9e3beed6 ipv6: remove clutter from media_stream api 2023-03-20 15:07:09 +02:00
Heikki Tampio a9fc7750dc Merge branch 'IPv6' 2023-03-20 13:26:51 +02:00
Heikki Tampio 5c9c5562e2 ipv6: fix compiler error 2023-03-15 10:21:01 +02:00
Heikki Tampio b6f7030a62 Release 2.2.0 2023-03-13 15:15:14 +02:00
Heikki Tampio 6d23229936 Improve documentation
Also remove tabs from CMakeLists.txt in examples folder
2023-03-13 14:35:11 +02:00
Heikki Tampio 84bf8c9e4c ipv6: add ipv6 support
ipv6 support for rtp, rtcp, srtp+zrtp, no context flags needed

# Conflicts:
#	src/media_stream.cc
#	src/rtcp.cc
#	src/socket.cc
2023-03-13 13:47:25 +02:00
Heikki Tampio e6c759f514 Merge branch 'rtcp_fixes'
# Conflicts:
#	examples/CMakeLists.txt
#	include/uvgrtp/media_stream.hh
#	include/uvgrtp/util.hh
#	src/media_stream.cc
#	src/rtcp.cc
2023-03-13 13:32:15 +02:00
Heikki Tampio 02f660a561 rtcp: fix app packets hook to conform to current API 2023-03-13 12:26:53 +02:00
vechtomo 41653397e2 rtcp: add hooking for sending APP packets 2023-03-13 12:26:52 +02:00
Heikki Tampio 5aa74002c4 rtcp: Separate rtcp_runner into report generator and report reader threads 2023-02-20 12:30:19 +02:00
Heikki Tampio 63175f8a04 rtcp: Calculate RTP timestamp in SR correctly
Also add the ability to manually set RTP and NTP timestamps in RTP packets.
2023-02-13 10:48:06 +02:00
Heikki Tampio 17a4db471c rtcp: Add missing include of atomic into rtcp.hh, needed for linux 2023-01-30 13:12:17 +02:00
Heikki Tampio 1ada84c787 RTCP: Simplified RTCP to use only one socket
Previously RTCP created "new" sockets with the same parameters for every participant, which was unnecessary. Now only one socket is used for all traffic.
2023-01-25 14:32:53 +02:00
Heikki Tampio 767c504d9b RTCP: Reconnecting after a crash works now
Related to issue #183 and issue #111
2023-01-25 11:58:29 +02:00
Heikki Tampio 87d6967eac RTCP: Inactive RTCP sources are now timed out
Time to timeout is always at least 25 seconds
2023-01-23 12:57:55 +02:00
wowaser 97642fff3d rtcp: add thread safety for prticipants_ data structure 2023-01-19 19:15:47 +02:00
Heikki Tampio 78815c8f28 RTCP: Implement automatic calculation of RTCP transmission interval
RTCP transmission interval is now calculated dynamically instead of being manually set. Defined in RFC 3550 Appendix A.7. Related to issue #130.
2023-01-10 15:42:02 +02:00
Heikki Tampio 83a7b7d0ab RTCP: Implement the ability to set RTCP packet transmission interval
Added function set_rtcp_interval that allows user to change interval in milliseconds. Related to issue #65.
2022-12-20 09:29:38 +02:00
Heikki Tampio 9dff5f3c58 RTCP: Implement the ability to set session bandwidth via a context flag
Session bandwidth affects the RTCP packet transmission interval. Related to issue #65.
2022-12-19 13:35:06 +02:00
Heikki Tampio e037e02105 RTCP: Calculate correctly the fraction lost in RTCP report blocks
Defined in RFC3550 Appendix A.3, related to issue #30
2022-12-14 12:13:31 +02:00
vechtomo db19b52dc5 config: allow for custom SSRC. Added thread safety 2022-12-13 15:36:36 +02:00
Heikki Tampio be34a7ce4d rtcp: Replace dropped_pkts with lost_pkts
Use same term from standard
2022-12-09 10:00:08 +02:00
Joni Räsänen fa78501f53 zrtp: Update flag names used to determine the ZRTP mode 2022-09-22 07:46:40 +03:00
Joni Räsänen 81d7e8f859 doc: Fix few more flag names in doc and document flags for IDEs 2022-09-21 13:58:59 +03:00
Joni Räsänen 7e41c00716 common: Rename a flag for consistency with other flags 2022-09-21 08:40:07 +03:00
Joni Räsänen 1738e6b10b doc: Properly document the enums in util.hh for Doxygen generation 2022-09-21 08:39:52 +03:00
Joni Räsänen 58fcad5086 common: Limit the maximum latency frame rate feature can add 2022-09-20 08:06:32 +03:00
Joni Räsänen 4f205c893d common: Use correct name for numerator 2022-09-19 14:43:08 +03:00
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 3d63ea4074 common: Remove unused prohibition optimization 2022-09-15 08:17:57 +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 b8091d02b6 common: Simplify media_stream code
Remove unused media_config and construct socket and holepuncher at
constructor.
2022-09-08 11:27:44 +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 9ee5518147 common: Move socket.hh away from public API
Socket has never been part of the public API.
2022-09-07 14:10:24 +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 f55c4578a8 rtcp: Add field t APP that tells the payload length
This design is similar to RTP packets.
2022-09-05 07:37:10 +03:00
Joni Räsänen 1e751e051f common: Remove memory leaks shown by Valgrind with tests 2022-09-01 12:18:46 +03:00
Joni Räsänen eb5e7c7c2f common: Fix warnings given by GCC on Linux 2022-08-25 18:19:05 +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 c4f89cf7b5 Merge remote-tracking branch 'remotes/Gitlab/fix_encryption_bugs'
# Conflicts:
#	src/srtp/srtp.cc
2022-08-25 08:03:30 +03:00
Joni Räsänen f21a81bec4 zrtp: Improve debug prints 2022-08-25 07:58:23 +03:00
Joni Räsänen ec2e341ca5 common: Move all binding to socket 2022-08-25 07:58:10 +03:00
Joni Räsänen 1c9dcd2aad common: Clarify address naming 2022-08-24 14:34:12 +03:00
Joni Räsänen 8b05132deb zrtp: Fix race condition in performing DH 2022-08-24 14:33:30 +03:00
Matt Durgavich 98715d5b53
common: Silence two warnings
* common: Remove stray quote from include to silence warning

* Fix warning related to return type for sendmmsg stand-in

Co-authored-by: Matt Durgavich <mdurgavich@vivox.com>
2022-08-24 13:17:05 +03:00
Joni Räsänen 3472e2d1f7 build: Move crypto.hh out from public API
It was making compiling software that wants to use crypto more
difficult and it was completely unnecessary. It is possible that
someone is using the enable function there, but it has also existed
in the context class for a long time.
2022-08-23 10:32:40 +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 3410d70aa3 common: Move debug.hh away from public include
I don't feel that the internal debug print API of uvgRTP needs to be
part of the public API for uvgRTP.
2022-08-17 13:57:49 +03:00
Matt Durgavich 2d378a3161 common: prepend logging macros with UVG_ to avoid collisions. 2022-08-17 01:00:13 -04:00
Joni Räsänen 26d311bb56
Merge pull request #153 from wowaser/featureBranch
rtcp: add a public getter function for interval_ms_
2022-08-15 14:47:24 +03:00
vechtomo 8c7eaaeb1f rtcp: add a public getter function for interval_ms_ 2022-08-15 14:42:28 +03:00
Joni Räsänen 6b7e88d5d5
Merge pull request #142 from eliteraspberries/build-apple
Build on macOS
2022-08-15 14:17:16 +03:00
vechtomo 7a7a018032 rtcp: deepcopy APP packet data and handle it internally 2022-07-21 18:50:10 +03:00
Joni Räsänen cb7ef9d6e9
Merge pull request #149 from eliteraspberries/log-clang-warnings
common: Remove GNU extension (, ##__VA_ARGS__).
2022-07-20 13:40:26 +03:00
Mansour Moufid fe1dfaaad5 common: Remove GNU extension (, ##__VA_ARGS__). 2022-07-19 11:20:17 -04:00
Mansour Moufid 3020622875 build: Prepend UVGRTP_ to exported preprocessor definitions. 2022-07-19 11:15:37 -04:00
Mansour Moufid 51083c335d rtp: Implement sendmmsg for macOS. 2022-07-15 12:00:06 -04:00
Joni Räsänen 177a0b0d83 rtcp: Calculate compound packet size correctly for app and bye 2022-07-15 10:56:31 +03:00
Joni Räsänen 202209fe8e
Merge pull request #135 from gugautie/master
Limited C api wrapper
2022-07-14 13:07:00 +03:00