From: <tp...@ke...> - 2007-11-07 15:54:03
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: tpm Date: Wed Nov 07 2007 15:54:07 UTC Log message: * gst/gst.c: (init_pre): * gst/gstdebugutils.c: (priv_gst_dump_dot_dir), (debug_dump_element), (_gst_debug_bin_to_dot_file): Move getenv() back into gst_init, so everyone can live happily ever after. Make sure the symbol isn't exported though. Modified files: . : ChangeLog gst : gst.c gstdebugutils.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.3524&r2=1.3525 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.248&r2=1.249 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstdebugutils.c.diff?r1=1.5&r2=1.6 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.3524 retrieving revision 1.3525 diff -u -d -r1.3524 -r1.3525 --- ChangeLog 6 Nov 2007 23:17:07 -0000 1.3524 +++ ChangeLog 7 Nov 2007 15:53:50 -0000 1.3525 @@ -1,3 +1,11 @@ +2007-11-07 Tim-Philipp Müller <tim at centricular dot net> + + * gst/gst.c: (init_pre): + * gst/gstdebugutils.c: (priv_gst_dump_dot_dir), (debug_dump_element), + (_gst_debug_bin_to_dot_file): + Move getenv() back into gst_init, so everyone can live happily + ever after. Make sure the symbol isn't exported though. 2007-11-06 Tim-Philipp Müller <tim at centricular dot net> Patch by: Sebastien Moutte <sebastien moutte net> Index: gst.c RCS file: /cvs/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.248 retrieving revision 1.249 diff -u -d -r1.248 -r1.249 --- gst.c 6 Nov 2007 15:10:35 -0000 1.248 +++ gst.c 7 Nov 2007 15:53:52 -0000 1.249 @@ -135,6 +135,10 @@ extern gint _gst_trace_on; +#ifndef GST_DISABLE_GST_DEBUG +extern const gchar *priv_gst_dump_dot_dir; +#endif /* defaults */ #ifdef HAVE_FORK #define DEFAULT_FORK TRUE @@ -585,6 +589,8 @@ parse_debug_list (debug_list); } } + priv_gst_dump_dot_dir = g_getenv ("GST_DEBUG_DUMP_DOT_DIR"); #endif /* This is the earliest we can make stuff show up in the logs. * So give some useful info about GStreamer here */ Index: gstdebugutils.c RCS file: /cvs/gstreamer/gstreamer/gst/gstdebugutils.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstdebugutils.c 6 Nov 2007 15:10:35 -0000 1.5 +++ gstdebugutils.c 7 Nov 2007 15:53:52 -0000 1.6 @@ -37,6 +37,8 @@ /*** PIPELINE GRAPHS **********************************************************/ +const gchar *priv_gst_dump_dot_dir; /* NULL *//* set from gst.c */ extern GstClockTime _priv_gst_info_start_time; static gchar * @@ -416,14 +418,12 @@ _gst_debug_bin_to_dot_file (GstBin * bin, GstDebugGraphDetails details, const gchar * file_name) { - const gchar *dump_dot_dir; gchar *full_file_name = NULL; FILE *out; g_return_if_fail (GST_IS_BIN (bin)); - dump_dot_dir = g_getenv ("GST_DEBUG_DUMP_DOT_DIR"); - if (!dump_dot_dir) + if (G_LIKELY (priv_gst_dump_dot_dir == NULL)) return; if (!file_name) { @@ -433,7 +433,7 @@ full_file_name = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s.dot", - dump_dot_dir, file_name); + priv_gst_dump_dot_dir, file_name); if ((out = fopen (full_file_name, "wb"))) { gchar *state_name = NULL; |