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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 27 03:55:43 PST 2015


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

--- Comment #6 from Peter Urbanec <bugzilla.gnome.org at urbanec.net> ---
I don't think you can detect this reliably. You won't know at compile time or
at run time.

Consider the case where you have built gstreamer1.0 in the source directory /
natively. You then deploy a plugin that has been cross-compiled or built
out-of-tree.

The compile time test has no chance in this scenario. A run time test will also
have difficulty, since there is every chance that the first few
(hundred/thousand) calls will come from the code that uses only file name for
__FILE__ and then you start seeing calls from the plugin that has absolute path
names. In this scenario there's no benefit in doing any dynamic checks, all you
are doing is slowing down the code path.

On the other hand, just using the base name in every call to
gst_debug_log_valist will work fairly reliably. When called by the native,
in-source-tree code, there will be no transformation of __FILE__. When called
by the cross-compiled / out-of-tree plugin, the build environment path will be
stripped and the debug output will be a lot more legible.

Or, if you would like to take another point of view... It works just fine on
WIN32 and improves the quality of the debug output. Why deny the same benefit
to Linux users that happen to use embedded systems?

-- 
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