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/gstatomic.h>
30 #include <gst/gstlog.h>
31 #include <gst/gstconfig.h>
34 * GStreamer's debugging subsystem is an easy way to get information about what
35 * the application is doing.
36 * It is not meant for programming errors. Use GLibs methods (g_warning and so
52 /* we can now override this to be more general in maintainer builds or cvs checkouts */
53 #ifndef GST_LEVEL_DEFAULT
54 #define GST_LEVEL_DEFAULT GST_LEVEL_ERROR
57 /* defines for format (colors etc) - don't change them around, it uses terminal layout
58 * Terminal color strings:
59 * 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
61 * 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
62 * Background color codes:
63 * 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
67 GST_DEBUG_FG_BLACK = 0x0000,
68 GST_DEBUG_FG_RED = 0x0001,
69 GST_DEBUG_FG_GREEN = 0x0002,
70 GST_DEBUG_FG_YELLOW = 0x0003,
71 GST_DEBUG_FG_BLUE = 0x0004,
72 GST_DEBUG_FG_MAGENTA = 0x0005,
73 GST_DEBUG_FG_CYAN = 0x0006,
74 GST_DEBUG_FG_WHITE = 0x0007,
75 /* background colors */
76 GST_DEBUG_BG_BLACK = 0x0000,
77 GST_DEBUG_BG_RED = 0x0010,
78 GST_DEBUG_BG_GREEN = 0x0020,
79 GST_DEBUG_BG_YELLOW = 0x0030,
80 GST_DEBUG_BG_BLUE = 0x0040,
81 GST_DEBUG_BG_MAGENTA = 0x0050,
82 GST_DEBUG_BG_CYAN = 0x0060,
83 GST_DEBUG_BG_WHITE = 0x0070,
85 GST_DEBUG_BOLD = 0x0100,
86 GST_DEBUG_UNDERLINE = 0x0200
89 #define GST_DEBUG_FG_MASK (0x000F)
90 #define GST_DEBUG_BG_MASK (0x00F0)
91 #define GST_DEBUG_FORMAT_MASK (0xFF00)
93 typedef struct _GstDebugCategory GstDebugCategory;
94 struct _GstDebugCategory {
96 GstAtomicInt * threshold;
97 guint color; /* see defines above */
100 const gchar * description;
103 /********** some convenience macros for debugging **********/
105 /* This is needed in printf's if a char* might be NULL. Solaris crashes then */
106 #define GST_STR_NULL(str) ((str) ? (str) : "(NULL)")
108 /* easier debugging for pad names */
109 #define GST_DEBUG_PAD_NAME(pad) \
110 (GST_OBJECT_PARENT(pad) != NULL) ? \
111 GST_STR_NULL (GST_OBJECT_NAME (GST_OBJECT_PARENT(pad))) : \
112 "''", GST_OBJECT_NAME (pad)
114 /* You might want to define GST_FUNCTION in apps' configure script */
117 #ifdef G_GNUC_PRETTY_FUNCTION
118 #define GST_FUNCTION G_GNUC_PRETTY_FUNCTION
120 #define GST_FUNCTION __func__
121 #elif HAVE_PRETTY_FUNCTION
122 #define GST_FUNCTION __PRETTY_FUNCTION__
124 #define GST_FUNCTION __FUNCTION__
126 #define GST_FUNCTION ""
128 #endif /* ifndef GST_FUNCTION */
130 typedef void (*GstLogFunction) (GstDebugCategory * category,
133 const gchar * function,
139 /* Disable this subsystem if no varargs macro can be found.
140 Use a trick so the core builds the functions nonetheless if it wasn't
141 explicitly disabled. */
142 #if !defined(G_HAVE_ISO_VARARGS) && !defined(G_HAVE_GNUC_VARARGS)
143 #define __GST_DISABLE_GST_DEBUG
145 #ifdef GST_DISABLE_GST_DEBUG
146 #ifndef __GST_DISABLE_GST_DEBUG
147 #define __GST_DISABLE_GST_DEBUG
151 #ifndef __GST_DISABLE_GST_DEBUG
153 void _gst_debug_init (void);
155 void gst_debug_log (GstDebugCategory * category,
158 const gchar * function,
162 ...) G_GNUC_PRINTF (7, 8) G_GNUC_NO_INSTRUMENT;
163 void gst_debug_logv (GstDebugCategory * category,
166 const gchar * function,
170 va_list args) G_GNUC_NO_INSTRUMENT;
172 void gst_debug_log_default (GstDebugCategory * category,
175 const gchar * function,
179 gpointer unused) G_GNUC_NO_INSTRUMENT;
181 const gchar * gst_debug_level_get_name (GstDebugLevel level);
183 void gst_debug_add_log_function (GstLogFunction func,
185 guint gst_debug_remove_log_function (GstLogFunction func);
186 guint gst_debug_remove_log_function_by_data (gpointer data);
188 void gst_debug_set_active (gboolean active);
189 gboolean gst_debug_is_active (void);
191 void gst_debug_set_colored (gboolean colored);
192 gboolean gst_debug_is_colored (void);
194 void gst_debug_set_default_threshold (GstDebugLevel level);
195 GstDebugLevel gst_debug_get_default_threshold (void);
196 void gst_debug_set_threshold_for_name (const gchar * name,
197 GstDebugLevel level);
198 void gst_debug_unset_threshold_for_name (const gchar * name);
201 * GST_DEBUG_CATEGORY:
204 * Defines a GstCategory variable.
205 * This macro expands to nothing if debugging is disabled.
207 #define GST_DEBUG_CATEGORY(cat) GstDebugCategory *cat = NULL
209 * GST_DEBUG_CATEGORY_EXTERN:
212 * Defines an extern GstCategory variable. Use in header files.
213 * This macro expands to nothing if debugging is disabled.
215 #define GST_DEBUG_CATEGORY_EXTERN(cat) extern GstDebugCategory *cat
217 * GST_DEBUG_CATEGORY_STATIC:
220 * Defines a static GstCategory variable.
221 * This macro expands to nothing if debugging is disabled.
223 #define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
224 /* do not use this function, use the macros below */
225 GstDebugCategory *_gst_debug_category_new (gchar * name,
227 gchar * description);
229 * GST_DEBUG_CATEGORY_INIT:
230 * @cat: the category to initialize
231 * @name: the name of the category
232 * @color: the colors to use for a color representation or 0 for no color
233 * @description: optional description of the category
235 * Creates a new #GstDebugCategory cat with the given properties and sets it to
236 * the default threshold.
237 * This macro expands to nothing if debugging is disabled.
240 * When naming your category, please follow the following definitions to ensure
241 * that the pattern matching for categories works as expected. It is not
242 * earth-shattering if you don't follow these conventions, but it would be nice
246 * If you define a category for a plugin or a feature of it, name the category
247 * like the feature. So if you wanted to write a "filesrc" element, you would
248 * name the category "filesink". Use lowercase letters only.
249 * If you define more than one category for the same element, append an
250 * underscore and an identifier to your categories, like this: "filesrc_cache"
253 * If you create a library or an application using debugging categories, use a
254 * common prefix followed by an underscore for all your categories. GStreamer
255 * uses the GST prefix so GStreamer categories look like "GST_STATES". Be sure
256 * to include uppercase letters.
260 #define GST_DEBUG_CATEGORY_INIT(cat,name,color,description) G_STMT_START{ \
262 cat = _gst_debug_category_new (name,color,description); \
264 void gst_debug_category_free (GstDebugCategory * category);
265 void gst_debug_category_set_threshold (GstDebugCategory * category,
266 GstDebugLevel level);
267 void gst_debug_category_reset_threshold (GstDebugCategory * category);
268 GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory * category);
269 const gchar * gst_debug_category_get_name (GstDebugCategory * category);
270 guint gst_debug_category_get_color (GstDebugCategory * category);
271 const gchar * gst_debug_category_get_description (GstDebugCategory * category);
272 GSList * gst_debug_get_all_categories (void);
274 gchar * gst_debug_construct_term_color (guint colorinfo);
277 extern GstDebugCategory * GST_CAT_DEFAULT;
281 * @cat: category to use
282 * @level: the severity of the message
283 * @object: the #GObject the message belongs to or NULL if none
284 * @...: A printf-style message to output
286 * Outputs a debugging message. This is the most general macro for outputting
287 * debugging messages. You will probably want to use one of the ones described
290 #ifdef G_HAVE_ISO_VARARGS
291 #define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
292 if (gst_debug_is_active ()) { \
293 gst_debug_log (cat, level, __FILE__, GST_FUNCTION, __LINE__, G_OBJECT (object), __VA_ARGS__); \
296 #else /* G_HAVE_GNUC_VARARGS */
297 #define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{ \
298 if (gst_debug_is_active ()) { \
299 gst_debug_log (cat, level, __FILE__, GST_FUNCTION, __LINE__, G_OBJECT (object), ##args ); \
302 #endif /* G_HAVE_ISO_VARARGS */
304 #ifndef GST_DEBUG_ENABLE_DEPRECATED
306 #ifdef G_HAVE_ISO_VARARGS
308 #define GST_CAT_ERROR_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, obj, __VA_ARGS__)
309 #define GST_CAT_WARNING_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj, __VA_ARGS__)
310 #define GST_CAT_INFO_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, obj, __VA_ARGS__)
311 #define GST_CAT_DEBUG_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
312 #define GST_CAT_LOG_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, obj, __VA_ARGS__)
314 #define GST_CAT_ERROR(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, NULL, __VA_ARGS__)
315 #define GST_CAT_WARNING(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
316 #define GST_CAT_INFO(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, NULL, __VA_ARGS__)
317 #define GST_CAT_DEBUG(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
318 #define GST_CAT_LOG(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, NULL, __VA_ARGS__)
320 #define GST_ERROR_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, __VA_ARGS__)
321 #define GST_WARNING_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, __VA_ARGS__)
322 #define GST_INFO_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, __VA_ARGS__)
323 #define GST_DEBUG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
324 #define GST_LOG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, __VA_ARGS__)
326 #define GST_ERROR(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, __VA_ARGS__)
327 #define GST_WARNING(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
328 #define GST_INFO(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, __VA_ARGS__)
329 #define GST_DEBUG(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
330 #define GST_LOG(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, __VA_ARGS__)
332 #else /* G_HAVE_GNUC_VARARGS */
334 #define GST_CAT_ERROR_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, obj, ##args )
335 #define GST_CAT_WARNING_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj, ##args )
336 #define GST_CAT_INFO_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, obj, ##args )
337 #define GST_CAT_DEBUG_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, obj, ##args )
338 #define GST_CAT_LOG_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, obj, ##args )
340 #define GST_CAT_ERROR(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, NULL, ##args )
341 #define GST_CAT_WARNING(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, ##args )
342 #define GST_CAT_INFO(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, NULL, ##args )
343 #define GST_CAT_DEBUG(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, NULL, ##args )
344 #define GST_CAT_LOG(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, NULL, ##args )
346 #define GST_ERROR_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, ##args )
347 #define GST_WARNING_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, ##args )
348 #define GST_INFO_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, ##args )
349 #define GST_DEBUG_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, ##args )
350 #define GST_LOG_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, ##args )
352 #define GST_ERROR(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, ##args )
353 #define GST_WARNING(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, ##args )
354 #define GST_INFO(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, ##args )
355 #define GST_DEBUG(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, ##args )
356 #define GST_LOG(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, ##args )
358 #endif /* G_HAVE_ISO_VARARGS */
360 #else /* GST_DEBUG_ENABLE_DEPRECATED */
361 /* This is a workaround so the old debugging stuff of Gstreamer 0.6 works.
362 This is undocumented and will go when 0.8 comes out. */
364 #ifdef G_HAVE_ISO_VARARGS
365 # define GST_INFO(cat,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, __VA_ARGS__)
366 # define GST_DEBUG(cat,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
367 # define GST_INFO_ELEMENT(cat,obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, __VA_ARGS__)
368 # define GST_DEBUG_ELEMENT(cat,obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
369 # define GST_DEBUG_ENTER(...) GST_DEBUG ("entering: " __VA_ARGS__ )
370 # define GST_DEBUG_LEAVE(...) GST_DEBUG ("leaving: " __VA_ARGS__ )
371 # define GST_INFO_ENTER(...) GST_INFO ("entering: " __VA_ARGS__ )
372 # define GST_INFO_LEAVE(...) GST_INFO ("leaving: " __VA_ARGS__ )
373 #else /* G_HAVE_GNUC_VARARGS */
374 # define GST_INFO(cat,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, ##args )
375 # define GST_DEBUG(cat,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, ##args )
376 # define GST_INFO_ELEMENT(cat,obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, ##args )
377 # define GST_DEBUG_ELEMENT(cat,obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, ##args )
378 # define GST_DEBUG_ENTER(args...) GST_DEBUG ("entering: " ##args )
379 # define GST_DEBUG_LEAVE(args...) GST_DEBUG ("leaving: " ##args )
380 # define GST_INFO_ENTER(args...) GST_INFO ("entering: " ##args )
381 # define GST_INFO_LEAVE(args...) GST_INFO ("leaving: " ##args )
382 #endif /* G_HAVE_ISO_VARARGS */
384 #endif /* !GST_DEBUG_ENABLE_DEPRECATED */
387 /********** function pointer stuff **********/
388 void* _gst_debug_register_funcptr (void * ptr,
390 gchar* _gst_debug_nameof_funcptr (void * ptr);
394 * @ptr: The function to register
396 * Register a pointer to a function with its name, so it can later be used by
397 * GST_DEBUG_FUNCPTR_NAME().
399 * Returns: The ptr to the function.
401 #define GST_DEBUG_FUNCPTR(ptr) (_gst_debug_register_funcptr((void *)(ptr), #ptr) , ptr)
403 * GST_DEBUG_FUNCPTR_NAME:
404 * @ptr: pointer to the function
406 * Retrieves the name of the function, if it was previously registered with
407 * GST_DEBUG_FUNCPTR(). If not, it returns a description of the pointer.
410 * Make sure you free the string after use.
414 * Returns: The name of the function
416 #define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr)
418 #else /* GST_DISABLE_GST_DEBUG */
421 # pragma GCC poison gst_debug_log
422 # pragma GCC poison gst_debug_logv
423 # pragma GCC poison gst_debug_log_default
424 # pragma GCC poison _gst_debug_category_new
427 #define _gst_debug_init() /* NOP */
429 #define gst_debug_set_log_function(func,data) /* NOP */
430 #define gst_debug_reset_log_function(void) /* NOP */
431 #define gst_debug_set_default_threshold(level) /* NOP */
432 #define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
433 #define gst_debug_category_set_threshold_for_name(name, level) /* NOP */
434 #define gst_debug_category_unset_threshold_for_name(name) /* NOP */
436 #define gst_debug_level_get_name(level) ("NONE")
437 #define gst_debug_add_log_function(func,data) (FALSE)
438 #define gst_debug_remove_log_function(func) (0)
439 #define gst_debug_remove_log_function_by_data(data) (0)
440 #define gst_debug_set_active(active) /* NOP */
441 #define gst_debug_is_active() (FALSE)
442 #define gst_debug_set_colored(colored) /* NOP */
443 #define gst_debug_is_colored() (FALSE)
444 #define gst_debug_set_default_threshold(level) /* NOP */
445 #define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
446 #define gst_debug_set_threshold_for_name(name,level) /* NOP */
447 #define gst_debug_unset_threshold_for_name(name) /* NOP */
449 #define GST_DEBUG_CATEGORY(var) /* NOP */
450 #define GST_DEBUG_CATEGORY_EXTERN(var) /* NOP */
451 #define GST_DEBUG_CATEGORY_STATIC(var) /* NOP */
452 #define GST_DEBUG_CATEGORY_INIT(var,name,color,desc) /* NOP */
453 #define gst_debug_category_free(category) /* NOP */
454 #define gst_debug_category_set_threshold(category,level) /* NOP */
455 #define gst_debug_category_reset_threshold(category) /* NOP */
456 #define gst_debug_category_get_threshold(category) (GST_LEVEL_NONE)
457 #define gst_debug_category_get_name(cat) ("")
458 #define gst_debug_category_get_color(cat) (0)
459 #define gst_debug_category_get_description(cat) ("")
460 #define gst_debug_get_all_categories() (NULL)
461 #define gst_debug_construct_term_color(colorinfo) (g_strdup ("00"))
463 #ifdef G_HAVE_ISO_VARARGS
465 #define GST_CAT_LEVEL_LOG(cat,level,...) /* NOP */
467 #define GST_CAT_ERROR_OBJECT(...) /* NOP */
468 #define GST_CAT_WARNING_OBJECT(...) /* NOP */
469 #define GST_CAT_INFO_OBJECT(...) /* NOP */
470 #define GST_CAT_DEBUG_OBJECT(...) /* NOP */
471 #define GST_CAT_LOG_OBJECT(...) /* NOP */
473 #define GST_CAT_ERROR(...) /* NOP */
474 #define GST_CAT_WARNING(...) /* NOP */
475 #define GST_CAT_INFO(...) /* NOP */
476 #define GST_CAT_DEBUG(...) /* NOP */
477 #define GST_CAT_LOG(...) /* NOP */
479 #define GST_ERROR_OBJECT(...) /* NOP */
480 #define GST_WARNING_OBJECT(...) /* NOP */
481 #define GST_INFO_OBJECT(...) /* NOP */
482 #define GST_DEBUG_OBJECT(...) /* NOP */
483 #define GST_LOG_OBJECT(...) /* NOP */
485 #define GST_ERROR(...) /* NOP */
486 #define GST_WARNING(...) /* NOP */
487 #define GST_INFO(...) /* NOP */
488 #define GST_DEBUG(...) /* NOP */
489 #define GST_LOG(...) /* NOP */
491 #ifdef GST_DEBUG_ENABLE_DEPRECATED
492 #define GST_INFO_ELEMENT(cat,obj,...) /* NOP */
493 #define GST_DEBUG_ELEMENT(cat,obj,...) /* NOP */
494 #define GST_DEBUG_ENTER(...) /* NOP */
495 #define GST_DEBUG_LEAVE(...) /* NOP */
496 #define GST_INFO_ENTER(...) /* NOP */
497 #define GST_INFO_LEAVE(...) /* NOP */
498 #endif /* GST_DEBUG_ENABLE_DEPRECATED */
500 #else /* !G_HAVE_ISO_VARARGS */
502 #define GST_CAT_LEVEL_LOG(cat,level,args...) /* NOP */
504 #define GST_CAT_ERROR_OBJECT(args...) /* NOP */
505 #define GST_CAT_WARNING_OBJECT(args...) /* NOP */
506 #define GST_CAT_INFO_OBJECT(args...) /* NOP */
507 #define GST_CAT_DEBUG_OBJECT(args...) /* NOP */
508 #define GST_CAT_LOG_OBJECT(args...) /* NOP */
510 #define GST_CAT_ERROR(args...) /* NOP */
511 #define GST_CAT_WARNING(args...) /* NOP */
512 #define GST_CAT_INFO(args...) /* NOP */
513 #define GST_CAT_DEBUG(args...) /* NOP */
514 #define GST_CAT_LOG(args...) /* NOP */
516 #define GST_ERROR_OBJECT(args...) /* NOP */
517 #define GST_WARNING_OBJECT(args...) /* NOP */
518 #define GST_INFO_OBJECT(args...) /* NOP */
519 #define GST_DEBUG_OBJECT(args...) /* NOP */
520 #define GST_LOG_OBJECT(args...) /* NOP */
522 #define GST_ERROR(args...) /* NOP */
523 #define GST_WARNING(args...) /* NOP */
524 #define GST_INFO(args...) /* NOP */
525 #define GST_DEBUG(args...) /* NOP */
526 #define GST_LOG(args...) /* NOP */
528 #ifdef GST_DEBUG_ENABLE_DEPRECATED
529 #define GST_INFO_ELEMENT(cat,obj,args...) /* NOP */
530 #define GST_DEBUG_ELEMENT(cat,obj,args...) /* NOP */
531 #define GST_DEBUG_ENTER(args...) /* NOP */
532 #define GST_DEBUG_LEAVE(args...) /* NOP */
533 #define GST_INFO_ENTER(args...) /* NOP */
534 #define GST_INFO_LEAVE(args...) /* NOP */
535 #endif /* GST_DEBUG_ENABLE_DEPRECATED */
537 #endif /* G_HAVE_ISO_VARARGS */
539 #define GST_DEBUG_FUNCPTR(ptr) (ptr)
540 #define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
542 #endif /* GST_DISABLE_GST_DEBUG */
544 void gst_debug_print_stack_trace (void);
546 #endif /* __GSTINFO_H__ */