gstinfo: Optimize color escape code creation
authorEdward Hervey <edward@centricular.com>
Thu, 1 Dec 2022 07:16:45 +0000 (08:16 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 2 Dec 2022 06:02:48 +0000 (06:02 +0000)
commit9f9e6257769f8c1f6a9c0abd9790bc53eba46193
treeb7e6f57a789a2f23b3a1faa77cd4d598aa604da9
parent4b96294f19e5f6f6423e1a08119b443d7fa6ab13
gstinfo: Optimize color escape code creation

When coloring is in use, those escape codes are going to be created many times
for almost all debug lines.

Don't create plenty of temporary allocations, and instead build the escape code
ourselves statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3498>
subprojects/gstreamer/gst/gstinfo.c