Aaro Altonen
6485db2cfd
Create separate routines for sending RTCP packets
...
These routines convert the fields from host to network byte order
and send the packet to all participants
2019-06-18 09:18:57 +03:00
Aaro Altonen
54ba727c0c
Give shorter names for Report Block fields
2019-06-18 09:15:59 +03:00
Aaro Altonen
62b314dd29
Add missing SSRC field to Sender/Receiver Report packets
2019-06-18 09:14:39 +03:00
Aaro Altonen
5b16b70645
Make the RTCP socket getter const
2019-06-17 13:24:19 +03:00
Aaro Altonen
2b5263e6ae
Rename sender/receiver report handling functions
...
This is to make them more consistent with other RTCP packet types
2019-06-17 13:23:13 +03:00
Aaro Altonen
b619a86132
Rename get_hevc_rtp_header() to get_hevc_nal_header()
...
I have no idea why it was called RTP header..
2019-06-17 13:00:43 +03:00
Aaro Altonen
2c447fcf2f
Use new instead of malloc when allocating RTCP frames
2019-06-17 12:36:57 +03:00
Aaro Altonen
788a9f84cd
Add initial implementation of RTCP
...
Currently the timing of RTCP packets is not accurate and
Sender/Receiver Reports contain non-canonical information.
Support for SDES/APP/BYE packets is missing
Support for actually using the RTCP information (ie. an API for the user) is missing
2019-06-17 12:23:30 +03:00
Aaro Altonen
9970af92c9
Add RTP_INTERRUPTED error code
...
This error code is used to indiciate that an ongoing process (f.ex
polling a file descriptor) was interrupted but that "a real error"
did not occur and it is safe to continue
2019-06-17 12:03:35 +03:00
Aaro Altonen
6b83b07e99
Add PACKED_STRUCT macro
...
We must use packed structures because the structs we're sending must
not be padded at all
2019-06-17 12:01:23 +03:00
Aaro Altonen
95e8793149
Add RTCP Sender/Receiver Report frame (de)allocation routines
2019-06-17 11:56:21 +03:00
Aaro Altonen
89f5e3d708
Create rtp_errno global variable
...
Functions that can fail but cannot return error code (f.ex frame
allocation functions) should use this to specify the error condition
2019-06-17 10:03:50 +03:00
Aaro Altonen
5eccaf6675
Rename alloc_frame() to alloc_rtp_frame()
...
Unfortunately, overloading by return type is not possible so we
give new names for frame allocation functions
2019-06-14 12:51:10 +03:00
Aaro Altonen
ed4b01a61d
Add missing include to util.hh
2019-06-14 12:51:10 +03:00
Aaro Altonen
f855db02c3
Update README
2019-06-14 12:51:10 +03:00
Aaro Altonen
33cf96b2e6
Rewrite session statistic routines according to new code style
...
Remove the __RTP_STATS__ test as gathering statistics is no longer
optional
2019-06-14 12:51:02 +03:00
Aaro Altonen
3fc85e2875
Create new cross-platform socket API for the library
...
This makes the code much cleaner as now all ugly cross-platform
related checks are hidden behind the API
2019-06-13 13:02:06 +03:00
Aaro Altonen
1bf4c8196c
Use the new send functions on Linux for HEVC frames
2019-06-12 11:21:40 +03:00
Aaro Altonen
057bd41ceb
Use NDEBUG to disable LOG_DEBUG prints
2019-06-12 11:19:43 +03:00
Aaro Altonen
18f88017c2
Rewrite generic RTP frame sending
2019-06-12 11:19:18 +03:00
Aaro Altonen
f8d6ec6361
Implement faster RTP frag frame sending for Linux
...
This implementatation uses thread-local storage + sendmmsg()
to split large frames and send them using only one system call.
This may results in large performance improvements especially when
frame sizes increase as these implementatation doesn't do any extra
copying and sends the frame to remote using one system call (compared
to previous implementatation where each RTP frame was send individually)
Only works on Linux
2019-06-12 11:14:24 +03:00
Aaro Altonen
03542419d1
Create directory for the library to /usr/local/include and copy headers there
2019-06-10 10:14:08 +03:00
Aaro Altonen
4c9f8a049b
Implement Windows-specific parts
2019-06-05 09:45:28 +03:00
Aaro Altonen
c1e27ab008
Use header sizes defined in frame.hh
2019-06-04 13:57:09 +03:00
Aaro Altonen
7bfae48240
Fix the NAL header of reconstructed frame
...
The NAL type of the reconstructed frame was not set correctly
which casused some problems when the video was decoded
2019-06-04 13:11:28 +03:00
Aaro Altonen
4286d20023
Add install target
2019-06-04 08:12:09 +03:00
Aaro Altonen
af605b182d
Add short explanation of the read/write API
2019-06-03 13:14:15 +03:00
Aaro Altonen
bf042e94db
Add example for receiving RTP frames using receive hook
2019-06-03 13:13:43 +03:00
Aaro Altonen
67f0b1885e
Store the total size of FUs and the FUs themselves
...
This way we don't have to loop through the FU vector when the last
fragment is received
2019-06-03 12:40:06 +03:00
Aaro Altonen
67594f7e72
Add HEVC frame processing function
...
This function merges the HEVC fragmentation units and returns full
frames when all frag units have been received.
2019-06-03 11:58:53 +03:00
Aaro Altonen
72313a783d
Add generic frame processing fuction
2019-06-03 11:57:25 +03:00
Aaro Altonen
e07a9ef431
Add Opus frame processing fuction
2019-06-03 11:56:19 +03:00
Aaro Altonen
0f47b284f7
Add function for dumping array contents in hex format
2019-06-03 11:53:27 +03:00
Aaro Altonen
3c95b1cd6f
Rewrite RTP frame receving
...
Now each supported RTP frame types has its own handler which is called
when a new RTP frame is received. This way we can do frame type specific
operations (f.ex. merging HEVC FU frames) and return fully processed
frames to user
This change introduces new status code "RTP_NOT_READY" which indicates
to the caller that the operation did not finish (eg. we've received only
part of the frame).
2019-06-03 11:52:11 +03:00
Aaro Altonen
ab303a42c2
Add example code for receiving HEVC stream
2019-06-03 11:49:20 +03:00
Aaro Altonen
0fe82b6d77
Update gitignore
2019-06-03 11:45:36 +03:00
Aaro Altonen
0a57caebed
Create new folder structure for examples
2019-06-03 11:45:11 +03:00
Aaro Altonen
d1b6df764d
Remove warnings
2019-06-03 10:59:41 +03:00
Aaro Altonen
278bcc3e29
Update README
2019-06-03 09:37:49 +03:00
Aaro Altonen
65132821a4
Create Qt project file
2019-06-03 09:35:19 +03:00
Aaro Altonen
fa0da917d1
Delete unnecessary frame allocation from frame.cc
2019-05-29 12:53:03 +03:00
Aaro Altonen
73ba634774
Add missing SDP for HEVC
2019-05-29 08:43:07 +03:00
Aaro Altonen
d5dbb99ff4
Add example code for sending HEVC
2019-05-29 08:40:20 +03:00
Aaro Altonen
f1a6d43c34
Add warning about large packets to rtp_generic.cc
...
For now they require no extra work, let the lower levels to deal
with them
2019-05-29 08:40:20 +03:00
Aaro Altonen
12a24e2b18
Rewrite HEVC frame sending
...
Now sending HEVC frames requires no extra copying
2019-05-29 08:40:09 +03:00
Aaro Altonen
ca2666985d
Add function for writing complete RTP frames
2019-05-29 08:34:49 +03:00
Aaro Altonen
76b59f449f
Fix HEVC frame sending
...
Latest changes to RTP frame structure broke the HEVC sending
2019-05-29 08:34:49 +03:00
Aaro Altonen
18a161489f
Send generic as one write
...
There's no need to separate to write the header and then write the
payload when the frame has both fields and their lengths
2019-05-29 08:34:49 +03:00
Aaro Altonen
4305ec04f0
Create data and payload buffers for RTP frame
...
Data points to the beginning of data that is sent and payload points
to offset where user data can be copied to.
2019-05-29 08:34:49 +03:00
Aaro Altonen
341b2a7aae
Rename RTP format and type variables in RTP frame
...
Now they're more consistent with other variable names
2019-05-29 08:34:08 +03:00