Now kvzRTP creates a private/public key pair and sends the public key in the DHPartN message to remote. kvzRTP does not support Preshared mode so the retained secrets just contain random values and are going to be ignore when the shared secrets are established. DHResult is already calculated successfully though the architecture is really starting show its limitations because the sha256 values of various messages are calculated everywhere in the code which is pretty ugly. Maybe create getters for various messages and calculate all hashes at once. |
||
|---|---|---|
| benchmarks | ||
| examples | ||
| src | ||
| .gitignore | ||
| COPYING | ||
| Makefile | ||
| README.md | ||
| kvzrtp.pro | ||
README.md
kvzRTP
kvzRTP is a thread-safe, easy-to-use RTP library written in C++ especially designed for high-speed multimedia applications. In ideal conditions it's able to receive up to 607 MB/s goodput for HEVC stream. It features a very intuitive and easy-to-use API.
kvzRTP is licensed under the permissive BSD 2-Clause License
For SRTP/ZRTP support, kvzRTP uses following libraries with small modifications:
- Tiny AES in C (Public domain)
- SHA1 (Public domain)
Supported specifications:
- RFC 3350: RTP: A Transport Protocol for Real-Time Applications
- RFC 7798: RTP Payload Format for High Efficiency Video Coding (HEVC)
- RFC 7587: RTP Payload Format for the Opus Speech and Audio Codec
- RFC 3711: The Secure Real-time Transport Protocol (SRTP)
- RFC 6189: ZRTP: Media Path Key Agreement for Unicast Secure RTP
Based on Marko Viitanen's fRTPlib
Building
make -j8
sudo make install
You can also use QtCreator to build the library. The library must be built using a 64-bit compiler!
The library should be linked as a static library to your program.
Linking
Linux
-lkvzrtp -lpthread
Windows
-L<path to library folder> -lkvzrtp -lpthread -lwsock32 -lws2_32
Examples
We provide several simple and thoroughly commented examples on how to use kvzRTP, please see:
How to create a simple RTP sender
How to create a simple RTP receiver (hooking)
NOTE: The hook should not be used for media processing. It should be rather used as interface between application and library where the frame handout happens.
How to create a simple RTP receiver (polling)
How to create an RTCP instance (polling)
How to create an RTCP instance (hoooking)
Configuration
By default, kvzRTP does not require any configuration but if the participants are sending high-quality video, some things must be configured
How to configure RTP sender for high-quality video
How to configure RTP receiver for high-quality video
How to configure SRTP with ZRTP
How to configure SRTP with user-managed keys
Memory ownership/deallocation
If you have not enabled the system call dispatcher, you don't need to worry about these
Defines
Use __RTP_SILENT__ to disable all prints
Use NDEBUG to disable LOG_DEBUG which is the most verbose level of logging
Adding support for new media types
Adding support for new media types quite straight-forward:
- add the payload to util.hh's
RTP_FORMATlist - create files to src/formats/
format_name.{cc, hh} - create
namespace format_nameinsidenamespace kvz_rtp - Add functions
push_frame()andframe_receiver()- You need to implement all (de)fragmentation required by the media type
See src/formats/hevc.cc and src/formats/hevc.hh for help when in doubt.