rtp: Add AC-3 RTP payloader/depayloader
Payloader Aggregation Modes
The default aggregation mode is auto
: If upstream is live, the payloader will send out all
audio frames immediately, even if they don't completely fill a packet, in order to minimise
latency. If upstream is not live, the payloader will by default aggregate audio frames until
it has completely filled an RTP packet as per the configured MTU size or the max-ptime
property if it is set (it is not set by default).
The aggregation mode can be controlled via the aggregate-mode
property.
RTP Test Harness additions
- can check duration on depayloaded buffers
- can set the appsrc that feeds input buffers to the payloader to live mode
Test pipelines
Non-live, normal MTU
gst-launch-1.0 audiotestsrc wave=ticks ! avenc_ac3 ! rtpac3pay2 ! identity silent=false ! rtpac3depay ! decodebin3 ! fakesink silent=false sync=true -v
- should accumulate multiple AC3 frames (ca. 418 bytes here) into a single RTP packet
- each AC3 frame is ca. 34ms at 44.1kHz (1536 samples)
Live, normal MTU
gst-launch-1.0 audiotestsrc wave=ticks is-live=true ! avenc_ac3 ! rtpac3pay2 ! identity silent=false ! rtpac3depay ! decodebin3 ! fakesink silent=false sync=true -v
- should send one AC3 frame (ca. 418 bytes here) per RTP packet (low latency)
- each AC3 frame is ca. 34ms at 44.1kHz (1536 samples)
Non-live, small MTU, fragmentated payload
gst-launch-1.0 audiotestsrc wave=ticks ! avenc_ac3 ! rtpac3pay2 mtu=100 ! identity silent=false ! rtpac3depay ! decodebin3 ! fakesink silent=false sync=true -v
- should fragment each AC3 frame (ca. 418 bytes here) and reassemble it
- each AC3 frame is ca. 34ms at 44.1kHz (1536 samples)
Edited by Tim-Philipp Müller