[Bug 773092] gstinfo: Replace %p and %r in GST_DEBUG_FILE

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Oct 24 11:55:37 UTC 2016


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

--- Comment #3 from Stian Selnes (stianse) <stian.selnes at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #2)
> Is getpid() portable? Do we need different includes, configure checks, etc
> for this?

getpid() is already used in gstinfo.c by gst_debug_log_default(), so includes
and checks are already taken care of.

> You probably want to replace this with a fixed number of digits, e.g. %08x

Not completely sure what you're asking. "%p" and "%r" is what the user would
put in the env var GST_DEBUG_FILE. The patch implements the function
_replace_pattern_in_gst_debug_file_name() which will replace "%p" and "%r" with
a number of the format "%u". I don't think it's worth the added complexity to
allow the user to specify the format string (e.g. "%08r"). Changing "%u" to
something else can easily be done of course, but I think "%u" is what makes
most sense if the same format is to be used for both PID and a random int,
unless we want to add code to have different formats for them.

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