Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
The rtph264depay already supports depayloading such bundled packets, but so far the payloader does not rtph264pay does not; attached patch attempts to change that.
Some notes:
By default, no aggregation is done, but there's a property "do-aggregate" now to enable this
I've attempted to change the existing payloader as little as possible
Patch is against git HEAD.
Patch 367317, "Patch implementing STAP-A for the RTP H.264 payloader": stap-a.patch
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I think this should default to TRUE as I think it's almost always the best behaviour. My only worry is that it will break interop with lesser RTP stacks.
Don't leave code between "#if 0", you can use GST_CAT_MEMDUMP() or if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) > GST_LEVLE_MEMDUMP) { and then print top the memdump level using the macros).
Not a requirement, but It Would Be Nice (tm) if there was a unit test addition to go along with it - just something simple that runs through the new code path, so that it gets valgrinded etc.
With master (and with the patch) I see two cases of 'definitely lost' (see below), but they are in the _de_payloader, rather than the payloader.
Running suite(s): rtp_data_test
==11909== 279 (72 direct, 207 indirect) bytes in 1 blocks are definitely lost in loss record 2,111 of 2,156
==11909== at 0x4C2DBAB: malloc (vg_replace_malloc.c:299)
==11909== by 0x6B9A2B5: g_malloc (gmem.c:99)
==11909== by 0x6BB1E46: g_slice_alloc (gslice.c:1025)
==11909== by 0x5C5CD3A: gst_caps_new_empty (gstcaps.c:253)
==11909== by 0x5C5CF18: gst_caps_new_simple (gstcaps.c:326)
==11909== by 0x84DFD8D: gst_rtp_h264_set_src_caps (gstrtph264depay.c:324)
==11909== by 0x84E1873: gst_rtp_h264_depay_setcaps (gstrtph264depay.c:738)
==11909== by 0x875E83C: gst_rtp_base_depayload_setcaps (gstrtpbasedepayload.c:289)
==11909== by 0x875E83C: gst_rtp_base_depayload_handle_event (gstrtpbasedepayload.c:571)
==11909== by 0x5C8C136: gst_pad_send_event_unchecked (gstpad.c:5756)
==11909== by 0x5C8C62F: gst_pad_push_event_unchecked (gstpad.c:5409)
==11909== by 0x5C8CAD5: push_sticky (gstpad.c:3932)
==11909== by 0x5C8A6E7: events_foreach (gstpad.c:612)
==11909== by 0x5C959E6: check_sticky (gstpad.c:3992)
==11909== by 0x5C959E6: gst_pad_push_event (gstpad.c:5543)
==11909== by 0x875CD52: gst_pad_set_caps (gstcompat.h:59)
==11909== by 0x875CD52: gst_rtp_base_payload_negotiate (gstrtpbasepayload.c:1057)
==11909== by 0x875D427: gst_rtp_base_payload_chain (gstrtpbasepayload.c:627)
==11909== by 0x5C8E031: gst_pad_chain_data_unchecked (gstpad.c:4334)
==11909== by 0x5C8E031: gst_pad_push_data (gstpad.c:4590)
==11909== by 0x5C94A01: gst_pad_push (gstpad.c:4709)
==11909== by 0x5C7B45A: gst_proxy_pad_chain_default (gstghostpad.c:127)
==11909== by 0x5C8E031: gst_pad_chain_data_unchecked (gstpad.c:4334)
==11909== by 0x5C8E031: gst_pad_push_data (gstpad.c:4590)
==11909== by 0x5C94A01: gst_pad_push (gstpad.c:4709)
==11909==
==12298== 9,488 (816 direct, 8,672 indirect) bytes in 3 blocks are definitely lost in loss record 2,653 of 2,658
==12298== at 0x4C2DBAB: malloc (vg_replace_malloc.c:299)
==12298== by 0x6B9A2B5: g_malloc (gmem.c:99)
==12298== by 0x6BB1E46: g_slice_alloc (gslice.c:1025)
==12298== by 0x5C53A4A: gst_buffer_new (gstbuffer.c:801)
==12298== by 0x5C557B4: gst_buffer_copy_with_flags (gstbuffer.c:662)
==12298== by 0x5C88477: gst_mini_object_make_writable (gstminiobject.c:315)
==12298== by 0x9049288: set_headers (gstrtpbasedepayload.c:716)
==12298== by 0x9049C6E: gst_rtp_base_depayload_prepare_push (gstrtpbasedepayload.c:754)
==12298== by 0x904A218: gst_rtp_base_depayload_push (gstrtpbasedepayload.c:785)
==12298== by 0x8DF4C35: gst_rtp_vorbis_depay_switch_codebook (gstrtpvorbisdepay.c:436)
==12298== by 0x8DF4C35: gst_rtp_vorbis_depay_process (gstrtpvorbisdepay.c:513)
==12298== by 0x904A624: gst_rtp_base_depayload_handle_buffer.isra.3 (gstrtpbasedepayload.c:429)
==12298== by 0x5C8E031: gst_pad_chain_data_unchecked (gstpad.c:4334)
==12298== by 0x5C8E031: gst_pad_push_data (gstpad.c:4590)
==12298== by 0x5C94A01: gst_pad_push (gstpad.c:4709)
==12298== by 0x8DF58EF: gst_rtp_vorbis_pay_flush_packet (gstrtpvorbispay.c:341)
==12298== by 0x8DF5E33: gst_rtp_vorbis_pay_payload_buffer (gstrtpvorbispay.c:635)
==12298== by 0x8DF6FA9: gst_rtp_vorbis_pay_handle_buffer (gstrtpvorbispay.c:876)
==12298== by 0x5C8E031: gst_pad_chain_data_unchecked (gstpad.c:4334)
==12298== by 0x5C8E031: gst_pad_push_data (gstpad.c:4590)
==12298== by 0x5C94A01: gst_pad_push (gstpad.c:4709)
==12298== by 0x4E73B2B: gst_audio_encoder_finish_frame (gstaudioencoder.c:991)
==12298== by 0x84BE335: gst_vorbis_enc_output_buffers (gstvorbisenc.c:992)
==12298==
100%: Checks: 49, Failures: 0, Errors: 0
Check suite rtp_payloading ran in 79.662s (tests failed: 0)
Bundling is required when sending a H.264 RTP stream through Janus to Chrome on MacOS or Android, as otherwise decoding will not start. Unfortunately, the simple SPS/PPS bundling here is not sufficient.
I had already written my own much more aggressive bundling. I've merged the two implementations and will post patches shortly.
Our stream now looks identical to the one sent by FFmpeg 4.0, except we do proper nal_ref_idc propagation. :-)
Add a new property "do-aggregate"* to the H.264 RTP payloader which
enables STAP-A aggregation as per [RFC-6184][1]. With aggregation enabled,
packets are bundled instead of sent immediately, up until the MTU size.
Bundles also end at access unit boundaries or when packets have to be
fragmented.
Split sending function into prechecks, single packet and
fragmentation. Bundling is called after SPS/PPS injection
while bundling only calls fragmentation or single packet
sending. This unbreaks SPS/PPS injection in the presence of
bundling.
Proper discont/delta-unit handling when injecting SPS/PPS.
This should also work better with the checks in the bundling.