Skip to content

gstinfo: Allow passing a string identifier for debugging

Edward Hervey requested to merge bilboed/gstreamer:debug_id into main

This adds "id" variants to most debugging functions, and allows providing a string identifier instead of a GObject.

This allows providing unified and clearer debug logs for all the non-gobject-based items.

An added bonus is doing a lot less allocations, due to being able to directly use an id directly (and computing it more efficiently where possible).

Tested with heaptrack on a 5s flac file with GST_DEBUG=9 GST_DEBUG_FILE=/tmp/log gst-play-1.0 --use-playbin3 -q 5s.flac , the difference is:

total runtime: -0.43s.
calls to allocation functions: -349063 (811774/s)
temporary memory allocations: 2923 (-6797/s)
peak heap memory consumption: -25.93K
peak RSS (including heaptrack overhead): 0B
total memory leaked: -29.00K
Edited by Edward Hervey

Merge request reports