feat(network): implement Phase 4 RTP framing with FU-A fragmentation
Add the sc_network library: RFC 3550 RtpHeader/RtpPacket serialize and parse (the receiver tolerates CSRC lists, extension headers, and padding by skipping/stripping them) and RFC 6184 H.264 payloading via H264Packetizer/H264Depacketizer. The packetizer splits Annex-B frames into NAL units (3- and 4-byte start codes), emitting single-NAL packets or FU-A fragments within the configured MTU, with the marker bit closing each frame and randomized SSRC/sequence by default. The depacketizer reassembles access units with 3-byte start codes, so both start-code widths round-trip byte-exactly; frames damaged by sequence gaps or missing fragments are dropped until the Phase 7 loss-recovery work. test_rtp covers header and packet round-trips, malformed-input rejections, splitter behavior, FU-A chunk bounds, full packetize -> depacketize round-trip, gap dropping, marker-only frame separation, sequence wrap, and empty inputs. meson test 3/3, valgrind clean.
This commit is contained in:
@@ -9,3 +9,9 @@ test_codec_roundtrip = executable('test_codec_roundtrip',
|
||||
dependencies : sc_codec_dep)
|
||||
|
||||
test('h264 roundtrip', test_codec_roundtrip)
|
||||
|
||||
test_rtp = executable('test_rtp',
|
||||
'network/test_rtp.cpp',
|
||||
dependencies : sc_network_dep)
|
||||
|
||||
test('rtp framing', test_rtp)
|
||||
|
||||
Reference in New Issue
Block a user