2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
4 * 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
6 * gstinfo.h: debugging functions
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
28 #include <glib-object.h>
29 #include <gst/gstconfig.h>
35 * @GST_LEVEL_NONE: No debugging level specified or desired. Used to deactivate
37 * @GST_LEVEL_ERROR: Error messages are to be used only when an error occured
38 * that stops the application from keeping working correctly.
39 * An examples is gst_element_error, which outputs a message with this priority.
40 * It does not mean that the application is terminating as with g_errror.
41 * @GST_LEVEL_WARNING: Warning messages are to inform about abnormal behaviour
42 * that could lead to problems or weird behaviour later on. An example of this
43 * would be clocking issues ("your computer is pretty slow") or broken input
44 * data ("Can't synchronize to stream.")
45 * @GST_LEVEL_FIXME: Fixme messages are messages that indicate that something
46 * in the executed code path is not fully implemented or handled yet. Note
47 * that this does not replace proper error handling in any way, the purpose
48 * of this message is to make it easier to spot incomplete/unfinished pieces
49 * of code when reading the debug log. (Since: 0.10.23)
50 * @GST_LEVEL_INFO: Informational messages should be used to keep the developer
51 * updated about what is happening.
52 * Examples where this should be used are when a typefind function has
53 * successfully determined the type of the stream or when an mp3 plugin detects
54 * the format to be used. ("This file has mono sound.")
55 * @GST_LEVEL_DEBUG: Debugging messages should be used when something common
56 * happens that is not the expected default behavior, or something that's
57 * useful to know but doesn't happen all the time (ie. per loop iteration or
58 * buffer processed or event handled).
59 * An example would be notifications about state changes or receiving/sending
61 * @GST_LEVEL_LOG: Log messages are messages that are very common but might be
62 * useful to know. As a rule of thumb a pipeline that is iterating as expected
63 * should never output anything else but LOG messages. Use this log level to
64 * log recurring information in chain functions and loop functions, for
66 * @GST_LEVEL_TRACE: Tracing-related messages (Since: 0.10.30)
67 * Examples for this are referencing/dereferencing of objects.
68 * @GST_LEVEL_MEMDUMP: memory dump messages are used to log (small) chunks of
69 * data as memory dumps in the log. They will be displayed as hexdump with
70 * ASCII characters. (Since: 0.10.23)
71 * @GST_LEVEL_COUNT: The number of defined debugging levels.
73 * The level defines the importance of a debugging message. The more important a
74 * message is, the greater the probability that the debugging system outputs it.
79 GST_LEVEL_WARNING = 2,
86 GST_LEVEL_MEMDUMP = 9,
94 * Defines the default debugging level to be used with GStreamer. It is normally
95 * set to #GST_LEVEL_NONE so nothing get printed.
96 * As it can be configured at compile time, developer builds may chose to
97 * override that though.
98 * You can use this as an argument to gst_debug_set_default_threshold() to
99 * reset the debugging output to default behaviour.
101 #ifndef GST_LEVEL_DEFAULT
102 #define GST_LEVEL_DEFAULT GST_LEVEL_NONE
105 /* defines for format (colors etc)
106 * don't change them around, it uses terminal layout
107 * Terminal color strings:
108 * 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
110 * 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
111 * Background color codes:
112 * 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
115 * GstDebugColorFlags:
116 * @GST_DEBUG_FG_BLACK: Use black as foreground color.
117 * @GST_DEBUG_FG_RED: Use red as foreground color.
118 * @GST_DEBUG_FG_GREEN: Use green as foreground color.
119 * @GST_DEBUG_FG_YELLOW: Use yellow as foreground color.
120 * @GST_DEBUG_FG_BLUE: Use blue as foreground color.
121 * @GST_DEBUG_FG_MAGENTA: Use magenta as foreground color.
122 * @GST_DEBUG_FG_CYAN: Use cyan as foreground color.
123 * @GST_DEBUG_FG_WHITE: Use white as foreground color.
124 * @GST_DEBUG_BG_BLACK: Use black as background color.
125 * @GST_DEBUG_BG_RED: Use red as background color.
126 * @GST_DEBUG_BG_GREEN: Use green as background color.
127 * @GST_DEBUG_BG_YELLOW: Use yellow as background color.
128 * @GST_DEBUG_BG_BLUE: Use blue as background color.
129 * @GST_DEBUG_BG_MAGENTA: Use magenta as background color.
130 * @GST_DEBUG_BG_CYAN: Use cyan as background color.
131 * @GST_DEBUG_BG_WHITE: Use white as background color.
132 * @GST_DEBUG_BOLD: Make the output bold.
133 * @GST_DEBUG_UNDERLINE: Underline the output.
135 * These are some terminal style flags you can use when creating your
136 * debugging categories to make them stand out in debugging output.
140 GST_DEBUG_FG_BLACK = 0x0000,
141 GST_DEBUG_FG_RED = 0x0001,
142 GST_DEBUG_FG_GREEN = 0x0002,
143 GST_DEBUG_FG_YELLOW = 0x0003,
144 GST_DEBUG_FG_BLUE = 0x0004,
145 GST_DEBUG_FG_MAGENTA = 0x0005,
146 GST_DEBUG_FG_CYAN = 0x0006,
147 GST_DEBUG_FG_WHITE = 0x0007,
148 /* background colors */
149 GST_DEBUG_BG_BLACK = 0x0000,
150 GST_DEBUG_BG_RED = 0x0010,
151 GST_DEBUG_BG_GREEN = 0x0020,
152 GST_DEBUG_BG_YELLOW = 0x0030,
153 GST_DEBUG_BG_BLUE = 0x0040,
154 GST_DEBUG_BG_MAGENTA = 0x0050,
155 GST_DEBUG_BG_CYAN = 0x0060,
156 GST_DEBUG_BG_WHITE = 0x0070,
158 GST_DEBUG_BOLD = 0x0100,
159 GST_DEBUG_UNDERLINE = 0x0200
160 } GstDebugColorFlags;
162 #define GST_DEBUG_FG_MASK (0x000F)
163 #define GST_DEBUG_BG_MASK (0x00F0)
164 #define GST_DEBUG_FORMAT_MASK (0xFF00)
166 typedef struct _GstDebugCategory GstDebugCategory;
170 * This is the struct that describes the categories. Once initialized with
171 * #GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore.
173 struct _GstDebugCategory {
176 guint color; /* see defines above */
179 const gchar * description;
182 /********** some convenience macros for debugging **********/
186 * @str: The string to check.
188 * Macro to use when a string must not be NULL, but may be NULL. If the string
189 * is NULL, "(NULL)" is printed instead.
190 * In GStreamer printf string arguments may not be NULL, because on some
191 * platforms (ie Solaris) the libc crashes in that case. This includes debugging
194 #define GST_STR_NULL(str) ((str) ? (str) : "(NULL)")
196 /* FIXME, not MT safe */
198 * GST_DEBUG_PAD_NAME:
199 * @pad: The pad to debug.
201 * Evaluates to 2 strings, that describe the pad. Often used in debugging
204 #define GST_DEBUG_PAD_NAME(pad) \
206 ((GST_OBJECT_PARENT(pad) != NULL) ? \
207 GST_STR_NULL (GST_OBJECT_NAME (GST_OBJECT_PARENT(pad))) : \
209 (pad != NULL) ? GST_STR_NULL (GST_OBJECT_NAME (pad)) : "''"
214 * This macro should evaluate to the name of the current function and be should
215 * be defined when configuring your project, as it is compiler dependant. If it
216 * is not defined, some default value is used. It is used to provide debugging
217 * output with the function name of the message.
219 * Note that this is different from G_STRFUNC as we do not want the full
220 * function signature in C++ code.
223 #if defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
224 # define GST_FUNCTION ((const char*) (__FUNCTION__))
225 #elif defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
226 # define GST_FUNCTION ((const char*) (__func__))
228 # define GST_FUNCTION ((const char*) ("???"))
230 #endif /* ifndef GST_FUNCTION */
233 typedef struct _GstDebugMessage GstDebugMessage;
237 * @category: a #GstDebugCategory
238 * @level: a #GstDebugLevel
240 * @function: function name
242 * @object: a #GObject
243 * @message: the message
244 * @user_data: user data for the log function
246 * Function prototype for a logging function that can be registered with
247 * gst_debug_add_log_function().
248 * Use G_GNUC_NO_INSTRUMENT on that function.
250 typedef void (*GstLogFunction) (GstDebugCategory * category,
253 const gchar * function,
256 GstDebugMessage * message,
259 #ifdef GST_USING_PRINTF_EXTENSION
261 /* not using G_GNUC_PRINTF, since gcc will choke on GST_PTR_FORMAT being %P */
262 void gst_debug_log (GstDebugCategory * category,
265 const gchar * function,
268 const gchar * format,
269 ...) G_GNUC_NO_INSTRUMENT;
271 #else /* GST_USING_PRINTF_EXTENSION */
273 void gst_debug_log (GstDebugCategory * category,
276 const gchar * function,
279 const gchar * format,
280 ...) G_GNUC_PRINTF (7, 8) G_GNUC_NO_INSTRUMENT;
282 #endif /* GST_USING_PRINTF_EXTENSION */
284 void gst_debug_log_valist (GstDebugCategory * category,
287 const gchar * function,
290 const gchar * format,
291 va_list args) G_GNUC_NO_INSTRUMENT;
293 /* do not use this function, use the GST_DEBUG_CATEGORY_INIT macro */
294 GstDebugCategory *_gst_debug_category_new (const gchar * name,
296 const gchar * description);
297 /* do not use this function, use the GST_DEBUG_CATEGORY_GET macro */
298 GstDebugCategory *_gst_debug_get_category (const gchar *name);
301 /* do not use this function, use the GST_CAT_MEMDUMP_* macros */
302 void _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
303 const gchar * func, gint line, GObject * obj, const gchar * msg,
304 const guint8 * data, guint length);
306 /* we define this to avoid a compiler warning regarding a cast from a function
307 * pointer to a void pointer
308 * (see https://bugzilla.gnome.org/show_bug.cgi?id=309253)
310 typedef void (* GstDebugFuncPtr) (void);
312 /* do no use these functions, use the GST_DEBUG*_FUNCPTR macros */
313 void _gst_debug_register_funcptr (GstDebugFuncPtr func,
314 const gchar * ptrname);
316 _gst_debug_nameof_funcptr (GstDebugFuncPtr func) G_GNUC_NO_INSTRUMENT;
319 const gchar * gst_debug_message_get (GstDebugMessage * message);
321 void gst_debug_log_default (GstDebugCategory * category,
324 const gchar * function,
327 GstDebugMessage * message,
328 gpointer unused) G_GNUC_NO_INSTRUMENT;
330 const gchar * gst_debug_level_get_name (GstDebugLevel level);
332 void gst_debug_add_log_function (GstLogFunction func,
335 guint gst_debug_remove_log_function (GstLogFunction func);
336 guint gst_debug_remove_log_function_by_data (gpointer data);
338 void gst_debug_set_active (gboolean active);
339 gboolean gst_debug_is_active (void);
341 void gst_debug_set_colored (gboolean colored);
342 gboolean gst_debug_is_colored (void);
344 void gst_debug_set_default_threshold (GstDebugLevel level);
345 GstDebugLevel gst_debug_get_default_threshold (void);
346 void gst_debug_set_threshold_for_name (const gchar * name,
347 GstDebugLevel level);
348 void gst_debug_unset_threshold_for_name (const gchar * name);
351 void gst_debug_category_free (GstDebugCategory * category);
352 void gst_debug_category_set_threshold (GstDebugCategory * category,
353 GstDebugLevel level);
354 void gst_debug_category_reset_threshold (GstDebugCategory * category);
355 GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory * category);
356 const gchar * gst_debug_category_get_name (GstDebugCategory * category);
357 guint gst_debug_category_get_color (GstDebugCategory * category);
358 const gchar * gst_debug_category_get_description (GstDebugCategory * category);
359 GSList * gst_debug_get_all_categories (void);
362 gchar * gst_debug_construct_term_color (guint colorinfo);
363 gint gst_debug_construct_win_color (guint colorinfo);
366 #ifndef GST_DISABLE_GST_DEBUG
368 #define gst_debug_add_log_function(func,data) \
370 if (func == gst_debug_log_default) { \
371 gst_debug_add_log_function(NULL,data); \
373 gst_debug_add_log_function(func,data); \
377 #define gst_debug_remove_log_function(func) \
378 (func == gst_debug_log_default) ? \
379 gst_debug_remove_log_function(NULL) : \
380 gst_debug_remove_log_function(func)
383 * GST_DEBUG_CATEGORY:
386 * Defines a GstDebugCategory variable.
387 * This macro expands to nothing if debugging is disabled.
389 #define GST_DEBUG_CATEGORY(cat) GstDebugCategory *cat = NULL
391 * GST_DEBUG_CATEGORY_EXTERN:
394 * Declares a GstDebugCategory variable as extern. Use in header files.
395 * This macro expands to nothing if debugging is disabled.
397 #define GST_DEBUG_CATEGORY_EXTERN(cat) extern GstDebugCategory *cat
400 * GST_DEBUG_CATEGORY_STATIC:
403 * Defines a static GstDebugCategory variable.
404 * This macro expands to nothing if debugging is disabled.
406 #define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
409 * GST_DEBUG_CATEGORY_INIT:
410 * @cat: the category to initialize.
411 * @name: the name of the category.
412 * @color: the colors to use for a color representation or 0 for no color.
413 * @description: optional description of the category.
415 * Initializes a new #GstDebugCategory with the given properties and set to
416 * the default threshold.
420 * This macro expands to nothing if debugging is disabled.
423 * When naming your category, please follow the following conventions to ensure
424 * that the pattern matching for categories works as expected. It is not
425 * earth-shattering if you don't follow these conventions, but it would be nice
429 * If you define a category for a plugin or a feature of it, name the category
430 * like the feature. So if you wanted to write a "filesrc" element, you would
431 * name the category "filesrc". Use lowercase letters only.
432 * If you define more than one category for the same element, append an
433 * underscore and an identifier to your categories, like this: "filesrc_cache"
436 * If you create a library or an application using debugging categories, use a
437 * common prefix followed by an underscore for all your categories. GStreamer
438 * uses the GST prefix so GStreamer categories look like "GST_STATES". Be sure
439 * to include uppercase letters.
443 #define GST_DEBUG_CATEGORY_INIT(cat,name,color,description) G_STMT_START{\
445 cat = _gst_debug_category_new (name,color,description); \
449 * GST_DEBUG_CATEGORY_GET:
450 * @cat: the category to initialize.
451 * @name: log category name
453 * Looks up an existing #GstDebugCategory by its @name and sets @cat. If the
454 * category is not found, but GST_CAT_DEFAULT is defined, that is assigned to
455 * @cat. Otherwise @cat will be NULL.
458 * GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug);
459 * #define GST_CAT_DEFAULT gst_myplugin_debug
460 * GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
462 * GST_DEBUG_CATEGORY_INIT (gst_myplugin_debug, "myplugin", 0, "nice element");
463 * GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
468 #ifdef GST_CAT_DEFAULT
469 #define GST_DEBUG_CATEGORY_GET(cat,name) G_STMT_START{\
470 cat = _gst_debug_get_category (name); \
472 cat = GST_CAT_DEFAULT; \
476 #define GST_DEBUG_CATEGORY_GET(cat,name) G_STMT_START{\
477 cat = _gst_debug_get_category (name); \
484 * Default gstreamer core debug log category. Please define your own.
486 GST_EXPORT GstDebugCategory * GST_CAT_DEFAULT;
487 /* this symbol may not be used */
488 GST_EXPORT gboolean _gst_debug_enabled;
490 /* since 0.10.7, the min debug level, used for quickly discarding debug
491 * messages that fall under the threshold. */
492 GST_EXPORT GstDebugLevel _gst_debug_min;
496 * @cat: category to use
497 * @level: the severity of the message
498 * @object: the #GObject the message belongs to or NULL if none
499 * @...: A printf-style message to output
501 * Outputs a debugging message. This is the most general macro for outputting
502 * debugging messages. You will probably want to use one of the ones described
505 #ifdef G_HAVE_ISO_VARARGS
506 #define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
507 if (G_UNLIKELY (level <= _gst_debug_min)) { \
508 gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
509 (GObject *) (object), __VA_ARGS__); \
512 #else /* G_HAVE_GNUC_VARARGS */
513 #ifdef G_HAVE_GNUC_VARARGS
514 #define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{ \
515 if (G_UNLIKELY (level <= _gst_debug_min)) { \
516 gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
517 (GObject *) (object), ##args ); \
520 #else /* no variadic macros, use inline */
522 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
523 GstDebugLevel level, gpointer object, const char *format, va_list varargs)
525 if (G_UNLIKELY (level <= _gst_debug_min)) {
526 gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
532 GST_CAT_LEVEL_LOG (GstDebugCategory * cat, GstDebugLevel level,
533 gpointer object, const char *format, ...)
537 va_start (varargs, format);
538 GST_CAT_LEVEL_LOG_valist (cat, level, object, format, varargs);
542 #endif /* G_HAVE_ISO_VARARGS */
544 /* This one doesn't have varargs in the macro, so it's different than all the
545 * other macros and hence in a separate block right here. Docs chunks are
546 * with the other doc chunks below though. */
547 #define __GST_CAT_MEMDUMP_LOG(cat,object,msg,data,length) G_STMT_START{ \
548 if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= _gst_debug_min)) { \
549 _gst_debug_dump_mem ((cat), __FILE__, GST_FUNCTION, __LINE__, \
550 (GObject *) (object), (msg), (data), (length)); \
554 #define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length) \
555 __GST_CAT_MEMDUMP_LOG(cat,obj,msg,data,length)
556 #define GST_CAT_MEMDUMP(cat,msg,data,length) \
557 __GST_CAT_MEMDUMP_LOG(cat,NULL,msg,data,length)
558 #define GST_MEMDUMP_OBJECT(obj,msg,data,length) \
559 __GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,obj,msg,data,length)
560 #define GST_MEMDUMP(msg,data,length) \
561 __GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,NULL,msg,data,length)
564 * GST_CAT_ERROR_OBJECT:
565 * @cat: category to use
566 * @obj: the #GObject the message belongs to
567 * @...: printf-style message to output
569 * Output an error message belonging to the given object in the given category.
572 * GST_CAT_WARNING_OBJECT:
573 * @cat: category to use
574 * @obj: the #GObject the message belongs to
575 * @...: printf-style message to output
577 * Output a warning message belonging to the given object in the given category.
580 * GST_CAT_INFO_OBJECT:
581 * @cat: category to use
582 * @obj: the #GObject the message belongs to
583 * @...: printf-style message to output
585 * Output an informational message belonging to the given object in the given
589 * GST_CAT_DEBUG_OBJECT:
590 * @cat: category to use
591 * @obj: the #GObject the message belongs to
592 * @...: printf-style message to output
594 * Output an debugging message belonging to the given object in the given category.
597 * GST_CAT_LOG_OBJECT:
598 * @cat: category to use
599 * @obj: the #GObject the message belongs to
600 * @...: printf-style message to output
602 * Output an logging message belonging to the given object in the given category.
605 * GST_CAT_FIXME_OBJECT:
606 * @cat: category to use
607 * @obj: the #GObject the message belongs to
608 * @...: printf-style message to output
610 * Output a fixme message belonging to the given object in the given category.
615 * GST_CAT_TRACE_OBJECT:
616 * @cat: category to use
617 * @obj: the #GObject the message belongs to
618 * @...: printf-style message to output
620 * Output a tracing message belonging to the given object in the given
626 * GST_CAT_MEMDUMP_OBJECT:
627 * @cat: category to use
628 * @obj: the #GObject the message belongs to
629 * @msg: message string to log with the data
630 * @data: pointer to the data to output
631 * @length: length of the data to output
633 * Output a hexdump of @data relating to the given object in the given
642 * @cat: category to use
643 * @...: printf-style message to output
645 * Output an error message in the given category.
649 * @cat: category to use
650 * @...: printf-style message to output
652 * Output an warning message in the given category.
656 * @cat: category to use
657 * @...: printf-style message to output
659 * Output an informational message in the given category.
663 * @cat: category to use
664 * @...: printf-style message to output
666 * Output an debugging message in the given category.
670 * @cat: category to use
671 * @...: printf-style message to output
673 * Output an logging message in the given category.
677 * @cat: category to use
678 * @...: printf-style message to output
680 * Output an fixme message in the given category.
686 * @cat: category to use
687 * @...: printf-style message to output
689 * Output a tracing message in the given category.
695 * @cat: category to use
696 * @msg: message string to log with the data
697 * @data: pointer to the data to output
698 * @length: length of the data to output
700 * Output a hexdump of @data in the given category.
708 * @obj: the #GObject the message belongs to
709 * @...: printf-style message to output
711 * Output an error message belonging to the given object in the default category.
714 * GST_WARNING_OBJECT:
715 * @obj: the #GObject the message belongs to
716 * @...: printf-style message to output
718 * Output a warning message belonging to the given object in the default category.
722 * @obj: the #GObject the message belongs to
723 * @...: printf-style message to output
725 * Output an informational message belonging to the given object in the default
730 * @obj: the #GObject the message belongs to
731 * @...: printf-style message to output
733 * Output a debugging message belonging to the given object in the default
738 * @obj: the #GObject the message belongs to
739 * @...: printf-style message to output
741 * Output a logging message belonging to the given object in the default category.
745 * @obj: the #GObject the message belongs to
746 * @...: printf-style message to output
748 * Output a fixme message belonging to the given object in the default category.
754 * @obj: the #GObject the message belongs to
755 * @...: printf-style message to output
757 * Output a tracing message belonging to the given object in the default category.
762 * GST_MEMDUMP_OBJECT:
763 * @obj: the #GObject the message belongs to
764 * @msg: message string to log with the data
765 * @data: pointer to the data to output
766 * @length: length of the data to output
768 * Output a logging message belonging to the given object in the default category.
776 * @...: printf-style message to output
778 * Output an error message in the default category.
782 * @...: printf-style message to output
784 * Output a warning message in the default category.
788 * @...: printf-style message to output
790 * Output an informational message in the default category.
794 * @...: printf-style message to output
796 * Output a debugging message in the default category.
800 * @...: printf-style message to output
802 * Output a logging message in the default category.
806 * @...: printf-style message to output
808 * Output a fixme message in the default category.
814 * @...: printf-style message to output
816 * Output a tracing message in the default category.
822 * @msg: message string to log with the data
823 * @data: pointer to the data to output
824 * @length: length of the data to output
826 * Output a hexdump of @data.
831 #ifdef G_HAVE_ISO_VARARGS
833 #define GST_CAT_ERROR_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, obj, __VA_ARGS__)
834 #define GST_CAT_WARNING_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj, __VA_ARGS__)
835 #define GST_CAT_INFO_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, obj, __VA_ARGS__)
836 #define GST_CAT_DEBUG_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
837 #define GST_CAT_LOG_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, obj, __VA_ARGS__)
838 #define GST_CAT_FIXME_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, obj, __VA_ARGS__)
839 #define GST_CAT_TRACE_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, obj, __VA_ARGS__)
841 #define GST_CAT_ERROR(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, NULL, __VA_ARGS__)
842 #define GST_CAT_WARNING(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
843 #define GST_CAT_INFO(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, NULL, __VA_ARGS__)
844 #define GST_CAT_DEBUG(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
845 #define GST_CAT_LOG(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, NULL, __VA_ARGS__)
846 #define GST_CAT_FIXME(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, NULL, __VA_ARGS__)
847 #define GST_CAT_TRACE(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, NULL, __VA_ARGS__)
849 #define GST_ERROR_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, __VA_ARGS__)
850 #define GST_WARNING_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, __VA_ARGS__)
851 #define GST_INFO_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, __VA_ARGS__)
852 #define GST_DEBUG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
853 #define GST_LOG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, __VA_ARGS__)
854 #define GST_FIXME_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, __VA_ARGS__)
855 #define GST_TRACE_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, obj, __VA_ARGS__)
857 #define GST_ERROR(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, __VA_ARGS__)
858 #define GST_WARNING(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
859 #define GST_INFO(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, __VA_ARGS__)
860 #define GST_DEBUG(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
861 #define GST_LOG(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, __VA_ARGS__)
862 #define GST_FIXME(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, __VA_ARGS__)
863 #define GST_TRACE(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, __VA_ARGS__)
866 #ifdef G_HAVE_GNUC_VARARGS
868 #define GST_CAT_ERROR_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, obj, ##args )
869 #define GST_CAT_WARNING_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj, ##args )
870 #define GST_CAT_INFO_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, obj, ##args )
871 #define GST_CAT_DEBUG_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, obj, ##args )
872 #define GST_CAT_LOG_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, obj, ##args )
873 #define GST_CAT_FIXME_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, obj, ##args )
874 #define GST_CAT_TRACE_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, obj, ##args )
876 #define GST_CAT_ERROR(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, NULL, ##args )
877 #define GST_CAT_WARNING(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, ##args )
878 #define GST_CAT_INFO(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, NULL, ##args )
879 #define GST_CAT_DEBUG(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, NULL, ##args )
880 #define GST_CAT_LOG(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, NULL, ##args )
881 #define GST_CAT_FIXME(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, NULL, ##args )
882 #define GST_CAT_TRACE(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, NULL, ##args )
884 #define GST_ERROR_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, ##args )
885 #define GST_WARNING_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, ##args )
886 #define GST_INFO_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, ##args )
887 #define GST_DEBUG_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, ##args )
888 #define GST_LOG_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, ##args )
889 #define GST_FIXME_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, ##args )
890 #define GST_TRACE_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, obj, ##args )
892 #define GST_ERROR(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, ##args )
893 #define GST_WARNING(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, ##args )
894 #define GST_INFO(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, ##args )
895 #define GST_DEBUG(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, ##args )
896 #define GST_LOG(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, ##args )
897 #define GST_FIXME(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, ##args )
898 #define GST_TRACE(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, ##args )
901 /* no variadic macros, use inline */
903 GST_CAT_ERROR_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
908 va_start (varargs, format);
909 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_ERROR, obj, format, varargs);
914 GST_CAT_WARNING_OBJECT (GstDebugCategory * cat, gpointer obj,
915 const char *format, ...)
919 va_start (varargs, format);
920 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_WARNING, obj, format, varargs);
925 GST_CAT_INFO_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
930 va_start (varargs, format);
931 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_INFO, obj, format, varargs);
936 GST_CAT_DEBUG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
941 va_start (varargs, format);
942 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_DEBUG, obj, format, varargs);
947 GST_CAT_LOG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
952 va_start (varargs, format);
953 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, obj, format, varargs);
958 GST_CAT_FIXME_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
963 va_start (varargs, format);
964 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_FIXME, obj, format, varargs);
969 GST_CAT_TRACE_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
974 va_start (varargs, format);
975 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_TRACE, obj, format, varargs);
980 GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
984 va_start (varargs, format);
985 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_ERROR, NULL, format, varargs);
990 GST_CAT_WARNING (GstDebugCategory * cat, const char *format, ...)
994 va_start (varargs, format);
995 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_WARNING, NULL, format, varargs);
1000 GST_CAT_INFO (GstDebugCategory * cat, const char *format, ...)
1004 va_start (varargs, format);
1005 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_INFO, NULL, format, varargs);
1010 GST_CAT_DEBUG (GstDebugCategory * cat, const char *format, ...)
1014 va_start (varargs, format);
1015 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_DEBUG, NULL, format, varargs);
1020 GST_CAT_LOG (GstDebugCategory * cat, const char *format, ...)
1024 va_start (varargs, format);
1025 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, NULL, format, varargs);
1030 GST_CAT_FIXME (GstDebugCategory * cat, const char *format, ...)
1034 va_start (varargs, format);
1035 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_FIXME, NULL, format, varargs);
1040 GST_CAT_TRACE (GstDebugCategory * cat, const char *format, ...)
1044 va_start (varargs, format);
1045 GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_TRACE, NULL, format, varargs);
1050 GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
1054 va_start (varargs, format);
1055 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, format,
1061 GST_WARNING_OBJECT (gpointer obj, const char *format, ...)
1065 va_start (varargs, format);
1066 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, format,
1072 GST_INFO_OBJECT (gpointer obj, const char *format, ...)
1076 va_start (varargs, format);
1077 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, format,
1083 GST_DEBUG_OBJECT (gpointer obj, const char *format, ...)
1087 va_start (varargs, format);
1088 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, format,
1094 GST_LOG_OBJECT (gpointer obj, const char *format, ...)
1098 va_start (varargs, format);
1099 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, format,
1105 GST_FIXME_OBJECT (gpointer obj, const char *format, ...)
1109 va_start (varargs, format);
1110 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, format,
1116 GST_TRACE_OBJECT (gpointer obj, const char *format, ...)
1120 va_start (varargs, format);
1121 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_TRACE, obj, format,
1127 GST_ERROR (const char *format, ...)
1131 va_start (varargs, format);
1132 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, format,
1138 GST_WARNING (const char *format, ...)
1142 va_start (varargs, format);
1143 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, format,
1149 GST_INFO (const char *format, ...)
1153 va_start (varargs, format);
1154 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, format,
1160 GST_DEBUG (const char *format, ...)
1164 va_start (varargs, format);
1165 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, format,
1171 GST_LOG (const char *format, ...)
1175 va_start (varargs, format);
1176 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL,
1182 GST_FIXME (const char *format, ...)
1186 va_start (varargs, format);
1187 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, format,
1193 GST_TRACE (const char *format, ...)
1197 va_start (varargs, format);
1198 GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, format,
1206 /********** function pointer stuff **********/
1209 * GST_DEBUG_REGISTER_FUNCPTR:
1210 * @ptr: pointer to the function to register
1212 * Register a pointer to a function with its name, so it can later be used by
1213 * GST_DEBUG_FUNCPTR_NAME().
1215 * Use this variant of #GST_DEBUG_FUNCPTR if you do not need to use @ptr.
1219 #define GST_DEBUG_REGISTER_FUNCPTR(ptr) \
1220 _gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr)
1222 * GST_DEBUG_FUNCPTR:
1223 * @ptr: pointer to the function to register
1225 * Register a pointer to a function with its name, so it can later be used by
1226 * GST_DEBUG_FUNCPTR_NAME().
1228 * Returns: the value passed to @ptr.
1230 #define GST_DEBUG_FUNCPTR(ptr) \
1231 (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
1234 * GST_DEBUG_FUNCPTR_NAME:
1235 * @ptr: address of the function of which to look up the name
1237 * Retrieves the name of the function, if it was previously registered with
1238 * GST_DEBUG_FUNCPTR(). If not, it returns a description of the pointer.
1240 * This macro returns a constant string which must not be modified or
1241 * freed by the caller.
1243 #define GST_DEBUG_FUNCPTR_NAME(ptr) \
1244 _gst_debug_nameof_funcptr((GstDebugFuncPtr)ptr)
1247 #else /* GST_DISABLE_GST_DEBUG */
1252 #if defined(__GNUC__) && __GNUC__ >= 3
1253 # pragma GCC poison gst_debug_log
1254 # pragma GCC poison gst_debug_log_valist
1255 # pragma GCC poison _gst_debug_category_new
1258 #define _gst_debug_min GST_LEVEL_NONE
1260 #define gst_debug_set_default_threshold(level) G_STMT_START{ }G_STMT_END
1261 #define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
1263 #define gst_debug_level_get_name(level) ("NONE")
1264 #define gst_debug_message_get(message) ("")
1265 #define gst_debug_add_log_function(func,data) G_STMT_START{ }G_STMT_END
1266 #define gst_debug_set_active(active) G_STMT_START{ }G_STMT_END
1267 #define gst_debug_is_active() (FALSE)
1268 #define gst_debug_set_colored(colored) G_STMT_START{ }G_STMT_END
1269 #define gst_debug_is_colored() (FALSE)
1270 #define gst_debug_set_default_threshold(level) G_STMT_START{ }G_STMT_END
1271 #define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
1272 #define gst_debug_set_threshold_for_name(name,level) G_STMT_START{ }G_STMT_END
1273 #define gst_debug_unset_threshold_for_name(name) G_STMT_START{ }G_STMT_END
1275 /* we are using dummy function prototypes here to eat ';' as these macros are
1276 * used outside of functions */
1277 #define GST_DEBUG_CATEGORY(var) void _gst_debug_dummy_##var (void)
1278 #define GST_DEBUG_CATEGORY_EXTERN(var) void _gst_debug_dummy_extern_##var (void)
1279 #define GST_DEBUG_CATEGORY_STATIC(var) void _gst_debug_dummy_static_##var (void)
1281 #define GST_DEBUG_CATEGORY_INIT(var,name,color,desc) G_STMT_START{ }G_STMT_END
1282 #define GST_DEBUG_CATEGORY_GET(var,name) G_STMT_START{ }G_STMT_END
1283 #define gst_debug_category_free(category) G_STMT_START{ }G_STMT_END
1284 #define gst_debug_category_set_threshold(category,level) G_STMT_START{ }G_STMT_END
1285 #define gst_debug_category_reset_threshold(category) G_STMT_START{ }G_STMT_END
1286 #define gst_debug_category_get_threshold(category) (GST_LEVEL_NONE)
1287 #define gst_debug_category_get_name(cat) ("")
1288 #define gst_debug_category_get_color(cat) (0)
1289 #define gst_debug_category_get_description(cat) ("")
1290 #define gst_debug_get_all_categories() (NULL)
1291 #define gst_debug_construct_term_color(colorinfo) (g_strdup ("00"))
1292 #define gst_debug_construct_win_color(colorinfo) (0)
1294 #endif /* !GST_INFO_C */
1296 #ifdef G_HAVE_ISO_VARARGS
1298 #define GST_CAT_LEVEL_LOG(cat,level,...) G_STMT_START{ }G_STMT_END
1300 #define GST_CAT_ERROR_OBJECT(...) G_STMT_START{ }G_STMT_END
1301 #define GST_CAT_WARNING_OBJECT(...) G_STMT_START{ }G_STMT_END
1302 #define GST_CAT_INFO_OBJECT(...) G_STMT_START{ }G_STMT_END
1303 #define GST_CAT_DEBUG_OBJECT(...) G_STMT_START{ }G_STMT_END
1304 #define GST_CAT_LOG_OBJECT(...) G_STMT_START{ }G_STMT_END
1305 #define GST_CAT_FIXME_OBJECT(...) G_STMT_START{ }G_STMT_END
1306 #define GST_CAT_TRACE_OBJECT(...) G_STMT_START{ }G_STMT_END
1308 #define GST_CAT_ERROR(...) G_STMT_START{ }G_STMT_END
1309 #define GST_CAT_WARNING(...) G_STMT_START{ }G_STMT_END
1310 #define GST_CAT_INFO(...) G_STMT_START{ }G_STMT_END
1311 #define GST_CAT_DEBUG(...) G_STMT_START{ }G_STMT_END
1312 #define GST_CAT_LOG(...) G_STMT_START{ }G_STMT_END
1313 #define GST_CAT_FIXME(...) G_STMT_START{ }G_STMT_END
1314 #define GST_CAT_TRACE(...) G_STMT_START{ }G_STMT_END
1316 #define GST_ERROR_OBJECT(...) G_STMT_START{ }G_STMT_END
1317 #define GST_WARNING_OBJECT(...) G_STMT_START{ }G_STMT_END
1318 #define GST_INFO_OBJECT(...) G_STMT_START{ }G_STMT_END
1319 #define GST_DEBUG_OBJECT(...) G_STMT_START{ }G_STMT_END
1320 #define GST_LOG_OBJECT(...) G_STMT_START{ }G_STMT_END
1321 #define GST_FIXME_OBJECT(...) G_STMT_START{ }G_STMT_END
1322 #define GST_TRACE_OBJECT(...) G_STMT_START{ }G_STMT_END
1324 #define GST_ERROR(...) G_STMT_START{ }G_STMT_END
1325 #define GST_WARNING(...) G_STMT_START{ }G_STMT_END
1326 #define GST_INFO(...) G_STMT_START{ }G_STMT_END
1327 #define GST_DEBUG(...) G_STMT_START{ }G_STMT_END
1328 #define GST_LOG(...) G_STMT_START{ }G_STMT_END
1329 #define GST_FIXME(...) G_STMT_START{ }G_STMT_END
1330 #define GST_TRACE(...) G_STMT_START{ }G_STMT_END
1332 #else /* !G_HAVE_ISO_VARARGS */
1333 #ifdef G_HAVE_GNUC_VARARGS
1335 #define GST_CAT_LEVEL_LOG(cat,level,args...) G_STMT_START{ }G_STMT_END
1337 #define GST_CAT_ERROR_OBJECT(args...) G_STMT_START{ }G_STMT_END
1338 #define GST_CAT_WARNING_OBJECT(args...) G_STMT_START{ }G_STMT_END
1339 #define GST_CAT_INFO_OBJECT(args...) G_STMT_START{ }G_STMT_END
1340 #define GST_CAT_DEBUG_OBJECT(args...) G_STMT_START{ }G_STMT_END
1341 #define GST_CAT_LOG_OBJECT(args...) G_STMT_START{ }G_STMT_END
1342 #define GST_CAT_FIXME_OBJECT(args...) G_STMT_START{ }G_STMT_END
1343 #define GST_CAT_TRACE_OBJECT(args...) G_STMT_START{ }G_STMT_END
1345 #define GST_CAT_ERROR(args...) G_STMT_START{ }G_STMT_END
1346 #define GST_CAT_WARNING(args...) G_STMT_START{ }G_STMT_END
1347 #define GST_CAT_INFO(args...) G_STMT_START{ }G_STMT_END
1348 #define GST_CAT_DEBUG(args...) G_STMT_START{ }G_STMT_END
1349 #define GST_CAT_LOG(args...) G_STMT_START{ }G_STMT_END
1350 #define GST_CAT_FIXME(args...) G_STMT_START{ }G_STMT_END
1351 #define GST_CAT_TRACE(args...) G_STMT_START{ }G_STMT_END
1353 #define GST_ERROR_OBJECT(args...) G_STMT_START{ }G_STMT_END
1354 #define GST_WARNING_OBJECT(args...) G_STMT_START{ }G_STMT_END
1355 #define GST_INFO_OBJECT(args...) G_STMT_START{ }G_STMT_END
1356 #define GST_DEBUG_OBJECT(args...) G_STMT_START{ }G_STMT_END
1357 #define GST_LOG_OBJECT(args...) G_STMT_START{ }G_STMT_END
1358 #define GST_FIXME_OBJECT(args...) G_STMT_START{ }G_STMT_END
1359 #define GST_TRACE_OBJECT(args...) G_STMT_START{ }G_STMT_END
1361 #define GST_ERROR(args...) G_STMT_START{ }G_STMT_END
1362 #define GST_WARNING(args...) G_STMT_START{ }G_STMT_END
1363 #define GST_INFO(args...) G_STMT_START{ }G_STMT_END
1364 #define GST_DEBUG(args...) G_STMT_START{ }G_STMT_END
1365 #define GST_LOG(args...) G_STMT_START{ }G_STMT_END
1366 #define GST_FIXME(args...) G_STMT_START{ }G_STMT_END
1367 #define GST_TRACE(args...) G_STMT_START{ }G_STMT_END
1369 #else /* !G_HAVE_GNUC_VARARGS */
1371 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
1372 GstDebugLevel level, gpointer object, const char *format, va_list varargs)
1377 GST_CAT_ERROR_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
1383 GST_CAT_WARNING_OBJECT (GstDebugCategory * cat, gpointer obj,
1384 const char *format, ...)
1389 GST_CAT_INFO_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
1395 GST_CAT_DEBUG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
1401 GST_CAT_LOG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
1407 GST_CAT_FIXME_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
1413 GST_CAT_TRACE_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
1419 GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
1424 GST_CAT_WARNING (GstDebugCategory * cat, const char *format, ...)
1429 GST_CAT_INFO (GstDebugCategory * cat, const char *format, ...)
1434 GST_CAT_DEBUG (GstDebugCategory * cat, const char *format, ...)
1439 GST_CAT_LOG (GstDebugCategory * cat, const char *format, ...)
1444 GST_CAT_FIXME (GstDebugCategory * cat, const char *format, ...)
1449 GST_CAT_TRACE (GstDebugCategory * cat, const char *format, ...)
1454 GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
1459 GST_WARNING_OBJECT (gpointer obj, const char *format, ...)
1464 GST_INFO_OBJECT (gpointer obj, const char *format, ...)
1469 GST_DEBUG_OBJECT (gpointer obj, const char *format, ...)
1474 GST_LOG_OBJECT (gpointer obj, const char *format, ...)
1479 GST_FIXME_OBJECT (gpointer obj, const char *format, ...)
1484 GST_TRACE_OBJECT (gpointer obj, const char *format, ...)
1489 GST_ERROR (const char *format, ...)
1494 GST_WARNING (const char *format, ...)
1499 GST_INFO (const char *format, ...)
1504 GST_DEBUG (const char *format, ...)
1509 GST_LOG (const char *format, ...)
1514 GST_FIXME (const char *format, ...)
1519 GST_TRACE (const char *format, ...)
1523 #endif /* G_HAVE_GNUC_VARARGS */
1524 #endif /* G_HAVE_ISO_VARARGS */
1526 #define GST_DEBUG_REGISTER_FUNCPTR(ptr) G_STMT_START{ }G_STMT_END
1527 #define GST_DEBUG_FUNCPTR(ptr) (ptr)
1528 #define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
1530 #define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length) G_STMT_START{ }G_STMT_END
1531 #define GST_CAT_MEMDUMP(cat,msg,data,length) G_STMT_START{ }G_STMT_END
1532 #define GST_MEMDUMP_OBJECT(obj,msg,data,length) G_STMT_START{ }G_STMT_END
1533 #define GST_MEMDUMP(msg,data,length) G_STMT_START{ }G_STMT_END
1535 #endif /* GST_DISABLE_GST_DEBUG */
1538 void gst_debug_print_stack_trace (void);
1542 #endif /* __GSTINFO_H__ */