mpegtspacketizer: Avoid usage of GstBuffer internally
authorEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 21 May 2012 15:48:54 +0000 (17:48 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Tue, 22 May 2012 15:43:38 +0000 (17:43 +0200)
commitc6035d403cd9511ca1208ae13a664f37e5dd6ef4
tree18870a7b62ac7f6969888c13efa7bdd248dd9b56
parent6d01f5f1b3f14a29bd2cc16f8ddc452ff0928505
mpegtspacketizer: Avoid usage of GstBuffer internally

The overhead of creating/using 188 byte GstBuffer from GstAdapter
is too expensive.
We now peek the next packet, and provide a data/size which is only
valid until the packetizerpacket is cleared.

In addition, cleanup all the internal code to deal with that new
behaviour and remove double-checks which are no longer needed.

The section_length is now the corrected section_length (i.e. with
the additional 3 bytes).

Avoid using gst_adapter_prev_timestamp and instead track
the timestamp ourself.
gst/mpegtsdemux/mpegtspacketizer.c
gst/mpegtsdemux/mpegtspacketizer.h