Skip to content

audiobuffersplit: Add support for specifying output buffer size

Currently for buffer splitting only output duration can be specified. Allow specifying a buffer size in bytes for splitting.

Consider a use case of the below pipeline appsrc ! rptL16pay ! capsfilter ! rtpbin ! udpsink

Maintaining MTU for RTP transfer is desirable but in a scenario where the buffers being pushed to appsrc do not adhere to this, an audiobuffersplit element placed between appsrc and rtpL16pay with output buffer size specified considering the MTU can help mitigate this.

While rtpL16pay already has a MTU setting, in case of where an incoming buffer has a size close to MTU, for eg. with a MTU of 1280, a buffer of size 1276 bytes would be split into two buffers, one of 1268 and other of 8 bytes considering RTP header size of 12 bytes. Putting audiobuffersplit between appsrc and rtpL16pay can take care of this.

While buffer duration could still be used being able to specify the size in bytes is helpful here.

Edited by Sanchayan Maity

Merge request reports