Skip to content

tsmux: Add sparse bitrate mode

Jordan Yelloz requested to merge jyelloz/gstreamer:tsmux-bitrate-sparse into main

The goal of this change is to save transport bandwidth for users who prefer the behavior of the mpegtsmux element in constant bitrate mode with regard to the the PCR sequences generated.

When bitrate > 0 and bitrate-sparse=true, the muxer will omit stuffing packets from its output while generating PCR values in an identical sequence to constant bitrate mode.

A new internal struct TsPacket was added to the muxer to keep the code almost the same as before but avoid the allocation of buffers that would be used for bit-stuffing when sparse bitrate mode is enabled.

Merge request reports