[Bug 745213] Shorten __FILE__ in gst_debug_log output on all platforms.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Feb 28 02:49:31 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=745213

--- Comment #11 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Created attachment 298150
  --> https://bugzilla.gnome.org/attachment.cgi?id=298150&action=edit
micro-optimisation: skip basename string ops if it doesn't look like a string
that needs shortening

Two suggestions:

a) above patch, which only calls the basename function if the string looks like
a path string that needs shortening.

b) as Edward noted, this code is called in all cases where the threshold
filtering in the macros doesn't avoid the call already (e.g. all categories at
all debug levels if we use GST_DEBUG=foo:9). Perhaps we should just move the
shortening into the default print function, so it's only actually done if
something gets printed. As this bug demonstrates, there has never been any
guarantee that a custom handler would always get a basename so far anyway, so
might as well move it IMHO.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list