mpegtspacketizer: Speed up descriptor parsing/packing
authorEdward Hervey <edward@collabora.com>
Wed, 5 Jun 2013 10:49:09 +0000 (12:49 +0200)
committerEdward Hervey <edward@collabora.com>
Wed, 5 Jun 2013 10:49:09 +0000 (12:49 +0200)
commitf3bf40e2b01a7bd9342465b7927900c2871f7727
tree06ddfd379cbfc7a9527dfa127a5df7d2b4381d1f
parente6f0986b9e9ebd5076538fa7ca0db8d7ba6e21f7
mpegtspacketizer: Speed up descriptor parsing/packing

descriptors are stored as a GValueArray of GString. The downside is
that there is no way to "pass" ownership of a GValue to a GValueArray
which previously resulted in expensive copy/free of the (already expensive)
GString.

Here we estimate first the size of the GValueArray, then create it,
then directly use the GValue of that array.

Speeds up total SI parsing by ~30%
gst/mpegtsdemux/mpegtspacketizer.c