+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>
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
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 */
/*** PIPELINE GRAPHS **********************************************************/
+const gchar *priv_gst_dump_dot_dir; /* NULL *//* set from gst.c */
+
extern GstClockTime _priv_gst_info_start_time;
static gchar *
_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) {
}
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;