mpegtsmux: make "alignment" property more useful for packetisation
authorTim-Philipp Müller <tim@centricular.com>
Sat, 14 Mar 2015 15:27:39 +0000 (15:27 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 15 Mar 2015 12:07:03 +0000 (12:07 +0000)
commit09c05df8896db8859483c3aa70228aab87b5047c
treeb96e2c3077341dde4e6dd1c1305ca42092371a06
parent5a1ed14c3c56e24d1dbe716b41dc089d9cf19ea7
mpegtsmux: make "alignment" property more useful for packetisation

Currently the alignment property just makes sure that we
output things in multiples of align*packet_size bytes, but
with no clear maximum size. When streaming MPEG-TS over
UDP one wants buffers with a maximum packet size of 1316.
The alignment property so far would just output buffers
that are a multiple of 1316 then.

Instead we now make the alignment property output
individual buffers with the alignment size, which
is entirely backwards compatible with the expected
behaviour up until now. For efficiency reason
collect all those buffers in a buffer list and
send that downstream.

Also collect data to push downstream in a buffer
list from the adapter if we don't align things,
which is still more efficient because of the
silly way the muxer currently creates output
packets.

https://bugzilla.gnome.org/show_bug.cgi?id=722129
gst/mpegtsmux/mpegtsmux.c