uvgrtp-base/examples
Aaro Altonen 53270c6966 Add example code for SRTP using ZRTP 2020-04-27 12:22:24 +03:00
..
README.md Add example code for generic fragmentation 2020-04-24 21:51:12 +03:00
binding.cc Fix comment in examples/binding.cc 2020-04-16 13:59:46 +03:00
deallocation_1.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
deallocation_2.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
deallocation_3.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
example.pro Add instructions for running the example codes 2020-04-16 13:28:31 +03:00
prepare.bat Add instructions for running the example codes 2020-04-16 13:28:31 +03:00
receiving_hook.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
receiving_poll.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
rtcp_hook.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
rtcp_poll.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
sending.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
sending_fragmented.cc Simplify the structure of example directory 2020-04-06 12:07:28 +03:00
sending_generic.cc Add example code for generic fragmentation 2020-04-24 21:51:12 +03:00
srtp_zrtp.cc Add example code for SRTP using ZRTP 2020-04-27 12:22:24 +03:00

README.md

kvzRTP example codes

Instructions for Windows

  1. Run prepare.bat in this directory to prepare testing environment for kvzRTP
    • The script creates lib/ and include/ directories to project root directory
  2. Build kvzRTP using QtCreator
  3. When kvzRTP has been built, copy the libkvzrtp.a from the Qt build directory to lib/ created by the script
  4. Open the example.pro and build & run it
    • Make sure the Qt build directory for example.pro is located in the same directory as lib/ and include/ (projects root directory) or tweak the include/lib paths accordingly

Instructions for Linux

sudo make --directory=.. all install
g++ sending.cc -lkvzrtp -lpthread && ./a.out

Available examples

We provide several simple and thoroughly commented examples on how to use kvzRTP.

How to create a simple RTP sender

How to use fragmented input with kvzRTP HEVC slices

How to fragment generic media types

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)

Memory ownership/deallocation

If you have not enabled the system call dispatcher, you don't need to worry about these

Method 1, unique_ptr

Method 2, copying

Method 3, deallocation hook