gstreamer_core/gst/gstinfo.h
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
    25 #define __GSTINFO_H__
    25 #define __GSTINFO_H__
    26 
    26 
    27 #include <glib.h>
    27 #include <glib.h>
    28 #include <glib-object.h>
    28 #include <glib-object.h>
    29 #include <gst/gstconfig.h>
    29 #include <gst/gstconfig.h>
       
    30 
       
    31 
       
    32 #ifndef _MSC_VER
       
    33 #define IMPORT_SYMBOL
       
    34 #else /* _MSC_VER */
       
    35 #ifndef LIBGSTREAMER_EXPORTS
       
    36 #define IMPORT_SYMBOL __declspec(dllimport)
       
    37 #else
       
    38 #define IMPORT_SYMBOL 
       
    39 #endif
       
    40 #endif
    30 
    41 
    31 #ifndef M_PI
    42 #ifndef M_PI
    32 #define M_PI  3.14159265358979323846
    43 #define M_PI  3.14159265358979323846
    33 #endif
    44 #endif
    34 
    45 
    57  *  events.
    68  *  events.
    58  * @GST_LEVEL_LOG: Log messages are messages that are very common but might be
    69  * @GST_LEVEL_LOG: Log messages are messages that are very common but might be
    59  *  useful to know. As a rule of thumb a pipeline that is iterating as expected
    70  *  useful to know. As a rule of thumb a pipeline that is iterating as expected
    60  *  should never output anzthing else but LOG messages.
    71  *  should never output anzthing else but LOG messages.
    61  *  Examples for this are referencing/dereferencing of objects or cothread switches.
    72  *  Examples for this are referencing/dereferencing of objects or cothread switches.
    62  * @GST_LEVEL_FIXME: Fixme messages are messages that indicate that something
       
    63  *  in the executed code path is not fully implemented or handled yet. Note
       
    64  *  that this does not replace proper error handling in any way, the purpose
       
    65  *  of this message is to make it easier to spot incomplete/unfinished pieces
       
    66  *  of code when reading the debug log. (Since: 0.10.23)
       
    67  * @GST_LEVEL_MEMDUMP: memory dump messages are used to log (small) chunks of
       
    68  *  data as memory dumps in the log. They will be displayed as hexdump with
       
    69  *  ASCII characters. (Since: 0.10.23)
       
    70  * @GST_LEVEL_COUNT: The number of defined debugging levels.
    73  * @GST_LEVEL_COUNT: The number of defined debugging levels.
    71  *
    74  *
    72  * The level defines the importance of a debugging message. The more important a
    75  * The level defines the importance of a debugging message. The more important a
    73  * message is, the greater the probability that the debugging system outputs it.
    76  * message is, the greater the probability that the debugging system outputs it.
    74  */
    77  */
    77   GST_LEVEL_ERROR,
    80   GST_LEVEL_ERROR,
    78   GST_LEVEL_WARNING,
    81   GST_LEVEL_WARNING,
    79   GST_LEVEL_INFO,
    82   GST_LEVEL_INFO,
    80   GST_LEVEL_DEBUG,
    83   GST_LEVEL_DEBUG,
    81   GST_LEVEL_LOG,
    84   GST_LEVEL_LOG,
    82   GST_LEVEL_FIXME = 6,
       
    83   /* add more */
       
    84   GST_LEVEL_MEMDUMP = 9,
       
    85   /* add more */
    85   /* add more */
    86   GST_LEVEL_COUNT
    86   GST_LEVEL_COUNT
    87 } GstDebugLevel;
    87 } GstDebugLevel;
    88 
    88 
    89 /**
    89 /**
   211  *
   211  *
   212  * This macro should evaluate to the name of the current function and be should
   212  * This macro should evaluate to the name of the current function and be should
   213  * be defined when configuring your project, as it is compiler dependant. If it
   213  * be defined when configuring your project, as it is compiler dependant. If it
   214  * is not defined, some default value is used. It is used to provide debugging
   214  * is not defined, some default value is used. It is used to provide debugging
   215  * output with the function name of the message.
   215  * output with the function name of the message.
   216  *
       
   217  * Note that this is different from G_STRFUNC as we do not want the full
       
   218  * function signature in C++ code.
       
   219  */
   216  */
   220 #ifndef GST_FUNCTION
   217 #ifndef GST_FUNCTION
   221 #if defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
   218 #if defined (__GNUC__)
   222 #  define GST_FUNCTION     ((const char*) (__FUNCTION__))
   219 #  define GST_FUNCTION     ((const char*) (__FUNCTION__))
   223 #elif defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
   220 #elif defined (G_HAVE_ISO_VARARGS)
   224 #  define GST_FUNCTION     ((const char*) (__func__))
   221 #  define GST_FUNCTION     ((const char*) (__func__))
   225 #else
   222 #else
   226 #  define GST_FUNCTION     ((const char*) (__PRETTY_FUNCTION__))
   223 #  define GST_FUNCTION     ((const char*) ("???"))
   227 #endif
   224 #endif
   228 #endif /* ifndef GST_FUNCTION */
   225 #endif /* ifndef GST_FUNCTION */
   229 
   226 
   230 
   227 
   231 typedef struct _GstDebugMessage GstDebugMessage;
   228 typedef struct _GstDebugMessage GstDebugMessage;
   416  *
   413  *
   417  * Defines a static GstDebugCategory variable.
   414  * Defines a static GstDebugCategory variable.
   418  * This macro expands to nothing if debugging is disabled.
   415  * This macro expands to nothing if debugging is disabled.
   419  */
   416  */
   420 #define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
   417 #define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
   421 
   418 /* do not use this function, use the macros below */
   422 /* do not use this function, use the GST_DEBUG_CATEGORY_INIT macro below */
       
   423 #ifdef __SYMBIAN32__
   419 #ifdef __SYMBIAN32__
   424 IMPORT_C
   420 IMPORT_C
   425 #endif
   421 #endif
   426 
   422 
   427 GstDebugCategory *_gst_debug_category_new (const gchar * name,
   423 GstDebugCategory *_gst_debug_category_new (const gchar * name,
   510 IMPORT_C
   506 IMPORT_C
   511 #endif
   507 #endif
   512 
   508 
   513 GSList *
   509 GSList *
   514         gst_debug_get_all_categories	(void);
   510         gst_debug_get_all_categories	(void);
   515 
   511 #ifdef __SYMBIAN32__
   516 /* do not use this function, use the GST_DEBUG_CATEGORY_GET macro below */
   512 IMPORT_C
   517 #ifdef __SYMBIAN32__
   513 #endif
   518 IMPORT_C
   514 
   519 #endif
   515 
   520 
   516 gchar *	gst_debug_construct_term_color	(guint colorinfo);
   521 GstDebugCategory *_gst_debug_get_category (const gchar *name);
       
   522 
       
   523 /**
       
   524  * GST_DEBUG_CATEGORY_GET:
       
   525  * @cat: the category to initialize.
       
   526  * @name: log category name
       
   527  *
       
   528  * Lookup an exiting #GstDebugCategory by its @name and sets @cat. If category
       
   529  * is not found, but %GST_CAT_DEFAULT is defined, that is assigned to @cat.
       
   530  * Otherwise cat will be NULL.
       
   531  *
       
   532  * |[
       
   533  * GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug);
       
   534  * #define GST_CAT_DEFAULT gst_myplugin_debug
       
   535  * GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
       
   536  * ...
       
   537  * GST_DEBUG_CATEGORY_INIT (gst_myplugin_debug, "myplugin", 0, "nice element");
       
   538  * GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "performance);
       
   539  * ]|
       
   540  *
       
   541  * Since: 0.10.24
       
   542  */
       
   543 #ifdef GST_CAT_DEFAULT
       
   544 #define GST_DEBUG_CATEGORY_GET(cat,name)  G_STMT_START{\
       
   545   cat = _gst_debug_get_category (name);			\
       
   546   if (!cat) {						\
       
   547     cat = GST_CAT_DEFAULT;				\
       
   548   }							\
       
   549 }G_STMT_END
       
   550 #else
       
   551 #define GST_DEBUG_CATEGORY_GET(cat,name)  G_STMT_START{\
       
   552   cat = _gst_debug_get_category (name);			\
       
   553 }G_STMT_END
       
   554 #endif
       
   555 
       
   556 #ifdef __SYMBIAN32__
       
   557 IMPORT_C
       
   558 #endif
       
   559 gchar * gst_debug_construct_term_color	(guint colorinfo);
       
   560 #ifdef __SYMBIAN32__
       
   561 IMPORT_C
       
   562 #endif
       
   563 
       
   564 gint    gst_debug_construct_win_color (guint colorinfo);
       
   565 
   517 
   566 
   518 
   567 /**
   519 /**
   568  * GST_CAT_DEFAULT:
   520  * GST_CAT_DEFAULT:
   569  *
   521  *
   570  * Default gstreamer core debug log category. Please define your own.
   522  * Default gstreamer core debug log category. Please define your own.
   571  */
   523  */
   572 GST_EXPORT GstDebugCategory *	GST_CAT_DEFAULT;
   524 GST_EXPORT GstDebugCategory *	GST_CAT_DEFAULT;
   573 GST_EXPORT GstDebugLevel            __gst_debug_min; 
       
   574 
       
   575 /* this symbol may not be used */
   525 /* this symbol may not be used */
   576 extern gboolean			__gst_debug_enabled;
   526 extern gboolean			__gst_debug_enabled;
   577 
   527 
       
   528 #ifdef __SYMBIAN32__
       
   529 GstDebugCategory ** _GST_CAT_DEFAULT();
       
   530 #ifdef __SYMBIAN32__
       
   531 IMPORT_C
       
   532 #endif
       
   533 
       
   534 gboolean*	gst_debug_enabled();
       
   535 #ifdef __SYMBIAN32__
       
   536 IMPORT_C
       
   537 #endif
       
   538 
       
   539 GstDebugCategory** _GST_CAT_QOS();
       
   540 #ifdef __SYMBIAN32__
       
   541 IMPORT_C
       
   542 #endif
       
   543 
       
   544 GstDebugCategory ** _GST_CAT_DEFAULT();
       
   545 #endif
   578 /* since 0.10.7, the min debug level, used for quickly discarding debug
   546 /* since 0.10.7, the min debug level, used for quickly discarding debug
   579  * messages that fall under the threshold. */
   547  * messages that fall under the threshold. */
   580 #ifdef __SYMBIAN32__
   548 extern IMPORT_SYMBOL GstDebugLevel            __gst_debug_min; 
   581 #ifdef __SYMBIAN32__
       
   582 IMPORT_C
       
   583 #endif
       
   584 GstDebugCategory ** _GST_CAT_DEFAULT();
       
   585 #ifdef __SYMBIAN32__
       
   586 IMPORT_C
       
   587 #endif
       
   588 
       
   589 gboolean*	gst_debug_enabled();
       
   590 #ifdef __SYMBIAN32__
       
   591 IMPORT_C
       
   592 #endif
       
   593 GstDebugCategory** _GST_CAT_QOS();
       
   594 
       
   595 #ifdef __SYMBIAN32__
       
   596 IMPORT_C
       
   597 #endif
       
   598 GstDebugLevel*            gst_debug_min();
       
   599 #endif
       
   600 
   549 
   601 /**
   550 /**
   602  * GST_CAT_LEVEL_LOG:
   551  * GST_CAT_LEVEL_LOG:
   603  * @cat: category to use
   552  * @cat: category to use
   604  * @level: the severity of the message
   553  * @level: the severity of the message
   627 #else /* no variadic macros, use inline */
   576 #else /* no variadic macros, use inline */
   628 static inline void
   577 static inline void
   629 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
   578 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
   630     GstDebugLevel level, gpointer object, const char *format, va_list varargs)
   579     GstDebugLevel level, gpointer object, const char *format, va_list varargs)
   631 {
   580 {
   632 #ifdef __SYMBIAN32__
   581 #ifdef DEBUG_ENABLE
   633   GstDebugCategory** cat1;
   582   GstDebugCategory** cat1;
   634   GstDebugCategory* p;
   583   GstDebugCategory* p;
   635   cat1 = _GST_CAT_DEFAULT();
   584   cat1 = _GST_CAT_DEFAULT();
   636   p = *cat1;
   585   p = *cat1;
   637   if (G_UNLIKELY (level <= __gst_debug_min)) {
   586   if (G_UNLIKELY (level <= __gst_debug_min)) {
   638     gst_debug_log_valist (p, level, "", "", 0, (GObject *) object, format,
   587     gst_debug_log_valist (p, level, "", "", 0, (GObject *) object, format,
   639         varargs);
   588         varargs);
   640     }
       
   641 #else
       
   642     if (G_UNLIKELY (level <= __gst_debug_min)) {
       
   643       gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
       
   644           varargs);
       
   645   }
   589   }
   646 #endif
   590 #endif
   647 }
   591 }
   648 
   592 
   649 static inline void
   593 static inline void
   656   GST_CAT_LEVEL_LOG_valist (cat, level, object, format, varargs);
   600   GST_CAT_LEVEL_LOG_valist (cat, level, object, format, varargs);
   657   va_end (varargs);
   601   va_end (varargs);
   658 }
   602 }
   659 #endif
   603 #endif
   660 #endif /* G_HAVE_ISO_VARARGS */
   604 #endif /* G_HAVE_ISO_VARARGS */
   661 
       
   662 /* private helper function */
       
   663 #ifdef __SYMBIAN32__
       
   664 IMPORT_C
       
   665 #endif
       
   666 
       
   667 void _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
       
   668     const gchar * func, gint line, GObject * obj, const gchar * msg,
       
   669     const guint8 * data, guint length);
       
   670 
       
   671 /* This one doesn't have varargs in the macro, so it's different than all the
       
   672  * other macros and hence in a separate block right here. Docs chunks are
       
   673  * with the other doc chunks below though. */
       
   674 #define __GST_CAT_MEMDUMP_LOG(cat,object,msg,data,length) G_STMT_START{       \
       
   675   if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= __gst_debug_min)) {                    \
       
   676     _gst_debug_dump_mem ((cat), __FILE__, GST_FUNCTION, __LINE__,             \
       
   677         (GObject *) (object), (msg), (data), (length));                       \
       
   678   }                                                                           \
       
   679 }G_STMT_END
       
   680 
       
   681 #define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length)  \
       
   682     __GST_CAT_MEMDUMP_LOG(cat,obj,msg,data,length)
       
   683 #define GST_CAT_MEMDUMP(cat,msg,data,length)             \
       
   684     __GST_CAT_MEMDUMP_LOG(cat,NULL,msg,data,length)
       
   685 #define GST_MEMDUMP_OBJECT(obj,msg,data,length)          \
       
   686     __GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,obj,msg,data,length)
       
   687 #define GST_MEMDUMP(msg,data,length)                     \
       
   688     __GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,NULL,msg,data,length)
       
   689 
   605 
   690 /**
   606 /**
   691  * GST_CAT_ERROR_OBJECT:
   607  * GST_CAT_ERROR_OBJECT:
   692  * @cat: category to use
   608  * @cat: category to use
   693  * @obj: the #GObject the message belongs to
   609  * @obj: the #GObject the message belongs to
   726  * @obj: the #GObject the message belongs to
   642  * @obj: the #GObject the message belongs to
   727  * @...: printf-style message to output
   643  * @...: printf-style message to output
   728  *
   644  *
   729  * Output an logging message belonging to the given object in the given category.
   645  * Output an logging message belonging to the given object in the given category.
   730  */
   646  */
   731 /**
       
   732  * GST_CAT_FIXME_OBJECT:
       
   733  * @cat: category to use
       
   734  * @obj: the #GObject the message belongs to
       
   735  * @...: printf-style message to output
       
   736  *
       
   737  * Output a fixme message belonging to the given object in the given category.
       
   738  *
       
   739  * Since: 0.10.23
       
   740  */
       
   741 /**
       
   742  * GST_CAT_MEMDUMP_OBJECT:
       
   743  * @cat: category to use
       
   744  * @obj: the #GObject the message belongs to
       
   745  * @msg: message string to log with the data
       
   746  * @data: pointer to the data to output
       
   747  * @length: length of the data to output
       
   748  *
       
   749  * Output a hexdump of @data relating to the given object in the given
       
   750  * category.
       
   751  *
       
   752  * Since: 0.10.23
       
   753  */
       
   754 
   647 
   755 
   648 
   756 /**
   649 /**
   757  * GST_CAT_ERROR:
   650  * GST_CAT_ERROR:
   758  * @cat: category to use
   651  * @cat: category to use
   786  * @cat: category to use
   679  * @cat: category to use
   787  * @...: printf-style message to output
   680  * @...: printf-style message to output
   788  *
   681  *
   789  * Output an logging message in the given category.
   682  * Output an logging message in the given category.
   790  */
   683  */
   791 /**
       
   792  * GST_CAT_FIXME:
       
   793  * @cat: category to use
       
   794  * @...: printf-style message to output
       
   795  *
       
   796  * Output an fixme message in the given category.
       
   797  *
       
   798  * Since: 0.10.23
       
   799  */
       
   800 /**
       
   801  * GST_CAT_MEMDUMP:
       
   802  * @cat: category to use
       
   803  * @msg: message string to log with the data
       
   804  * @data: pointer to the data to output
       
   805  * @length: length of the data to output
       
   806  *
       
   807  * Output a hexdump of @data in the given category.
       
   808  *
       
   809  * Since: 0.10.23
       
   810  */
       
   811 
   684 
   812 
   685 
   813 /**
   686 /**
   814  * GST_ERROR_OBJECT:
   687  * GST_ERROR_OBJECT:
   815  * @obj: the #GObject the message belongs to
   688  * @obj: the #GObject the message belongs to
   845  * @obj: the #GObject the message belongs to
   718  * @obj: the #GObject the message belongs to
   846  * @...: printf-style message to output
   719  * @...: printf-style message to output
   847  *
   720  *
   848  * Output a logging message belonging to the given object in the default category.
   721  * Output a logging message belonging to the given object in the default category.
   849  */
   722  */
   850 /**
       
   851  * GST_FIXME_OBJECT:
       
   852  * @obj: the #GObject the message belongs to
       
   853  * @...: printf-style message to output
       
   854  *
       
   855  * Output a logging message belonging to the given object in the default category.
       
   856  *
       
   857  * Since: 0.10.23
       
   858  */
       
   859 /**
       
   860  * GST_MEMDUMP_OBJECT:
       
   861  * @obj: the #GObject the message belongs to
       
   862  * @msg: message string to log with the data
       
   863  * @data: pointer to the data to output
       
   864  * @length: length of the data to output
       
   865  *
       
   866  * Output a logging message belonging to the given object in the default category.
       
   867  *
       
   868  * Since: 0.10.23
       
   869  */
       
   870 
   723 
   871 
   724 
   872 /**
   725 /**
   873  * GST_ERROR:
   726  * GST_ERROR:
   874  * @...: printf-style message to output
   727  * @...: printf-style message to output
   896 /**
   749 /**
   897  * GST_LOG:
   750  * GST_LOG:
   898  * @...: printf-style message to output
   751  * @...: printf-style message to output
   899  *
   752  *
   900  * Output a logging message in the default category.
   753  * Output a logging message in the default category.
   901  */
       
   902 /**
       
   903  * GST_FIXME:
       
   904  * @...: printf-style message to output
       
   905  *
       
   906  * Output a fixme message in the default category.
       
   907  *
       
   908  * Since: 0.10.23
       
   909  */
       
   910 /**
       
   911  * GST_MEMDUMP:
       
   912  * @msg: message string to log with the data
       
   913  * @data: pointer to the data to output
       
   914  * @length: length of the data to output
       
   915  *
       
   916  * Output a hexdump of @data.
       
   917  *
       
   918  * Since: 0.10.23
       
   919  */
   754  */
   920 
   755 
   921 #ifdef G_HAVE_ISO_VARARGS
   756 #ifdef G_HAVE_ISO_VARARGS
   922 
   757 
   923 #define GST_CAT_ERROR_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   obj,  __VA_ARGS__)
   758 #define GST_CAT_ERROR_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   obj,  __VA_ARGS__)
   924 #define GST_CAT_WARNING_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj,  __VA_ARGS__)
   759 #define GST_CAT_WARNING_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj,  __VA_ARGS__)
   925 #define GST_CAT_INFO_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    obj,  __VA_ARGS__)
   760 #define GST_CAT_INFO_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    obj,  __VA_ARGS__)
   926 #define GST_CAT_DEBUG_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
   761 #define GST_CAT_DEBUG_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
   927 #define GST_CAT_LOG_OBJECT(cat,obj,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     obj,  __VA_ARGS__)
   762 #define GST_CAT_LOG_OBJECT(cat,obj,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     obj,  __VA_ARGS__)
   928 #define GST_CAT_FIXME_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME,   obj,  __VA_ARGS__)
       
   929 
   763 
   930 #define GST_CAT_ERROR(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)
   764 #define GST_CAT_ERROR(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)
   931 #define GST_CAT_WARNING(cat,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
   765 #define GST_CAT_WARNING(cat,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
   932 #define GST_CAT_INFO(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    NULL, __VA_ARGS__)
   766 #define GST_CAT_INFO(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    NULL, __VA_ARGS__)
   933 #define GST_CAT_DEBUG(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
   767 #define GST_CAT_DEBUG(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
   934 #define GST_CAT_LOG(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     NULL, __VA_ARGS__)
   768 #define GST_CAT_LOG(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     NULL, __VA_ARGS__)
   935 #define GST_CAT_FIXME(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME,   NULL, __VA_ARGS__)
       
   936 
   769 
   937 #define GST_ERROR_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   obj,  __VA_ARGS__)
   770 #define GST_ERROR_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   obj,  __VA_ARGS__)
   938 #define GST_WARNING_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  __VA_ARGS__)
   771 #define GST_WARNING_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  __VA_ARGS__)
   939 #define GST_INFO_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    obj,  __VA_ARGS__)
   772 #define GST_INFO_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    obj,  __VA_ARGS__)
   940 #define GST_DEBUG_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
   773 #define GST_DEBUG_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
   941 #define GST_LOG_OBJECT(obj,...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     obj,  __VA_ARGS__)
   774 #define GST_LOG_OBJECT(obj,...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     obj,  __VA_ARGS__)
   942 #define GST_FIXME_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   obj,  __VA_ARGS__)
       
   943 
   775 
   944 #define GST_ERROR(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)
   776 #define GST_ERROR(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)
   945 #define GST_WARNING(...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
   777 #define GST_WARNING(...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
   946 #define GST_INFO(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    NULL, __VA_ARGS__)
   778 #define GST_INFO(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    NULL, __VA_ARGS__)
   947 #define GST_DEBUG(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
   779 #define GST_DEBUG(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
   948 #define GST_LOG(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     NULL, __VA_ARGS__)
   780 #define GST_LOG(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     NULL, __VA_ARGS__)
   949 #define GST_FIXME(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   NULL, __VA_ARGS__)
       
   950 
   781 
   951 #else
   782 #else
   952 #ifdef G_HAVE_GNUC_VARARGS
   783 #ifdef G_HAVE_GNUC_VARARGS
   953 
   784 
   954 #define GST_CAT_ERROR_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   obj,  ##args )
   785 #define GST_CAT_ERROR_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   obj,  ##args )
   955 #define GST_CAT_WARNING_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj,  ##args )
   786 #define GST_CAT_WARNING_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj,  ##args )
   956 #define GST_CAT_INFO_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    obj,  ##args )
   787 #define GST_CAT_INFO_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    obj,  ##args )
   957 #define GST_CAT_DEBUG_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   obj,  ##args )
   788 #define GST_CAT_DEBUG_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   obj,  ##args )
   958 #define GST_CAT_LOG_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     obj,  ##args )
   789 #define GST_CAT_LOG_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     obj,  ##args )
   959 #define GST_CAT_FIXME_OBJECT(cat,obj,args...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME,   obj,  ##args )
       
   960 
   790 
   961 #define GST_CAT_ERROR(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   NULL, ##args )
   791 #define GST_CAT_ERROR(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   NULL, ##args )
   962 #define GST_CAT_WARNING(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, ##args )
   792 #define GST_CAT_WARNING(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, ##args )
   963 #define GST_CAT_INFO(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    NULL, ##args )
   793 #define GST_CAT_INFO(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    NULL, ##args )
   964 #define GST_CAT_DEBUG(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   NULL, ##args )
   794 #define GST_CAT_DEBUG(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   NULL, ##args )
   965 #define GST_CAT_LOG(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     NULL, ##args )
   795 #define GST_CAT_LOG(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     NULL, ##args )
   966 #define GST_CAT_FIXME(cat,args...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME,   NULL, ##args )
       
   967 
   796 
   968 #define GST_ERROR_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   obj,  ##args )
   797 #define GST_ERROR_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   obj,  ##args )
   969 #define GST_WARNING_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  ##args )
   798 #define GST_WARNING_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  ##args )
   970 #define GST_INFO_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    obj,  ##args )
   799 #define GST_INFO_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    obj,  ##args )
   971 #define GST_DEBUG_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  ##args )
   800 #define GST_DEBUG_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  ##args )
   972 #define GST_LOG_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     obj,  ##args )
   801 #define GST_LOG_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     obj,  ##args )
   973 #define GST_FIXME_OBJECT(obj,args...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   obj,  ##args )
       
   974 
   802 
   975 #define GST_ERROR(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, ##args )
   803 #define GST_ERROR(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, ##args )
   976 #define GST_WARNING(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, ##args )
   804 #define GST_WARNING(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, ##args )
   977 #define GST_INFO(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    NULL, ##args )
   805 #define GST_INFO(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    NULL, ##args )
   978 #define GST_DEBUG(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, ##args )
   806 #define GST_DEBUG(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, ##args )
   979 #define GST_LOG(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     NULL, ##args )
   807 #define GST_LOG(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     NULL, ##args )
   980 #define GST_FIXME(args...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   NULL, ##args )
       
   981 
   808 
   982 #else
   809 #else
   983 /* no variadic macros, use inline */
   810 /* no variadic macros, use inline */
   984 static inline void
   811 static inline void
   985 GST_CAT_ERROR_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
   812 GST_CAT_ERROR_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
  1035   GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, obj, format, varargs);
   862   GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, obj, format, varargs);
  1036   va_end (varargs);
   863   va_end (varargs);
  1037 }
   864 }
  1038 
   865 
  1039 static inline void
   866 static inline void
  1040 GST_CAT_FIXME_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
       
  1041     ...)
       
  1042 {
       
  1043   va_list varargs;
       
  1044 
       
  1045   va_start (varargs, format);
       
  1046   GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_FIXME, obj, format, varargs);
       
  1047   va_end (varargs);
       
  1048 }
       
  1049 
       
  1050 static inline void
       
  1051 GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
   867 GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
  1052 {
   868 {
  1053   va_list varargs;
   869   va_list varargs;
  1054 
   870 
  1055   va_start (varargs, format);
   871   va_start (varargs, format);
  1092 {
   908 {
  1093   va_list varargs;
   909   va_list varargs;
  1094 
   910 
  1095   va_start (varargs, format);
   911   va_start (varargs, format);
  1096   GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, NULL, format, varargs);
   912   GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, NULL, format, varargs);
  1097   va_end (varargs);
       
  1098 }
       
  1099 
       
  1100 static inline void
       
  1101 GST_CAT_FIXME (GstDebugCategory * cat, const char *format, ...)
       
  1102 {
       
  1103   va_list varargs;
       
  1104 
       
  1105   va_start (varargs, format);
       
  1106   GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_FIXME, NULL, format, varargs);
       
  1107   va_end (varargs);
   913   va_end (varargs);
  1108 }
   914 }
  1109 
   915 
  1110 static inline void
   916 static inline void
  1111 GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
   917 GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
  1161       varargs);
   967       varargs);
  1162   va_end (varargs);
   968   va_end (varargs);
  1163 }
   969 }
  1164 
   970 
  1165 static inline void
   971 static inline void
  1166 GST_FIXME_OBJECT (gpointer obj, const char *format, ...)
       
  1167 {
       
  1168   va_list varargs;
       
  1169 
       
  1170   va_start (varargs, format);
       
  1171   GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, format,
       
  1172       varargs);
       
  1173   va_end (varargs);
       
  1174 }
       
  1175 
       
  1176 static inline void
       
  1177 GST_ERROR (const char *format, ...)
   972 GST_ERROR (const char *format, ...)
  1178 {
   973 {
  1179   va_list varargs;
   974   va_list varargs;
  1180 
   975 
  1181   va_start (varargs, format);
   976   va_start (varargs, format);
  1225   va_start (varargs, format);
  1020   va_start (varargs, format);
  1226   GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL,
  1021   GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL,
  1227       format, varargs);
  1022       format, varargs);
  1228   va_end (varargs);
  1023   va_end (varargs);
  1229 }
  1024 }
  1230 
       
  1231 static inline void
       
  1232 GST_FIXME (const char *format, ...)
       
  1233 {
       
  1234   va_list varargs;
       
  1235 
       
  1236   va_start (varargs, format);
       
  1237   GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, format,
       
  1238       varargs);
       
  1239   va_end (varargs);
       
  1240 }
       
  1241 #endif
  1025 #endif
  1242 #endif
  1026 #endif
  1243 
  1027 
  1244 
  1028 
  1245 /********** function pointer stuff **********/
  1029 /********** function pointer stuff **********/
  1282   _gst_debug_nameof_funcptr((GstDebugFuncPtr)ptr)
  1066   _gst_debug_nameof_funcptr((GstDebugFuncPtr)ptr)
  1283 
  1067 
  1284 
  1068 
  1285 #else /* GST_DISABLE_GST_DEBUG */
  1069 #else /* GST_DISABLE_GST_DEBUG */
  1286 
  1070 
  1287 
       
  1288 #ifndef GST_INFO_C
       
  1289 
  1071 
  1290 #if defined(__GNUC__) && __GNUC__ >= 3
  1072 #if defined(__GNUC__) && __GNUC__ >= 3
  1291 #  pragma GCC poison gst_debug_log
  1073 #  pragma GCC poison gst_debug_log
  1292 #  pragma GCC poison gst_debug_log_valist
  1074 #  pragma GCC poison gst_debug_log_valist
  1293 #  pragma GCC poison _gst_debug_category_new
  1075 #  pragma GCC poison _gst_debug_category_new
  1294 #endif
  1076 #endif
  1295 
  1077 
  1296 #define __gst_debug_min GST_LEVEL_NONE
       
  1297 
       
  1298 #define _gst_debug_init()				/* NOP */
  1078 #define _gst_debug_init()				/* NOP */
  1299 
  1079 
  1300 #define gst_debug_set_default_threshold(level)		/* NOP */
  1080 #define gst_debug_set_default_threshold(level)		/* NOP */
  1301 #define gst_debug_get_default_threshold()		(GST_LEVEL_NONE)
  1081 #define gst_debug_get_default_threshold()		(GST_LEVEL_NONE)
  1302 
  1082 
  1303 #define gst_debug_level_get_name(level)				("NONE")
  1083 #define gst_debug_level_get_name(level)				("NONE")
  1304 #define gst_debug_message_get(message)  			("")
  1084 #define gst_debug_message_get(message)  			("NONE")
  1305 #define gst_debug_add_log_function(func,data)		/* NOP */
  1085 #define gst_debug_add_log_function(func,data)		/* NOP */
  1306 guint gst_debug_remove_log_function (GstLogFunction func);
  1086 guint gst_debug_remove_log_function (GstLogFunction func);
  1307 guint gst_debug_remove_log_function_by_data (gpointer data);
  1087 guint gst_debug_remove_log_function_by_data (gpointer data);
  1308 #define gst_debug_set_active(active)			/* NOP */
  1088 #define gst_debug_set_active(active)			/* NOP */
  1309 #define gst_debug_is_active()				(FALSE)
  1089 #define gst_debug_is_active()				(FALSE)
  1320 #define GST_DEBUG_CATEGORY_STATIC(var)			static GstDebugCategory *var = NULL
  1100 #define GST_DEBUG_CATEGORY_STATIC(var)			static GstDebugCategory *var = NULL
  1321 #else
  1101 #else
  1322 #define GST_DEBUG_CATEGORY_STATIC(var)			/* NOP */
  1102 #define GST_DEBUG_CATEGORY_STATIC(var)			/* NOP */
  1323 #endif
  1103 #endif
  1324 #define GST_DEBUG_CATEGORY_INIT(var,name,color,desc)	/* NOP */
  1104 #define GST_DEBUG_CATEGORY_INIT(var,name,color,desc)	/* NOP */
  1325 #define GST_DEBUG_CATEGORY_GET(var,name)		/* NOP */
       
  1326 #define gst_debug_category_free(category)		/* NOP */
  1105 #define gst_debug_category_free(category)		/* NOP */
  1327 #define gst_debug_category_set_threshold(category,level) /* NOP */
  1106 #define gst_debug_category_set_threshold(category,level) /* NOP */
  1328 #define gst_debug_category_reset_threshold(category)	/* NOP */
  1107 #define gst_debug_category_reset_threshold(category)	/* NOP */
  1329 #define gst_debug_category_get_threshold(category)	(GST_LEVEL_NONE)
  1108 #define gst_debug_category_get_threshold(category)	(GST_LEVEL_NONE)
  1330 #define gst_debug_category_get_name(cat)		("")
  1109 #define gst_debug_category_get_name(cat)		("")
  1331 #define gst_debug_category_get_color(cat)		(0)
  1110 #define gst_debug_category_get_color(cat)		(0)
  1332 #define gst_debug_category_get_description(cat)		("")
  1111 #define gst_debug_category_get_description(cat)		("")
  1333 #define gst_debug_get_all_categories()			(NULL)
  1112 #define gst_debug_get_all_categories()			(NULL)
  1334 #define gst_debug_construct_term_color(colorinfo)	(g_strdup ("00"))
  1113 #define gst_debug_construct_term_color(colorinfo)	(g_strdup ("00"))
  1335 #define gst_debug_construct_win_color(colorinfo)	(0)
       
  1336 
       
  1337 #endif /* !GST_INFO_C */
       
  1338 
  1114 
  1339 #ifdef G_HAVE_ISO_VARARGS
  1115 #ifdef G_HAVE_ISO_VARARGS
  1340 
  1116 
  1341 #define GST_CAT_LEVEL_LOG(cat,level,...)		/* NOP */
  1117 #define GST_CAT_LEVEL_LOG(cat,level,...)		/* NOP */
  1342 
  1118 
  1343 #define GST_CAT_ERROR_OBJECT(...)			/* NOP */
  1119 #define GST_CAT_ERROR_OBJECT(...)			/* NOP */
  1344 #define GST_CAT_WARNING_OBJECT(...)			/* NOP */
  1120 #define GST_CAT_WARNING_OBJECT(...)			/* NOP */
  1345 #define GST_CAT_INFO_OBJECT(...)			/* NOP */
  1121 #define GST_CAT_INFO_OBJECT(...)			/* NOP */
  1346 #define GST_CAT_DEBUG_OBJECT(...)			/* NOP */
  1122 #define GST_CAT_DEBUG_OBJECT(...)			/* NOP */
  1347 #define GST_CAT_LOG_OBJECT(...)				/* NOP */
  1123 #define GST_CAT_LOG_OBJECT(...)				/* NOP */
  1348 #define GST_CAT_FIXME_OBJECT(...)			/* NOP */
       
  1349 
  1124 
  1350 #define GST_CAT_ERROR(...)				/* NOP */
  1125 #define GST_CAT_ERROR(...)				/* NOP */
  1351 #define GST_CAT_WARNING(...)				/* NOP */
  1126 #define GST_CAT_WARNING(...)				/* NOP */
  1352 #define GST_CAT_INFO(...)				/* NOP */
  1127 #define GST_CAT_INFO(...)				/* NOP */
  1353 #define GST_CAT_DEBUG(...)				/* NOP */
  1128 #define GST_CAT_DEBUG(...)				/* NOP */
  1354 #define GST_CAT_LOG(...)				/* NOP */
  1129 #define GST_CAT_LOG(...)				/* NOP */
  1355 #define GST_CAT_FIXME(...)				/* NOP */
       
  1356 
  1130 
  1357 #define GST_ERROR_OBJECT(...)				/* NOP */
  1131 #define GST_ERROR_OBJECT(...)				/* NOP */
  1358 #define GST_WARNING_OBJECT(...)				/* NOP */
  1132 #define GST_WARNING_OBJECT(...)				/* NOP */
  1359 #define GST_INFO_OBJECT(...)				/* NOP */
  1133 #define GST_INFO_OBJECT(...)				/* NOP */
  1360 #define GST_DEBUG_OBJECT(...)				/* NOP */
  1134 #define GST_DEBUG_OBJECT(...)				/* NOP */
  1361 #define GST_LOG_OBJECT(...)				/* NOP */
  1135 #define GST_LOG_OBJECT(...)				/* NOP */
  1362 #define GST_FIXME_OBJECT(...)				/* NOP */
       
  1363 
  1136 
  1364 #define GST_ERROR(...)					/* NOP */
  1137 #define GST_ERROR(...)					/* NOP */
  1365 #define GST_WARNING(...)				/* NOP */
  1138 #define GST_WARNING(...)				/* NOP */
  1366 #define GST_INFO(...)					/* NOP */
  1139 #define GST_INFO(...)					/* NOP */
  1367 #define GST_DEBUG(...)					/* NOP */
  1140 #define GST_DEBUG(...)					/* NOP */
  1368 #define GST_LOG(...)					/* NOP */
  1141 #define GST_LOG(...)					/* NOP */
  1369 #define GST_FIXME(...)					/* NOP */
  1142 
  1370 
  1143 #else
  1371 #else /* !G_HAVE_ISO_VARARGS */
       
  1372 #ifdef G_HAVE_GNUC_VARARGS
  1144 #ifdef G_HAVE_GNUC_VARARGS
  1373 
  1145 
  1374 #define GST_CAT_LEVEL_LOG(cat,level,args...)		/* NOP */
  1146 #define GST_CAT_LEVEL_LOG(cat,level,args...)		/* NOP */
  1375 
  1147 
  1376 #define GST_CAT_ERROR_OBJECT(args...)			/* NOP */
  1148 #define GST_CAT_ERROR_OBJECT(args...)			/* NOP */
  1377 #define GST_CAT_WARNING_OBJECT(args...)			/* NOP */
  1149 #define GST_CAT_WARNING_OBJECT(args...)			/* NOP */
  1378 #define GST_CAT_INFO_OBJECT(args...)			/* NOP */
  1150 #define GST_CAT_INFO_OBJECT(args...)			/* NOP */
  1379 #define GST_CAT_DEBUG_OBJECT(args...)			/* NOP */
  1151 #define GST_CAT_DEBUG_OBJECT(args...)			/* NOP */
  1380 #define GST_CAT_LOG_OBJECT(args...)			/* NOP */
  1152 #define GST_CAT_LOG_OBJECT(args...)			/* NOP */
  1381 #define GST_CAT_FIXME_OBJECT(args...)			/* NOP */
       
  1382 
  1153 
  1383 #define GST_CAT_ERROR(args...)				/* NOP */
  1154 #define GST_CAT_ERROR(args...)				/* NOP */
  1384 #define GST_CAT_WARNING(args...)			/* NOP */
  1155 #define GST_CAT_WARNING(args...)			/* NOP */
  1385 #define GST_CAT_INFO(args...)				/* NOP */
  1156 #define GST_CAT_INFO(args...)				/* NOP */
  1386 #define GST_CAT_DEBUG(args...)				/* NOP */
  1157 #define GST_CAT_DEBUG(args...)				/* NOP */
  1387 #define GST_CAT_LOG(args...)				/* NOP */
  1158 #define GST_CAT_LOG(args...)				/* NOP */
  1388 #define GST_CAT_FIXME(args...)				/* NOP */
       
  1389 
  1159 
  1390 #define GST_ERROR_OBJECT(args...)			/* NOP */
  1160 #define GST_ERROR_OBJECT(args...)			/* NOP */
  1391 #define GST_WARNING_OBJECT(args...)			/* NOP */
  1161 #define GST_WARNING_OBJECT(args...)			/* NOP */
  1392 #define GST_INFO_OBJECT(args...)			/* NOP */
  1162 #define GST_INFO_OBJECT(args...)			/* NOP */
  1393 #define GST_DEBUG_OBJECT(args...)			/* NOP */
  1163 #define GST_DEBUG_OBJECT(args...)			/* NOP */
  1394 #define GST_LOG_OBJECT(args...)				/* NOP */
  1164 #define GST_LOG_OBJECT(args...)				/* NOP */
  1395 #define GST_FIXME_OBJECT(args...)			/* NOP */
       
  1396 
  1165 
  1397 #define GST_ERROR(args...)				/* NOP */
  1166 #define GST_ERROR(args...)				/* NOP */
  1398 #define GST_WARNING(args...)				/* NOP */
  1167 #define GST_WARNING(args...)				/* NOP */
  1399 #define GST_INFO(args...)				/* NOP */
  1168 #define GST_INFO(args...)				/* NOP */
  1400 #define GST_DEBUG(args...)				/* NOP */
  1169 #define GST_DEBUG(args...)				/* NOP */
  1401 #define GST_LOG(args...)				/* NOP */
  1170 #define GST_LOG(args...)				/* NOP */
  1402 #define GST_FIXME(args...)				/* NOP */
  1171 
  1403 
  1172 #else
  1404 #else /* !G_HAVE_GNUC_VARARGS */
       
  1405 static inline void
  1173 static inline void
  1406 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
  1174 GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
  1407     GstDebugLevel level, gpointer object, const char *format, va_list varargs)
  1175     GstDebugLevel level, gpointer object, const char *format, va_list varargs)
  1408 {
  1176 {
  1409 }
  1177 }
  1437     ...)
  1205     ...)
  1438 {
  1206 {
  1439 }
  1207 }
  1440 
  1208 
  1441 static inline void
  1209 static inline void
  1442 GST_CAT_FIXME_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
       
  1443     ...)
       
  1444 {
       
  1445 }
       
  1446 
       
  1447 static inline void
       
  1448 GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
  1210 GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
  1449 {
  1211 {
  1450 }
  1212 }
  1451 
  1213 
  1452 static inline void
  1214 static inline void
  1468 GST_CAT_LOG (GstDebugCategory * cat, const char *format, ...)
  1230 GST_CAT_LOG (GstDebugCategory * cat, const char *format, ...)
  1469 {
  1231 {
  1470 }
  1232 }
  1471 
  1233 
  1472 static inline void
  1234 static inline void
  1473 GST_CAT_FIXME (GstDebugCategory * cat, const char *format, ...)
       
  1474 {
       
  1475 }
       
  1476 
       
  1477 static inline void
       
  1478 GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
  1235 GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
  1479 {
  1236 {
  1480 }
  1237 }
  1481 
  1238 
  1482 static inline void
  1239 static inline void
  1498 GST_LOG_OBJECT (gpointer obj, const char *format, ...)
  1255 GST_LOG_OBJECT (gpointer obj, const char *format, ...)
  1499 {
  1256 {
  1500 }
  1257 }
  1501 
  1258 
  1502 static inline void
  1259 static inline void
  1503 GST_FIXME_OBJECT (gpointer obj, const char *format, ...)
       
  1504 {
       
  1505 }
       
  1506 
       
  1507 static inline void
       
  1508 GST_ERROR (const char *format, ...)
  1260 GST_ERROR (const char *format, ...)
  1509 {
  1261 {
  1510 }
  1262 }
  1511 
  1263 
  1512 static inline void
  1264 static inline void
  1526 
  1278 
  1527 static inline void
  1279 static inline void
  1528 GST_LOG (const char *format, ...)
  1280 GST_LOG (const char *format, ...)
  1529 {
  1281 {
  1530 }
  1282 }
  1531 
  1283 #endif
  1532 static inline void
  1284 #endif
  1533 GST_FIXME (const char *format, ...)
       
  1534 {
       
  1535 }
       
  1536 
       
  1537 #endif /* G_HAVE_GNUC_VARARGS */
       
  1538 #endif /* G_HAVE_ISO_VARARGS */
       
  1539 
  1285 
  1540 #define GST_DEBUG_FUNCPTR(ptr) (ptr)
  1286 #define GST_DEBUG_FUNCPTR(ptr) (ptr)
  1541 #define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
  1287 #define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
  1542 
  1288 
  1543 #define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length) /* NOP */
       
  1544 #define GST_CAT_MEMDUMP(cat,msg,data,length)            /* NOP */
       
  1545 #define GST_MEMDUMP_OBJECT(obj,msg,data,length)         /* NOP */
       
  1546 #define GST_MEMDUMP(msg,data,length)                    /* NOP */
       
  1547 
       
  1548 #endif /* GST_DISABLE_GST_DEBUG */
  1289 #endif /* GST_DISABLE_GST_DEBUG */
  1549 #ifdef __SYMBIAN32__
       
  1550 IMPORT_C
       
  1551 #endif
       
  1552 
  1290 
  1553 
  1291 
  1554 void gst_debug_print_stack_trace (void);
  1292 void gst_debug_print_stack_trace (void);
  1555 
  1293 
  1556 G_END_DECLS
  1294 G_END_DECLS