Go to file
Aaro Altonen 95e8793149 Add RTCP Sender/Receiver Report frame (de)allocation routines 2019-06-17 11:56:21 +03:00
examples Add example for receiving RTP frames using receive hook 2019-06-03 13:13:43 +03:00
src Add RTCP Sender/Receiver Report frame (de)allocation routines 2019-06-17 11:56:21 +03:00
.gitignore Update gitignore 2019-06-03 11:45:36 +03:00
Makefile Create directory for the library to /usr/local/include and copy headers there 2019-06-10 10:14:08 +03:00
README.md Update README 2019-06-14 12:51:10 +03:00
kvzrtp.pro Implement Windows-specific parts 2019-06-05 09:45:28 +03:00

README.md

rtplib

Based on Marko Viitanen's fRTPlib

building

Linux

make -j8
sudo make install

You can also use QtCreator to build the library

Defines

Use __RTP_SILENT__ to disable all prints

Use NDEBUG to disable LOG_DEBUG which is the most verbose level of logging

Return values

There are two classes of return values: positive and negative

Negative return value means that some condition that the library can't handle happened and the function failed (out of memory, invalid parameters etc.)

Positive return value means that the function call didn't succeed but didn't fail completely either. Examples of these would be polling a socket timeouts when listening to incoming RTCP status reports (RTP_INTERRUPTED) or when process_hevc_frame() returns RTP_NOT_READY when the full frame has not been received.

When an operation succeeds, RTP_OK is returned

API

Sending data

Sending data is a simple as calling writer->push_frame(), see examples/sending/hevc_sender.cc.

Receiving data

Reading frames can be done using two different ways: polling frames or installing a receive hook.

Polling frames is a blocking operation and a separate thread should be created for it. examples/receiving/recv_example_1.cc shows how the polling approach works.

The second way to receive frames is to install a receive hook and when an RTP frame is received, this receive hook is called. Creating separate thread for reading data is not necessary if the receiving is hooked. examples/receiving/recv_example_2.cc shows how the hooking works.