Joni Räsänen
e62e59af9f
common: Remove duplicate code in media_stream in init
2022-03-03 11:39:12 +02:00
Joni Räsänen
8e05f3dbc7
rtcp: Use shared_ptr to manage rtcp memory
2022-03-03 10:48:51 +02:00
Joni Räsänen
97317fed22
srtp: Use shared_ptr to manage srtp and srtcp memory
2022-03-03 10:44:04 +02:00
Joni Räsänen
32839127f4
common: Use shared_ptr for managing socket memory
2022-03-03 10:31:36 +02:00
Joni Räsänen
de639fe861
common: Manage rtp memory using shared_ptr
2022-03-03 10:20:21 +02:00
Joni Räsänen
cce653b9b7
common: Rename pkt_dispatch to reception_flow
...
The dispatching is what technique the class uses, but it does not
describe its responsibilities at all making it very hard to figure out
what role it plays in the architecture just by looking at the name.
Also removed all references to obsolete System call dispatcher
(different concept) in all the comments.
2022-03-03 09:16:09 +02:00
Joni Räsänen
97c235bb97
examples: Fix paths in example project file
2022-03-03 08:03:29 +02:00
Joni Räsänen
8aa2268597
build: Remove unused class dispatch
...
This class was used to speed up the sending end, but it did not actually
affect the sending speed and has been disabled ever since.
2022-03-03 08:01:36 +02:00
Joni Räsänen
9ef02a72f8
common: Remove extra characters in code
2022-03-01 12:24:50 +02:00
Joni Räsänen
6375f56273
formats: Fix incorrect NAL division
...
I'm not sure what was wrong, but I kept getting these zero starting
h265 NAL units that did not make sense and decoder complained about
them. This issue seems fixed when I increased the start code lookup
scan. This also should make it faster for h265 and h266.
2022-03-01 12:24:50 +02:00
Joni Räsänen
06c14ace97
common: Add more debug prints to track lost packets
2022-03-01 12:24:49 +02:00
Joni Räsänen
c66db536be
doc: Remove mention of bug that has been fixed from tutorial
2022-03-01 09:04:54 +02:00
Joni Räsänen
89ac6553ec
rtcp: Check if socket exists when sending rtcp packet
...
This fixes a crash if the socket fails to bind for some reason
2022-03-01 08:54:13 +02:00
Joni Räsänen
54924c2d5d
formats: Prepend start codes to all NAL units
...
Now also the aggregate packets get start codes. This commit also fixes
the copying of RTP header for aggregate packets.
2022-03-01 08:04:30 +02:00
Joni Räsänen
07095278d7
doc: Add mention on broadcast addresses
...
Haven't tested them, but I think they should work. This mention was requested in issue #94
2022-02-28 13:33:52 +02:00
Joni Räsänen
c92e67ecd1
tests: Update circleCI configuration with new example locations
2022-02-28 12:24:45 +02:00
Joni Räsänen
fc196a64cc
doc: Add slight clarifications to tutorial
2022-02-28 12:19:30 +02:00
Joni Räsänen
f15908909e
doc: Update links in docs folder to examples folder
2022-02-28 12:08:25 +02:00
Joni Räsänen
154f50ee94
doc: Add examples as one potential commit prefix
2022-02-28 12:04:57 +02:00
Joni Räsänen
846164a331
doc: Update link to examples folder
2022-02-28 12:04:09 +02:00
Joni Räsänen
604ad00b92
doc: Add tutorial to examples folder
2022-02-28 12:03:07 +02:00
Joni Räsänen
f4352358bb
build: Separate common header file lib.hh from context class
...
With this separation, the user has the option of not including all
the classes with lib.hh, where as previously it was mandatory because
context is always needed.
2022-02-28 10:43:16 +02:00
Joni Räsänen
3b163e1027
examples: Move examples folder to repo root
2022-02-28 09:52:18 +02:00
Joni Räsänen
28fbddc23d
build: Enable stricter warning level for MSVC
2022-02-28 09:46:26 +02:00
Joni Räsänen
f5b692b05b
build: Add missing defines header to be included in project files
2022-02-28 09:37:00 +02:00
Joni Räsänen
3437e194aa
common: Remove extra ; from end of namespaces
...
This was correctly giving warnings with GCC --pedantic
2022-02-28 08:51:38 +02:00
Joni Räsänen
f62ade9c70
Merge branch 'example_improvements'
...
# Conflicts:
# CMakeLists.txt
# src/formats/h264.hh
# src/formats/h265.hh
# src/formats/h266.hh
# src/formats/h26x.cc
# src/formats/h26x.hh
# src/lib.cc
# src/pkt_dispatch.hh
# src/rtp.cc
# uvgRTP.pro
2022-02-22 14:03:49 +02:00
jkimura
7bfc9dfa13
formats: UVG-90 Find H264 start codes that are not 4byte aligned
2022-02-22 12:47:21 +02:00
jkimura
16c81dd162
formats: UVG-89 Fix miscalculation of data length in T3 and T4 scenario
2022-02-22 12:47:03 +02:00
Joni Räsänen
821251362b
doc: Update readme with papers and link to test framework
2022-02-22 09:26:42 +02:00
Joni Räsänen
6b0ee4c89f
doc: Update contributing instructions regarding commit format
...
Make it optional, so it is easier to accept new PRs
2022-02-22 09:02:13 +02:00
Joni Räsänen
819d8acee8
common: Add missing memory include, fixes Linux build
2022-02-21 10:20:07 +02:00
Joni Räsänen
f483cbaa81
common: Fix pull_frame() check
2022-02-21 10:05:46 +02:00
Joni Räsänen
8394152f26
tests: Add check for pull_frame test that it receives frames
2022-02-21 10:05:17 +02:00
Joni Räsänen
d97079ffbb
common: Use shared ptr for zrtp module
2022-02-07 10:42:37 +02:00
Joni Räsänen
dea14a3e98
doc: Update contributing instructions
2022-02-04 17:33:19 +02:00
Joni Räsänen
700460460e
tests: Update test readme with new file names
2022-02-03 11:53:38 +02:00
Joni Räsänen
94b99776a4
tests: Make tests easier to follow along by printing progress
2022-02-03 11:41:02 +02:00
Joni Räsänen
f176da72d8
tests: Reorder tests in terms of complexity
...
Running simpler tests first seems better since there are fewer
potential problem areas tested at one time limiting the search area for
bugs. Another reason was that I was having problems with srtp on
windows for some reason.
2022-02-03 11:19:55 +02:00
Joni Räsänen
434d7af626
srtp: Make sure 256 key length can be copied
...
Not sure if this is needed, but it seems safer in case the key length
is 256.
2022-02-03 07:44:22 +02:00
Joni Räsänen
b086f06353
common: Make the buffer increase more modest
2022-02-02 13:48:06 +02:00
Joni Räsänen
2db5061291
common: Using the MTU size doesn't work with small streams
...
The socket seems to really want the full size buffer even though the
packet size is mostly just 1458. This fixes the small streams working.
2022-02-02 13:15:18 +02:00
Joni Räsänen
314eec11bf
tests: Add test for double binding with RTCP
...
A relatively common scenario that should be handled gracefully.
2022-02-02 09:46:58 +02:00
Joni Räsänen
e3a895d052
Merge branch 'fix_4K_reception'
2022-02-01 17:14:01 +02:00
Joni Räsänen
47b761e2ef
common: Set more thread priority stuff for receiver
2022-02-01 17:05:18 +02:00
Joni Räsänen
5bbbc82f0e
common: Set the dispatcher ring buffer via configure_ctx
...
Now the buffer size uses MTU so it doesn't use too much memory. The
default buffer should now handle most common use cases and others can
be configured via options.
2022-02-01 16:55:31 +02:00
Joni Räsänen
0ffa096212
common: Only start processing once all packets have been received
2022-02-01 14:57:51 +02:00
Joni Räsänen
d2899c913a
common: Use std::atomic instead of a mutex
...
This is simpler and hopefully more performative.
2022-02-01 14:57:38 +02:00
Joni Räsänen
40457edaf0
common: Set receiver thread priority to maximum
...
Hopefully this will make it lose less packets.
2022-02-01 14:43:02 +02:00
Joni Räsänen
465fe8bd9b
common: Discard packets instead of waiting in reception
...
Better to lose old packets than new ones I guess.
2022-02-01 14:42:23 +02:00