102 #endif |
105 #endif |
103 #ifdef HAVE_PROCESS_H |
106 #ifdef HAVE_PROCESS_H |
104 # include <process.h> /* getpid on win32 */ |
107 # include <process.h> /* getpid on win32 */ |
105 #endif |
108 #endif |
106 #include <string.h> /* G_VA_COPY */ |
109 #include <string.h> /* G_VA_COPY */ |
|
110 #ifdef G_OS_WIN32 |
|
111 # define WIN32_LEAN_AND_MEAN /* prevents from including too many things */ |
|
112 # include <windows.h> /* GetStdHandle, windows console */ |
|
113 #endif |
107 |
114 |
108 #include "gst_private.h" |
115 #include "gst_private.h" |
109 #include "gstutils.h" |
116 #include "gstutils.h" |
|
117 #include "gstquark.h" |
110 #include "gstsegment.h" |
118 #include "gstsegment.h" |
111 #ifdef HAVE_VALGRIND |
119 #ifdef HAVE_VALGRIND_H |
112 # include <valgrind/valgrind.h> |
120 # include <valgrind/valgrind.h> |
113 #endif |
121 #endif |
114 #include <glib/gprintf.h> /* g_sprintf */ |
122 #include <glib/gprintf.h> /* g_sprintf */ |
115 |
123 #endif /* !GST_DISABLE_GST_DEBUG */ |
116 #ifdef __SYMBIAN32__ |
124 #ifdef __SYMBIAN32__ |
117 #include <glib_global.h> |
125 #include <glib_global.h> |
118 #endif |
126 |
|
127 #endif |
|
128 /* we want these symbols exported even if debug is disabled, to maintain |
|
129 * ABI compatibility. Unless GST_REMOVE_DISABLED is defined. */ |
|
130 #if !defined(GST_DISABLE_GST_DEBUG) || !defined(GST_REMOVE_DISABLED) |
|
131 |
|
132 /* disabled by default, as soon as some threshold is set > NONE, |
|
133 * it becomes enabled. */ |
|
134 gboolean __gst_debug_enabled = FALSE; |
|
135 EXPORT_C GstDebugLevel __gst_debug_min ;// = GST_LEVEL_NONE; |
|
136 |
|
137 EXPORT_C GstDebugCategory *GST_CAT_DEFAULT ;// = NULL; |
|
138 |
|
139 EXPORT_C GstDebugCategory *GST_CAT_GST_INIT ;// = NULL; |
|
140 EXPORT_C GstDebugCategory *GST_CAT_AUTOPLUG ;// = NULL; |
|
141 EXPORT_C GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT ;// = NULL; |
|
142 EXPORT_C GstDebugCategory *GST_CAT_PARENTAGE ;// = NULL; |
|
143 EXPORT_C GstDebugCategory *GST_CAT_STATES ;// = NULL; |
|
144 EXPORT_C GstDebugCategory *GST_CAT_SCHEDULING ;// = NULL; |
|
145 |
|
146 EXPORT_C GstDebugCategory *GST_CAT_BUFFER ;// = NULL; |
|
147 EXPORT_C GstDebugCategory *GST_CAT_BUFFER_LIST ;// = NULL; |
|
148 EXPORT_C GstDebugCategory *GST_CAT_BUS ;// = NULL; |
|
149 EXPORT_C GstDebugCategory *GST_CAT_CAPS ;// = NULL; |
|
150 EXPORT_C GstDebugCategory *GST_CAT_CLOCK ;// = NULL; |
|
151 EXPORT_C GstDebugCategory *GST_CAT_ELEMENT_PADS ;// = NULL; |
|
152 EXPORT_C GstDebugCategory *GST_CAT_PADS ;// = NULL; |
|
153 EXPORT_C GstDebugCategory *GST_CAT_PERFORMANCE ;// = NULL; |
|
154 EXPORT_C GstDebugCategory *GST_CAT_PIPELINE ;// = NULL; |
|
155 EXPORT_C GstDebugCategory *GST_CAT_PLUGIN_LOADING ;// = NULL; |
|
156 EXPORT_C GstDebugCategory *GST_CAT_PLUGIN_INFO ;// = NULL; |
|
157 EXPORT_C GstDebugCategory *GST_CAT_PROPERTIES ;// = NULL; |
|
158 EXPORT_C GstDebugCategory *GST_CAT_TYPES ;// = NULL; |
|
159 EXPORT_C GstDebugCategory *GST_CAT_XML ;// = NULL; |
|
160 EXPORT_C GstDebugCategory *GST_CAT_NEGOTIATION ;// = NULL; |
|
161 EXPORT_C GstDebugCategory *GST_CAT_REFCOUNTING ;// = NULL; |
|
162 EXPORT_C GstDebugCategory *GST_CAT_ERROR_SYSTEM ;// = NULL; |
|
163 EXPORT_C GstDebugCategory *GST_CAT_EVENT ;// = NULL; |
|
164 EXPORT_C GstDebugCategory *GST_CAT_MESSAGE ;// = NULL; |
|
165 EXPORT_C GstDebugCategory *GST_CAT_PARAMS ;// = NULL; |
|
166 EXPORT_C GstDebugCategory *GST_CAT_CALL_TRACE ;// = NULL; |
|
167 EXPORT_C GstDebugCategory *GST_CAT_SIGNAL ;// = NULL; |
|
168 EXPORT_C GstDebugCategory *GST_CAT_PROBE ;// = NULL; |
|
169 EXPORT_C GstDebugCategory *GST_CAT_REGISTRY ;// = NULL; |
|
170 EXPORT_C GstDebugCategory *GST_CAT_QOS ;// = NULL; |
|
171 |
|
172 #endif /* !defined(GST_DISABLE_GST_DEBUG) || !defined(GST_REMOVE_DISABLED) */ |
|
173 |
|
174 #ifndef GST_DISABLE_GST_DEBUG |
119 |
175 |
120 /* underscore is to prevent conflict with GST_CAT_DEBUG define */ |
176 /* underscore is to prevent conflict with GST_CAT_DEBUG define */ |
121 GST_DEBUG_CATEGORY_STATIC (_GST_CAT_DEBUG); |
177 GST_DEBUG_CATEGORY_STATIC (_GST_CAT_DEBUG); |
122 |
178 |
123 /* time of initialization, so we get useful debugging output times |
179 /* time of initialization, so we get useful debugging output times |
196 } |
257 } |
197 LogFuncEntry; |
258 LogFuncEntry; |
198 static GStaticMutex __log_func_mutex = G_STATIC_MUTEX_INIT; |
259 static GStaticMutex __log_func_mutex = G_STATIC_MUTEX_INIT; |
199 static GSList *__log_functions = NULL; |
260 static GSList *__log_functions = NULL; |
200 |
261 |
|
262 #define PRETTY_TAGS_DEFAULT TRUE |
|
263 static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; |
|
264 |
201 static gint __default_level; |
265 static gint __default_level; |
202 static gint __use_color; |
266 static gint __use_color; |
203 |
|
204 /* disabled by default, as soon as some threshold is set > NONE, |
|
205 * it becomes enabled. */ |
|
206 gboolean __gst_debug_enabled = FALSE; |
|
207 GstDebugLevel __gst_debug_min = GST_LEVEL_NONE; |
|
208 |
|
209 GstDebugCategory *GST_CAT_DEFAULT = NULL; |
|
210 |
|
211 GstDebugCategory *GST_CAT_GST_INIT = NULL; |
|
212 GstDebugCategory *GST_CAT_AUTOPLUG = NULL; |
|
213 GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT = NULL; |
|
214 GstDebugCategory *GST_CAT_PARENTAGE = NULL; |
|
215 GstDebugCategory *GST_CAT_STATES = NULL; |
|
216 GstDebugCategory *GST_CAT_SCHEDULING = NULL; |
|
217 |
|
218 GstDebugCategory *GST_CAT_BUFFER = NULL; |
|
219 GstDebugCategory *GST_CAT_BUS = NULL; |
|
220 GstDebugCategory *GST_CAT_CAPS = NULL; |
|
221 GstDebugCategory *GST_CAT_CLOCK = NULL; |
|
222 GstDebugCategory *GST_CAT_ELEMENT_PADS = NULL; |
|
223 GstDebugCategory *GST_CAT_PADS = NULL; |
|
224 GstDebugCategory *GST_CAT_PIPELINE = NULL; |
|
225 GstDebugCategory *GST_CAT_PLUGIN_LOADING = NULL; |
|
226 GstDebugCategory *GST_CAT_PLUGIN_INFO = NULL; |
|
227 GstDebugCategory *GST_CAT_PROPERTIES = NULL; |
|
228 GstDebugCategory *GST_CAT_TYPES = NULL; |
|
229 GstDebugCategory *GST_CAT_XML = NULL; |
|
230 GstDebugCategory *GST_CAT_NEGOTIATION = NULL; |
|
231 GstDebugCategory *GST_CAT_REFCOUNTING = NULL; |
|
232 GstDebugCategory *GST_CAT_ERROR_SYSTEM = NULL; |
|
233 GstDebugCategory *GST_CAT_EVENT = NULL; |
|
234 GstDebugCategory *GST_CAT_MESSAGE = NULL; |
|
235 GstDebugCategory *GST_CAT_PARAMS = NULL; |
|
236 GstDebugCategory *GST_CAT_CALL_TRACE = NULL; |
|
237 GstDebugCategory *GST_CAT_SIGNAL = NULL; |
|
238 GstDebugCategory *GST_CAT_PROBE = NULL; |
|
239 GstDebugCategory *GST_CAT_REGISTRY = NULL; |
|
240 GstDebugCategory *GST_CAT_QOS = NULL; |
|
241 |
267 |
242 /* FIXME: export this? */ |
268 /* FIXME: export this? */ |
243 #ifdef __SYMBIAN32__ |
269 #ifdef __SYMBIAN32__ |
244 EXPORT_C |
270 EXPORT_C |
245 #endif |
271 #endif |
287 #endif |
313 #endif |
288 |
314 |
289 void |
315 void |
290 _gst_debug_init (void) |
316 _gst_debug_init (void) |
291 { |
317 { |
292 gst_atomic_int_set (&__default_level, GST_LEVEL_DEFAULT); |
318 const gchar *env; |
293 gst_atomic_int_set (&__use_color, 1); |
319 |
294 |
320 g_atomic_int_set (&__default_level, GST_LEVEL_DEFAULT); |
|
321 #ifndef __SYMBIAN32__ |
|
322 g_atomic_int_set (&__use_color, 1); |
|
323 #else |
|
324 g_atomic_int_set (&__use_color, 0); |
|
325 #endif |
295 /* get time we started for debugging messages */ |
326 /* get time we started for debugging messages */ |
296 _priv_gst_info_start_time = gst_util_get_timestamp (); |
327 _priv_gst_info_start_time = gst_util_get_timestamp (); |
297 |
328 |
298 #ifdef HAVE_PRINTF_EXTENSION |
329 #ifdef HAVE_PRINTF_EXTENSION |
|
330 #if HAVE_REGISTER_PRINTF_SPECIFIER |
|
331 register_printf_specifier (GST_PTR_FORMAT[0], _gst_info_printf_extension_ptr, |
|
332 _gst_info_printf_extension_arginfo); |
|
333 register_printf_specifier (GST_SEGMENT_FORMAT[0], |
|
334 _gst_info_printf_extension_segment, _gst_info_printf_extension_arginfo); |
|
335 #else |
299 register_printf_function (GST_PTR_FORMAT[0], _gst_info_printf_extension_ptr, |
336 register_printf_function (GST_PTR_FORMAT[0], _gst_info_printf_extension_ptr, |
300 _gst_info_printf_extension_arginfo); |
337 _gst_info_printf_extension_arginfo); |
301 register_printf_function (GST_SEGMENT_FORMAT[0], |
338 register_printf_function (GST_SEGMENT_FORMAT[0], |
302 _gst_info_printf_extension_segment, _gst_info_printf_extension_arginfo); |
339 _gst_info_printf_extension_segment, _gst_info_printf_extension_arginfo); |
|
340 #endif |
303 #endif |
341 #endif |
304 |
342 |
305 /* do NOT use a single debug function before this line has been run */ |
343 /* do NOT use a single debug function before this line has been run */ |
306 GST_CAT_DEFAULT = _gst_debug_category_new ("default", |
344 GST_CAT_DEFAULT = _gst_debug_category_new ("default", |
307 GST_DEBUG_UNDERLINE, NULL); |
345 GST_DEBUG_UNDERLINE, NULL); |
323 GST_DEBUG_BOLD | GST_DEBUG_FG_RED, NULL); |
361 GST_DEBUG_BOLD | GST_DEBUG_FG_RED, NULL); |
324 GST_CAT_SCHEDULING = _gst_debug_category_new ("GST_SCHEDULING", |
362 GST_CAT_SCHEDULING = _gst_debug_category_new ("GST_SCHEDULING", |
325 GST_DEBUG_BOLD | GST_DEBUG_FG_MAGENTA, NULL); |
363 GST_DEBUG_BOLD | GST_DEBUG_FG_MAGENTA, NULL); |
326 GST_CAT_BUFFER = _gst_debug_category_new ("GST_BUFFER", |
364 GST_CAT_BUFFER = _gst_debug_category_new ("GST_BUFFER", |
327 GST_DEBUG_BOLD | GST_DEBUG_BG_GREEN, NULL); |
365 GST_DEBUG_BOLD | GST_DEBUG_BG_GREEN, NULL); |
|
366 GST_CAT_BUFFER_LIST = _gst_debug_category_new ("GST_BUFFER_LIST", |
|
367 GST_DEBUG_BOLD | GST_DEBUG_BG_GREEN, NULL); |
328 GST_CAT_BUS = _gst_debug_category_new ("GST_BUS", GST_DEBUG_BG_YELLOW, NULL); |
368 GST_CAT_BUS = _gst_debug_category_new ("GST_BUS", GST_DEBUG_BG_YELLOW, NULL); |
329 GST_CAT_CAPS = _gst_debug_category_new ("GST_CAPS", |
369 GST_CAT_CAPS = _gst_debug_category_new ("GST_CAPS", |
330 GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, NULL); |
370 GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, NULL); |
331 GST_CAT_CLOCK = _gst_debug_category_new ("GST_CLOCK", |
371 GST_CAT_CLOCK = _gst_debug_category_new ("GST_CLOCK", |
332 GST_DEBUG_BOLD | GST_DEBUG_FG_YELLOW, NULL); |
372 GST_DEBUG_BOLD | GST_DEBUG_FG_YELLOW, NULL); |
333 GST_CAT_ELEMENT_PADS = _gst_debug_category_new ("GST_ELEMENT_PADS", |
373 GST_CAT_ELEMENT_PADS = _gst_debug_category_new ("GST_ELEMENT_PADS", |
334 GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); |
374 GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); |
335 GST_CAT_PADS = _gst_debug_category_new ("GST_PADS", |
375 GST_CAT_PADS = _gst_debug_category_new ("GST_PADS", |
|
376 GST_DEBUG_BOLD | GST_DEBUG_FG_RED | GST_DEBUG_BG_RED, NULL); |
|
377 GST_CAT_PERFORMANCE = _gst_debug_category_new ("GST_PERFORMANCE", |
336 GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); |
378 GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); |
337 GST_CAT_PIPELINE = _gst_debug_category_new ("GST_PIPELINE", |
379 GST_CAT_PIPELINE = _gst_debug_category_new ("GST_PIPELINE", |
338 GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); |
380 GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); |
339 GST_CAT_PLUGIN_LOADING = _gst_debug_category_new ("GST_PLUGIN_LOADING", |
381 GST_CAT_PLUGIN_LOADING = _gst_debug_category_new ("GST_PLUGIN_LOADING", |
340 GST_DEBUG_BOLD | GST_DEBUG_FG_CYAN, NULL); |
382 GST_DEBUG_BOLD | GST_DEBUG_FG_CYAN, NULL); |
472 message->message = g_strdup_vprintf (message->format, message->arguments); |
539 message->message = g_strdup_vprintf (message->format, message->arguments); |
473 } |
540 } |
474 return message->message; |
541 return message->message; |
475 } |
542 } |
476 |
543 |
|
544 #define MAX_BUFFER_DUMP_STRING_LEN 100 |
|
545 |
|
546 /* structure_to_pretty_string: |
|
547 * @structure: a #GstStructure |
|
548 * |
|
549 * Converts @structure to a human-readable string representation. Basically |
|
550 * the same as gst_structure_to_string(), but if the structure contains large |
|
551 * buffers such as images the hex representation of those buffers will be |
|
552 * shortened so that the string remains readable. |
|
553 * |
|
554 * Returns: a newly-allocated string. g_free() when no longer needed. |
|
555 */ |
|
556 static gchar * |
|
557 structure_to_pretty_string (const GstStructure * s) |
|
558 { |
|
559 gchar *str, *pos, *end; |
|
560 |
|
561 str = gst_structure_to_string (s); |
|
562 if (str == NULL) |
|
563 return NULL; |
|
564 |
|
565 pos = str; |
|
566 while ((pos = strstr (pos, "(buffer)"))) { |
|
567 guint count = 0; |
|
568 |
|
569 pos += strlen ("(buffer)"); |
|
570 for (end = pos; *end != '\0' && *end != ';' && *end != ' '; ++end) |
|
571 ++count; |
|
572 if (count > MAX_BUFFER_DUMP_STRING_LEN) { |
|
573 memcpy (pos + MAX_BUFFER_DUMP_STRING_LEN - 6, "..", 2); |
|
574 memcpy (pos + MAX_BUFFER_DUMP_STRING_LEN - 4, pos + count - 4, 4); |
|
575 g_memmove (pos + MAX_BUFFER_DUMP_STRING_LEN, pos + count, |
|
576 strlen (pos + count) + 1); |
|
577 pos += MAX_BUFFER_DUMP_STRING_LEN; |
|
578 } |
|
579 } |
|
580 |
|
581 return str; |
|
582 } |
|
583 |
|
584 static inline gchar * |
|
585 gst_info_structure_to_string (GstStructure * s) |
|
586 { |
|
587 if (G_UNLIKELY (pretty_tags && s->name == GST_QUARK (TAGLIST))) |
|
588 return structure_to_pretty_string (s); |
|
589 else |
|
590 return gst_structure_to_string (s); |
|
591 } |
477 |
592 |
478 static gchar * |
593 static gchar * |
479 gst_debug_print_object (gpointer ptr) |
594 gst_debug_print_object (gpointer ptr) |
480 { |
595 { |
481 GObject *object = (GObject *) ptr; |
596 GObject *object = (GObject *) ptr; |
520 if (GST_IS_MESSAGE (object)) { |
635 if (GST_IS_MESSAGE (object)) { |
521 GstMessage *msg = GST_MESSAGE_CAST (object); |
636 GstMessage *msg = GST_MESSAGE_CAST (object); |
522 gchar *s, *ret; |
637 gchar *s, *ret; |
523 |
638 |
524 if (msg->structure) { |
639 if (msg->structure) { |
525 s = gst_structure_to_string (msg->structure); |
640 s = gst_info_structure_to_string (msg->structure); |
526 } else { |
641 } else { |
527 s = g_strdup ("(NULL)"); |
642 s = g_strdup ("(NULL)"); |
528 } |
643 } |
529 |
644 |
530 ret = g_strdup_printf ("%s message from element '%s': %s", |
645 ret = g_strdup_printf ("%s message from element '%s': %s", |
531 GST_MESSAGE_TYPE_NAME (msg), (msg->src != NULL) ? |
646 GST_MESSAGE_TYPE_NAME (msg), (msg->src != NULL) ? |
532 GST_ELEMENT_NAME (msg->src) : "(NULL)", s); |
647 GST_ELEMENT_NAME (msg->src) : "(NULL)", s); |
533 g_free (s); |
648 g_free (s); |
534 return ret; |
649 return ret; |
|
650 } |
|
651 if (GST_IS_QUERY (object)) { |
|
652 GstQuery *query = GST_QUERY_CAST (object); |
|
653 |
|
654 if (query->structure) { |
|
655 return gst_info_structure_to_string (query->structure); |
|
656 } else { |
|
657 const gchar *query_type_name; |
|
658 |
|
659 query_type_name = gst_query_type_get_name (query->type); |
|
660 if (G_LIKELY (query_type_name != NULL)) { |
|
661 return g_strdup_printf ("%s query", query_type_name); |
|
662 } else { |
|
663 return g_strdup_printf ("query of unknown type %d", query->type); |
|
664 } |
|
665 } |
535 } |
666 } |
536 |
667 |
537 return g_strdup_printf ("%p", ptr); |
668 return g_strdup_printf ("%p", ptr); |
538 } |
669 } |
539 |
670 |
621 |
752 |
622 return g_string_free (color, FALSE); |
753 return g_string_free (color, FALSE); |
623 } |
754 } |
624 |
755 |
625 /** |
756 /** |
|
757 * gst_debug_construct_win_color: |
|
758 * @colorinfo: the color info |
|
759 * |
|
760 * Constructs an integer that can be used for getting the desired color in |
|
761 * windows' terminals (cmd.exe). As there is no mean to underline, we simply |
|
762 * ignore this attribute. |
|
763 * |
|
764 * This function returns 0 on non-windows machines. |
|
765 * |
|
766 * Returns: an integer containing the color definition |
|
767 * |
|
768 * Since: 0.10.23 |
|
769 */ |
|
770 #ifdef __SYMBIAN32__ |
|
771 EXPORT_C |
|
772 #endif |
|
773 |
|
774 gint |
|
775 gst_debug_construct_win_color (guint colorinfo) |
|
776 { |
|
777 gint color = 0; |
|
778 #ifdef G_OS_WIN32 |
|
779 static const guchar ansi_to_win_fg[8] = { |
|
780 0, /* black */ |
|
781 FOREGROUND_RED, /* red */ |
|
782 FOREGROUND_GREEN, /* green */ |
|
783 FOREGROUND_RED | FOREGROUND_GREEN, /* yellow */ |
|
784 FOREGROUND_BLUE, /* blue */ |
|
785 FOREGROUND_RED | FOREGROUND_BLUE, /* magenta */ |
|
786 FOREGROUND_GREEN | FOREGROUND_BLUE, /* cyan */ |
|
787 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE /* white */ |
|
788 }; |
|
789 static const guchar ansi_to_win_bg[8] = { |
|
790 0, |
|
791 BACKGROUND_RED, |
|
792 BACKGROUND_GREEN, |
|
793 BACKGROUND_RED | BACKGROUND_GREEN, |
|
794 BACKGROUND_BLUE, |
|
795 BACKGROUND_RED | BACKGROUND_BLUE, |
|
796 BACKGROUND_GREEN | FOREGROUND_BLUE, |
|
797 BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE |
|
798 }; |
|
799 |
|
800 /* we draw black as white, as cmd.exe can only have black bg */ |
|
801 if (colorinfo == 0) { |
|
802 return ansi_to_win_fg[7]; |
|
803 } |
|
804 |
|
805 if (colorinfo & GST_DEBUG_BOLD) { |
|
806 color |= FOREGROUND_INTENSITY; |
|
807 } |
|
808 if (colorinfo & GST_DEBUG_FG_MASK) { |
|
809 color |= ansi_to_win_fg[colorinfo & GST_DEBUG_FG_MASK]; |
|
810 } |
|
811 if (colorinfo & GST_DEBUG_BG_MASK) { |
|
812 color |= ansi_to_win_bg[(colorinfo & GST_DEBUG_BG_MASK) >> 4]; |
|
813 } |
|
814 #endif |
|
815 return color; |
|
816 } |
|
817 |
|
818 /* width of %p varies depending on actual value of pointer, which can make |
|
819 * output unevenly aligned if multiple threads are involved, hence the %14p |
|
820 * (should really be %18p, but %14p seems a good compromise between too many |
|
821 * white spaces and likely unalignment on my system) */ |
|
822 #if defined (GLIB_SIZEOF_VOID_P) && GLIB_SIZEOF_VOID_P == 8 |
|
823 #define PTR_FMT "%14p" |
|
824 #else |
|
825 #define PTR_FMT "%10p" |
|
826 #endif |
|
827 #define PID_FMT "%5d" |
|
828 #define CAT_FMT "%20s %s:%d:%s:%s" |
|
829 |
|
830 #ifdef G_OS_WIN32 |
|
831 static const guchar levelcolormap[GST_LEVEL_COUNT] = { |
|
832 /* GST_LEVEL_NONE */ |
|
833 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE, |
|
834 /* GST_LEVEL_ERROR */ |
|
835 FOREGROUND_RED | FOREGROUND_INTENSITY, |
|
836 /* GST_LEVEL_WARNING */ |
|
837 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY, |
|
838 /* GST_LEVEL_INFO */ |
|
839 FOREGROUND_GREEN | FOREGROUND_INTENSITY, |
|
840 /* GST_LEVEL_DEBUG */ |
|
841 FOREGROUND_GREEN | FOREGROUND_BLUE, |
|
842 /* GST_LEVEL_LOG */ |
|
843 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE, |
|
844 /* GST_LEVEL_FIXME */ |
|
845 FOREGROUND_RED | FOREGROUND_GREEN, |
|
846 /* placeholder for log level 7 */ |
|
847 0, |
|
848 /* placeholder for log level 8 */ |
|
849 0, |
|
850 /* GST_LEVEL_MEMDUMP */ |
|
851 FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE |
|
852 }; |
|
853 |
|
854 static const guchar available_colors[] = { |
|
855 FOREGROUND_RED, FOREGROUND_GREEN, FOREGROUND_RED | FOREGROUND_GREEN, |
|
856 FOREGROUND_BLUE, FOREGROUND_RED | FOREGROUND_BLUE, |
|
857 FOREGROUND_GREEN | FOREGROUND_BLUE, |
|
858 }; |
|
859 #else |
|
860 static const gchar *levelcolormap[GST_LEVEL_COUNT] = { |
|
861 "\033[37m", /* GST_LEVEL_NONE */ |
|
862 "\033[31;01m", /* GST_LEVEL_ERROR */ |
|
863 "\033[33;01m", /* GST_LEVEL_WARNING */ |
|
864 "\033[32;01m", /* GST_LEVEL_INFO */ |
|
865 "\033[36m", /* GST_LEVEL_DEBUG */ |
|
866 "\033[37m", /* GST_LEVEL_LOG */ |
|
867 "\033[33;01m", /* GST_LEVEL_FIXME */ |
|
868 "\033[37m", /* placeholder for log level 7 */ |
|
869 "\033[37m", /* placeholder for log level 8 */ |
|
870 "\033[37m" /* GST_LEVEL_MEMDUMP */ |
|
871 }; |
|
872 #endif |
|
873 |
|
874 /** |
626 * gst_debug_log_default: |
875 * gst_debug_log_default: |
627 * @category: category to log |
876 * @category: category to log |
628 * @level: level of the message |
877 * @level: level of the message |
629 * @file: the file that emitted the message, usually the __FILE__ identifier |
878 * @file: the file that emitted the message, usually the __FILE__ identifier |
630 * @function: the function that emitted the message |
879 * @function: the function that emitted the message |
647 void |
896 void |
648 gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, |
897 gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, |
649 const gchar * file, const gchar * function, gint line, |
898 const gchar * file, const gchar * function, gint line, |
650 GObject * object, GstDebugMessage * message, gpointer unused) |
899 GObject * object, GstDebugMessage * message, gpointer unused) |
651 { |
900 { |
652 gchar *color = NULL; |
|
653 gchar *clear; |
|
654 gchar *obj = NULL; |
|
655 gchar pidcolor[10]; |
|
656 const gchar *levelcolor; |
|
657 gint pid; |
901 gint pid; |
658 GstClockTime elapsed; |
902 GstClockTime elapsed; |
659 gboolean free_color = TRUE; |
903 gchar *obj = NULL; |
660 gboolean free_obj = TRUE; |
904 gboolean free_obj = TRUE; |
661 static const gchar *levelcolormap[] = { |
905 gboolean is_colored; |
662 "\033[37m", /* GST_LEVEL_NONE */ |
|
663 "\033[31;01m", /* GST_LEVEL_ERROR */ |
|
664 "\033[33;01m", /* GST_LEVEL_WARNING */ |
|
665 "\033[32;01m", /* GST_LEVEL_INFO */ |
|
666 "\033[36m", /* GST_LEVEL_DEBUG */ |
|
667 "\033[37m" /* GST_LEVEL_LOG */ |
|
668 }; |
|
669 |
906 |
670 if (level > gst_debug_category_get_threshold (category)) |
907 if (level > gst_debug_category_get_threshold (category)) |
671 return; |
908 return; |
672 |
909 |
673 pid = getpid (); |
910 pid = getpid (); |
674 |
911 is_colored = gst_debug_is_colored (); |
675 /* color info */ |
912 |
676 if (gst_debug_is_colored ()) { |
913 elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time, |
|
914 gst_util_get_timestamp ()); |
|
915 |
|
916 if (object) { |
|
917 obj = gst_debug_print_object (object); |
|
918 } else { |
|
919 obj = "\0"; |
|
920 free_obj = FALSE; |
|
921 } |
|
922 |
|
923 if (is_colored) { |
|
924 #ifndef G_OS_WIN32 |
|
925 /* colors, non-windows */ |
|
926 gchar *color = NULL; |
|
927 gchar *clear; |
|
928 gchar pidcolor[10]; |
|
929 const gchar *levelcolor; |
|
930 |
677 color = gst_debug_construct_term_color (gst_debug_category_get_color |
931 color = gst_debug_construct_term_color (gst_debug_category_get_color |
678 (category)); |
932 (category)); |
679 clear = "\033[00m"; |
933 clear = "\033[00m"; |
680 g_sprintf (pidcolor, "\033[3%1dm", pid % 6 + 31); |
934 g_sprintf (pidcolor, "\033[3%1dm", pid % 6 + 31); |
681 levelcolor = levelcolormap[level]; |
935 levelcolor = levelcolormap[level]; |
|
936 |
|
937 #ifdef __SYMBIAN32__ |
|
938 g_printerr ("%" GST_TIME_FORMAT |
|
939 " %s%5d%s %10p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", GST_TIME_ARGS (elapsed), |
|
940 pidcolor, pid, clear, g_thread_self (), levelcolor, |
|
941 gst_debug_level_get_name (level), clear, color, |
|
942 gst_debug_category_get_name (category), file, line, function, obj, clear, |
|
943 gst_debug_message_get (message)); |
|
944 #else |
|
945 #define PRINT_FMT " %s"PID_FMT"%s "PTR_FMT" %s%s%s %s"CAT_FMT"%s %s\n" |
|
946 g_printerr ("%" GST_TIME_FORMAT PRINT_FMT, GST_TIME_ARGS (elapsed), |
|
947 pidcolor, pid, clear, g_thread_self (), levelcolor, |
|
948 gst_debug_level_get_name (level), clear, color, |
|
949 gst_debug_category_get_name (category), file, line, function, obj, |
|
950 clear, gst_debug_message_get (message)); |
|
951 #undef PRINT_FMT |
|
952 #endif //__SYMBIAN32__ |
|
953 |
|
954 g_free (color); |
|
955 #else |
|
956 /* colors, windows. We take a lock to keep colors and content together. |
|
957 * Maybe there is a better way but for now this will do the right |
|
958 * thing. */ |
|
959 static GStaticMutex win_print_mutex = G_STATIC_MUTEX_INIT; |
|
960 const gint clear = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; |
|
961 #define SET_COLOR(c) \ |
|
962 SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), (c)); |
|
963 g_static_mutex_lock (&win_print_mutex); |
|
964 /* timestamp */ |
|
965 g_printerr ("%" GST_TIME_FORMAT " ", GST_TIME_ARGS (elapsed)); |
|
966 /* pid */ |
|
967 SET_COLOR (available_colors[pid % G_N_ELEMENTS (available_colors)]); |
|
968 g_printerr (PID_FMT, pid); |
|
969 /* thread */ |
|
970 SET_COLOR (clear); |
|
971 g_printerr (" " PTR_FMT " ", g_thread_self ()); |
|
972 /* level */ |
|
973 SET_COLOR (levelcolormap[level]); |
|
974 g_printerr ("%s ", gst_debug_level_get_name (level)); |
|
975 /* category */ |
|
976 SET_COLOR (gst_debug_construct_win_color (gst_debug_category_get_color |
|
977 (category))); |
|
978 g_printerr (CAT_FMT, gst_debug_category_get_name (category), |
|
979 file, line, function, obj); |
|
980 /* message */ |
|
981 SET_COLOR (clear); |
|
982 g_printerr (" %s\n", gst_debug_message_get (message)); |
|
983 g_static_mutex_unlock (&win_print_mutex); |
|
984 #endif |
682 } else { |
985 } else { |
683 color = "\0"; |
986 /* no color, all platforms */ |
684 free_color = FALSE; |
987 #define PRINT_FMT " "PID_FMT" "PTR_FMT" %s "CAT_FMT" %s\n" |
685 clear = ""; |
988 g_printerr ("%" GST_TIME_FORMAT PRINT_FMT, GST_TIME_ARGS (elapsed), pid, |
686 pidcolor[0] = '\0'; |
989 g_thread_self (), gst_debug_level_get_name (level), |
687 levelcolor = "\0"; |
990 gst_debug_category_get_name (category), file, line, function, obj, |
688 } |
991 gst_debug_message_get (message)); |
689 |
992 #undef PRINT_FMT |
690 if (object) { |
993 } |
691 obj = gst_debug_print_object (object); |
994 |
692 } else { |
|
693 obj = "\0"; |
|
694 free_obj = FALSE; |
|
695 } |
|
696 |
|
697 elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time, |
|
698 gst_util_get_timestamp ()); |
|
699 |
|
700 /* |
|
701 g_printerr ("%s (%p - %" GST_TIME_FORMAT ") %s%20s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n", |
|
702 gst_debug_level_get_name (level), g_thread_self (), |
|
703 GST_TIME_ARGS (elapsed), color, |
|
704 gst_debug_category_get_name (category), clear, pidcolor, pid, clear, |
|
705 color, file, line, function, obj, clear, gst_debug_message_get (message)); |
|
706 */ |
|
707 |
|
708 g_printerr ("%" GST_TIME_FORMAT |
|
709 " %s%5d%s %p %s%s%s %s%20s %s:%d:%s:%s%s %s\n", GST_TIME_ARGS (elapsed), |
|
710 pidcolor, pid, clear, g_thread_self (), levelcolor, |
|
711 gst_debug_level_get_name (level), clear, color, |
|
712 gst_debug_category_get_name (category), file, line, function, obj, clear, |
|
713 gst_debug_message_get (message)); |
|
714 |
|
715 if (free_color) |
|
716 g_free (color); |
|
717 if (free_obj) |
995 if (free_obj) |
718 g_free (obj); |
996 g_free (obj); |
719 } |
997 } |
720 |
998 |
721 /** |
999 /** |
1425 |
1731 |
1426 g_free (buffer); |
1732 g_free (buffer); |
1427 return len; |
1733 return len; |
1428 } |
1734 } |
1429 |
1735 |
|
1736 #if HAVE_REGISTER_PRINTF_SPECIFIER |
|
1737 static int |
|
1738 _gst_info_printf_extension_arginfo (const struct printf_info *info, size_t n, |
|
1739 int *argtypes, int *size) |
|
1740 #else |
1430 static int |
1741 static int |
1431 _gst_info_printf_extension_arginfo (const struct printf_info *info, size_t n, |
1742 _gst_info_printf_extension_arginfo (const struct printf_info *info, size_t n, |
1432 int *argtypes) |
1743 int *argtypes) |
1433 { |
1744 #endif |
1434 if (n > 0) |
1745 { |
|
1746 if (n > 0) { |
1435 argtypes[0] = PA_POINTER; |
1747 argtypes[0] = PA_POINTER; |
|
1748 #if HAVE_REGISTER_PRINTF_SPECIFIER |
|
1749 *size = sizeof (gpointer); |
|
1750 #endif |
|
1751 } |
1436 return 1; |
1752 return 1; |
1437 } |
1753 } |
1438 #endif /* HAVE_PRINTF_EXTENSION */ |
1754 #endif /* HAVE_PRINTF_EXTENSION */ |
1439 |
1755 |
|
1756 static void |
|
1757 gst_info_dump_mem_line (gchar * linebuf, gsize linebuf_size, |
|
1758 const guint8 * mem, gsize mem_offset, gsize mem_size) |
|
1759 { |
|
1760 gchar hexstr[50], ascstr[18], digitstr[4]; |
|
1761 |
|
1762 if (mem_size > 16) |
|
1763 mem_size = 16; |
|
1764 |
|
1765 hexstr[0] = '\0'; |
|
1766 ascstr[0] = '\0'; |
|
1767 |
|
1768 if (mem != NULL) { |
|
1769 guint i = 0; |
|
1770 |
|
1771 mem += mem_offset; |
|
1772 while (i < mem_size) { |
|
1773 ascstr[i] = (g_ascii_isprint (mem[i])) ? mem[i] : '.'; |
|
1774 g_snprintf (digitstr, sizeof (digitstr), "%02x ", mem[i]); |
|
1775 g_strlcat (hexstr, digitstr, sizeof (hexstr)); |
|
1776 ++i; |
|
1777 } |
|
1778 ascstr[i] = '\0'; |
|
1779 } |
|
1780 |
|
1781 g_snprintf (linebuf, linebuf_size, "%08x: %-48.48s %-16.16s", |
|
1782 (guint) mem_offset, hexstr, ascstr); |
|
1783 } |
|
1784 #ifdef __SYMBIAN32__ |
|
1785 EXPORT_C |
|
1786 #endif |
|
1787 |
|
1788 |
|
1789 void |
|
1790 _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file, |
|
1791 const gchar * func, gint line, GObject * obj, const gchar * msg, |
|
1792 const guint8 * data, guint length) |
|
1793 { |
|
1794 guint off = 0; |
|
1795 |
|
1796 gst_debug_log ((cat), GST_LEVEL_MEMDUMP, file, func, line, obj, "--------" |
|
1797 "-------------------------------------------------------------------"); |
|
1798 |
|
1799 if (msg != NULL && *msg != '\0') { |
|
1800 gst_debug_log ((cat), GST_LEVEL_MEMDUMP, file, func, line, obj, msg); |
|
1801 } |
|
1802 |
|
1803 while (off < length) { |
|
1804 gchar buf[128]; |
|
1805 |
|
1806 /* gst_info_dump_mem_line will process 16 bytes at most */ |
|
1807 gst_info_dump_mem_line (buf, sizeof (buf), data, off, length - off); |
|
1808 gst_debug_log (cat, GST_LEVEL_MEMDUMP, file, func, line, obj, "%s", buf); |
|
1809 off += 16; |
|
1810 } |
|
1811 |
|
1812 gst_debug_log ((cat), GST_LEVEL_MEMDUMP, file, func, line, obj, "--------" |
|
1813 "-------------------------------------------------------------------"); |
|
1814 } |
|
1815 |
1440 #else /* !GST_DISABLE_GST_DEBUG */ |
1816 #else /* !GST_DISABLE_GST_DEBUG */ |
|
1817 #ifdef GST_REMOVE_DISABLED |
|
1818 |
|
1819 GstDebugCategory * |
|
1820 _gst_debug_category_new (const gchar * name, guint color, |
|
1821 const gchar * description) |
|
1822 { |
|
1823 return NULL; |
|
1824 } |
|
1825 #ifdef __SYMBIAN32__ |
|
1826 EXPORT_C |
|
1827 #endif |
|
1828 |
|
1829 |
|
1830 void |
|
1831 _gst_debug_register_funcptr (gpointer func, const gchar * ptrname) |
|
1832 { |
|
1833 } |
|
1834 |
|
1835 /* This function MUST NOT return NULL */ |
|
1836 #ifdef __SYMBIAN32__ |
|
1837 EXPORT_C |
|
1838 #endif |
|
1839 |
|
1840 const gchar * |
|
1841 _gst_debug_nameof_funcptr (gpointer func) |
|
1842 { |
|
1843 return "(NULL)"; |
|
1844 } |
|
1845 #ifdef __SYMBIAN32__ |
|
1846 EXPORT_C |
|
1847 #endif |
|
1848 |
|
1849 |
|
1850 void |
|
1851 gst_debug_log (GstDebugCategory * category, GstDebugLevel level, |
|
1852 const gchar * file, const gchar * function, gint line, |
|
1853 GObject * object, const gchar * format, ...) |
|
1854 { |
|
1855 } |
|
1856 #ifdef __SYMBIAN32__ |
|
1857 EXPORT_C |
|
1858 #endif |
|
1859 |
|
1860 |
|
1861 void |
|
1862 gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level, |
|
1863 const gchar * file, const gchar * function, gint line, |
|
1864 GObject * object, const gchar * format, va_list args) |
|
1865 { |
|
1866 } |
|
1867 #ifdef __SYMBIAN32__ |
|
1868 EXPORT_C |
|
1869 #endif |
|
1870 |
|
1871 |
|
1872 const gchar * |
|
1873 gst_debug_message_get (GstDebugMessage * message) |
|
1874 { |
|
1875 return ""; |
|
1876 } |
|
1877 #ifdef __SYMBIAN32__ |
|
1878 EXPORT_C |
|
1879 #endif |
|
1880 |
|
1881 |
|
1882 void |
|
1883 gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, |
|
1884 const gchar * file, const gchar * function, gint line, |
|
1885 GObject * object, GstDebugMessage * message, gpointer unused) |
|
1886 { |
|
1887 } |
|
1888 #ifdef __SYMBIAN32__ |
|
1889 EXPORT_C |
|
1890 #endif |
|
1891 |
|
1892 |
|
1893 G_CONST_RETURN gchar * |
|
1894 gst_debug_level_get_name (GstDebugLevel level) |
|
1895 { |
|
1896 return "NONE"; |
|
1897 } |
|
1898 #ifdef __SYMBIAN32__ |
|
1899 EXPORT_C |
|
1900 #endif |
|
1901 |
|
1902 |
|
1903 void |
|
1904 gst_debug_add_log_function (GstLogFunction func, gpointer data) |
|
1905 { |
|
1906 } |
|
1907 #ifdef __SYMBIAN32__ |
|
1908 EXPORT_C |
|
1909 #endif |
|
1910 |
|
1911 |
1441 guint |
1912 guint |
1442 gst_debug_remove_log_function (GstLogFunction func) |
1913 gst_debug_remove_log_function (GstLogFunction func) |
1443 { |
1914 { |
1444 return 0; |
1915 return 0; |
1445 } |
1916 } |
|
1917 #ifdef __SYMBIAN32__ |
|
1918 EXPORT_C |
|
1919 #endif |
|
1920 |
1446 |
1921 |
1447 guint |
1922 guint |
1448 gst_debug_remove_log_function_by_data (gpointer data) |
1923 gst_debug_remove_log_function_by_data (gpointer data) |
1449 { |
1924 { |
1450 return 0; |
1925 return 0; |
1451 } |
1926 } |
|
1927 #ifdef __SYMBIAN32__ |
|
1928 EXPORT_C |
|
1929 #endif |
|
1930 |
|
1931 |
|
1932 void |
|
1933 gst_debug_set_active (gboolean active) |
|
1934 { |
|
1935 } |
|
1936 #ifdef __SYMBIAN32__ |
|
1937 EXPORT_C |
|
1938 #endif |
|
1939 |
|
1940 |
|
1941 gboolean |
|
1942 gst_debug_is_active (void) |
|
1943 { |
|
1944 return FALSE; |
|
1945 } |
|
1946 #ifdef __SYMBIAN32__ |
|
1947 EXPORT_C |
|
1948 #endif |
|
1949 |
|
1950 |
|
1951 void |
|
1952 gst_debug_set_colored (gboolean colored) |
|
1953 { |
|
1954 } |
|
1955 #ifdef __SYMBIAN32__ |
|
1956 EXPORT_C |
|
1957 #endif |
|
1958 |
|
1959 |
|
1960 gboolean |
|
1961 gst_debug_is_colored (void) |
|
1962 { |
|
1963 return FALSE; |
|
1964 } |
|
1965 #ifdef __SYMBIAN32__ |
|
1966 EXPORT_C |
|
1967 #endif |
|
1968 |
|
1969 |
|
1970 void |
|
1971 gst_debug_set_default_threshold (GstDebugLevel level) |
|
1972 { |
|
1973 } |
|
1974 #ifdef __SYMBIAN32__ |
|
1975 EXPORT_C |
|
1976 #endif |
|
1977 |
|
1978 |
|
1979 GstDebugLevel |
|
1980 gst_debug_get_default_threshold (void) |
|
1981 { |
|
1982 return GST_LEVEL_NONE; |
|
1983 } |
|
1984 #ifdef __SYMBIAN32__ |
|
1985 EXPORT_C |
|
1986 #endif |
|
1987 |
|
1988 |
|
1989 void |
|
1990 gst_debug_set_threshold_for_name (const gchar * name, GstDebugLevel level) |
|
1991 { |
|
1992 } |
|
1993 #ifdef __SYMBIAN32__ |
|
1994 EXPORT_C |
|
1995 #endif |
|
1996 |
|
1997 |
|
1998 void |
|
1999 gst_debug_unset_threshold_for_name (const gchar * name) |
|
2000 { |
|
2001 } |
|
2002 #ifdef __SYMBIAN32__ |
|
2003 EXPORT_C |
|
2004 #endif |
|
2005 |
|
2006 |
|
2007 void |
|
2008 gst_debug_category_free (GstDebugCategory * category) |
|
2009 { |
|
2010 } |
|
2011 #ifdef __SYMBIAN32__ |
|
2012 EXPORT_C |
|
2013 #endif |
|
2014 |
|
2015 |
|
2016 void |
|
2017 gst_debug_category_set_threshold (GstDebugCategory * category, |
|
2018 GstDebugLevel level) |
|
2019 { |
|
2020 } |
|
2021 #ifdef __SYMBIAN32__ |
|
2022 EXPORT_C |
|
2023 #endif |
|
2024 |
|
2025 |
|
2026 void |
|
2027 gst_debug_category_reset_threshold (GstDebugCategory * category) |
|
2028 { |
|
2029 } |
|
2030 #ifdef __SYMBIAN32__ |
|
2031 EXPORT_C |
|
2032 #endif |
|
2033 |
|
2034 |
|
2035 GstDebugLevel |
|
2036 gst_debug_category_get_threshold (GstDebugCategory * category) |
|
2037 { |
|
2038 return GST_LEVEL_NONE; |
|
2039 } |
|
2040 #ifdef __SYMBIAN32__ |
|
2041 EXPORT_C |
|
2042 #endif |
|
2043 |
|
2044 |
|
2045 G_CONST_RETURN gchar * |
|
2046 gst_debug_category_get_name (GstDebugCategory * category) |
|
2047 { |
|
2048 return ""; |
|
2049 } |
|
2050 #ifdef __SYMBIAN32__ |
|
2051 EXPORT_C |
|
2052 #endif |
|
2053 |
|
2054 |
|
2055 guint |
|
2056 gst_debug_category_get_color (GstDebugCategory * category) |
|
2057 { |
|
2058 return 0; |
|
2059 } |
|
2060 #ifdef __SYMBIAN32__ |
|
2061 EXPORT_C |
|
2062 #endif |
|
2063 |
|
2064 |
|
2065 G_CONST_RETURN gchar * |
|
2066 gst_debug_category_get_description (GstDebugCategory * category) |
|
2067 { |
|
2068 return ""; |
|
2069 } |
|
2070 #ifdef __SYMBIAN32__ |
|
2071 EXPORT_C |
|
2072 #endif |
|
2073 |
|
2074 |
|
2075 GSList * |
|
2076 gst_debug_get_all_categories (void) |
|
2077 { |
|
2078 return NULL; |
|
2079 } |
|
2080 |
|
2081 GstDebugCategory * |
|
2082 _gst_debug_get_category (const gchar * name) |
|
2083 { |
|
2084 return NULL; |
|
2085 } |
|
2086 #ifdef __SYMBIAN32__ |
|
2087 EXPORT_C |
|
2088 #endif |
|
2089 |
|
2090 |
|
2091 gchar * |
|
2092 gst_debug_construct_term_color (guint colorinfo) |
|
2093 { |
|
2094 return g_strdup ("00"); |
|
2095 } |
|
2096 |
|
2097 gint |
|
2098 gst_debug_construct_win_color (guint colorinfo) |
|
2099 { |
|
2100 return 0; |
|
2101 } |
|
2102 #ifdef __SYMBIAN32__ |
|
2103 EXPORT_C |
|
2104 #endif |
|
2105 |
1452 |
2106 |
1453 gboolean |
2107 gboolean |
1454 _priv_gst_in_valgrind (void) |
2108 _priv_gst_in_valgrind (void) |
1455 { |
2109 { |
1456 return FALSE; |
2110 return FALSE; |
1457 } |
2111 } |
1458 |
2112 |
|
2113 void |
|
2114 _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file, |
|
2115 const gchar * func, gint line, GObject * obj, const gchar * msg, |
|
2116 const guint8 * data, guint length) |
|
2117 { |
|
2118 } |
|
2119 #endif /* GST_REMOVE_DISABLED */ |
1459 #endif /* GST_DISABLE_GST_DEBUG */ |
2120 #endif /* GST_DISABLE_GST_DEBUG */ |
1460 |
2121 |
1461 |
2122 |
1462 #ifdef GST_ENABLE_FUNC_INSTRUMENTATION |
2123 #ifdef GST_ENABLE_FUNC_INSTRUMENTATION |
1463 /* FIXME make this thread specific */ |
2124 /* FIXME make this thread specific */ |