2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
2003-06-29 14:05:49 +00:00
|
|
|
* 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
2000-12-28 22:12:02 +00:00
|
|
|
*
|
2003-06-29 14:05:49 +00:00
|
|
|
* gstinfo.h: debugging functions
|
Changes made to the DEBUG system. New header file gstdebug.h holds the stuff to keep it out of gst.h's hair. DEBUG ...
Original commit message from CVS:
Changes made to the DEBUG system. New header file gstdebug.h holds the
stuff to keep it out of gst.h's hair. DEBUG prints out the process id,
cothread id, source filename and line number. Two new macros DEBUG_ENTER
and DEBUG_LEAVE are used to show the entry and exit of a given function.
This eventually might be used to construct call trace graphs, even taking
cothreads into account. This would be quite useful in visualizing the
scheduling mechanism.
Minor changes to various debug messages.
Also sitting in gstdebug.h is a prototypical DEBUG_ENTER that's capable of
performing DEBUG_LEAVE automatically. It does this by utilizing a
little-known GCC extension that allows one to call a function with the
same parameters as the current function. The macro uses this to basically
call itself. A boolean is used to ensure that when it calls itself it
actually runs the body of the function. In the meantime it prints stuff
out before and after the real function, as well as constructing a
debugging string. This can be used eventually to provide call-wide data
on the DEBUG lines, instead of having to replicate data on each call to
DEBUG. More research is needed into how this would most cleanly be fit
into some other chunk of code, like GStreamer (I think of this DEBUG trick
as a separate project, sorta).
Unfortunately, the aforementioned DEBUG trick interacts quite poorly with
cothreads. Almost any time it's used in a function that has anything
remotely to do with a cothread context (as in, it runs in one), a segfault
results from the __builtin_apply call, which is the heart of the whole
thing. If someone who really knows assembly could analyze the resulting
code to see what's really going on, we might find a way to fix either the
macro or the cothreads (I'm thinking that there's something we missed in
constructing the cothreads themselves) so this works in all cases.
In the meantime, please insert both DEBUG_ENTER and DEBUG_LEAVE in your
functions. Be sure to put DEBUG_ENTER after your variable declarations
and before any functional code, not to put the function name in any DEBUG
strings (it's already there, trust me), and put a DEBUG_LEAVE if you care
enough.
Changes are going to happen in the way DEBUGs and other printouts occur,
so stay tuned.
2000-12-04 09:35:08 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
Changes made to the DEBUG system. New header file gstdebug.h holds the stuff to keep it out of gst.h's hair. DEBUG ...
Original commit message from CVS:
Changes made to the DEBUG system. New header file gstdebug.h holds the
stuff to keep it out of gst.h's hair. DEBUG prints out the process id,
cothread id, source filename and line number. Two new macros DEBUG_ENTER
and DEBUG_LEAVE are used to show the entry and exit of a given function.
This eventually might be used to construct call trace graphs, even taking
cothreads into account. This would be quite useful in visualizing the
scheduling mechanism.
Minor changes to various debug messages.
Also sitting in gstdebug.h is a prototypical DEBUG_ENTER that's capable of
performing DEBUG_LEAVE automatically. It does this by utilizing a
little-known GCC extension that allows one to call a function with the
same parameters as the current function. The macro uses this to basically
call itself. A boolean is used to ensure that when it calls itself it
actually runs the body of the function. In the meantime it prints stuff
out before and after the real function, as well as constructing a
debugging string. This can be used eventually to provide call-wide data
on the DEBUG lines, instead of having to replicate data on each call to
DEBUG. More research is needed into how this would most cleanly be fit
into some other chunk of code, like GStreamer (I think of this DEBUG trick
as a separate project, sorta).
Unfortunately, the aforementioned DEBUG trick interacts quite poorly with
cothreads. Almost any time it's used in a function that has anything
remotely to do with a cothread context (as in, it runs in one), a segfault
results from the __builtin_apply call, which is the heart of the whole
thing. If someone who really knows assembly could analyze the resulting
code to see what's really going on, we might find a way to fix either the
macro or the cothreads (I'm thinking that there's something we missed in
constructing the cothreads themselves) so this works in all cases.
In the meantime, please insert both DEBUG_ENTER and DEBUG_LEAVE in your
functions. Be sure to put DEBUG_ENTER after your variable declarations
and before any functional code, not to put the function name in any DEBUG
strings (it's already there, trust me), and put a DEBUG_LEAVE if you care
enough.
Changes are going to happen in the way DEBUGs and other printouts occur,
so stay tuned.
2000-12-04 09:35:08 +00:00
|
|
|
*/
|
|
|
|
|
2000-12-29 10:02:17 +00:00
|
|
|
#ifndef __GSTINFO_H__
|
|
|
|
#define __GSTINFO_H__
|
Changes made to the DEBUG system. New header file gstdebug.h holds the stuff to keep it out of gst.h's hair. DEBUG ...
Original commit message from CVS:
Changes made to the DEBUG system. New header file gstdebug.h holds the
stuff to keep it out of gst.h's hair. DEBUG prints out the process id,
cothread id, source filename and line number. Two new macros DEBUG_ENTER
and DEBUG_LEAVE are used to show the entry and exit of a given function.
This eventually might be used to construct call trace graphs, even taking
cothreads into account. This would be quite useful in visualizing the
scheduling mechanism.
Minor changes to various debug messages.
Also sitting in gstdebug.h is a prototypical DEBUG_ENTER that's capable of
performing DEBUG_LEAVE automatically. It does this by utilizing a
little-known GCC extension that allows one to call a function with the
same parameters as the current function. The macro uses this to basically
call itself. A boolean is used to ensure that when it calls itself it
actually runs the body of the function. In the meantime it prints stuff
out before and after the real function, as well as constructing a
debugging string. This can be used eventually to provide call-wide data
on the DEBUG lines, instead of having to replicate data on each call to
DEBUG. More research is needed into how this would most cleanly be fit
into some other chunk of code, like GStreamer (I think of this DEBUG trick
as a separate project, sorta).
Unfortunately, the aforementioned DEBUG trick interacts quite poorly with
cothreads. Almost any time it's used in a function that has anything
remotely to do with a cothread context (as in, it runs in one), a segfault
results from the __builtin_apply call, which is the heart of the whole
thing. If someone who really knows assembly could analyze the resulting
code to see what's really going on, we might find a way to fix either the
macro or the cothreads (I'm thinking that there's something we missed in
constructing the cothreads themselves) so this works in all cases.
In the meantime, please insert both DEBUG_ENTER and DEBUG_LEAVE in your
functions. Be sure to put DEBUG_ENTER after your variable declarations
and before any functional code, not to put the function name in any DEBUG
strings (it's already there, trust me), and put a DEBUG_LEAVE if you care
enough.
Changes are going to happen in the way DEBUGs and other printouts occur,
so stay tuned.
2000-12-04 09:35:08 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#include <glib.h>
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include <gst/gstconfig.h>
|
|
|
|
|
2003-07-12 15:15:57 +00:00
|
|
|
G_BEGIN_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GstDebugLevel:
|
|
|
|
* @GST_LEVEL_NONE: No debugging level specified or desired. Used to deactivate
|
|
|
|
* debugging output.
|
2005-10-15 15:30:24 +00:00
|
|
|
* @GST_LEVEL_ERROR: Error messages are to be used only when an error occured
|
2005-09-23 14:31:21 +00:00
|
|
|
* that stops the application from keeping working correctly.
|
|
|
|
* An examples is gst_element_error, which outputs a message with this priority.
|
|
|
|
* It does not mean that the application is terminating as with g_errror.
|
|
|
|
* @GST_LEVEL_WARNING: Warning messages are to inform about abnormal behaviour
|
2005-10-15 15:30:24 +00:00
|
|
|
* that could lead to problems or weird behaviour later on. An example of this
|
2005-09-23 14:31:21 +00:00
|
|
|
* would be clocking issues ("your computer is pretty slow") or broken input
|
|
|
|
* data ("Can't synchronize to stream.")
|
2011-11-30 12:39:34 +00:00
|
|
|
* @GST_LEVEL_FIXME: Fixme messages are messages that indicate that something
|
|
|
|
* in the executed code path is not fully implemented or handled yet. Note
|
|
|
|
* that this does not replace proper error handling in any way, the purpose
|
|
|
|
* of this message is to make it easier to spot incomplete/unfinished pieces
|
2012-07-10 09:46:41 +00:00
|
|
|
* of code when reading the debug log.
|
2005-09-23 14:31:21 +00:00
|
|
|
* @GST_LEVEL_INFO: Informational messages should be used to keep the developer
|
|
|
|
* updated about what is happening.
|
2005-10-15 15:30:24 +00:00
|
|
|
* Examples where this should be used are when a typefind function has
|
2005-09-23 14:31:21 +00:00
|
|
|
* successfully determined the type of the stream or when an mp3 plugin detects
|
|
|
|
* the format to be used. ("This file has mono sound.")
|
|
|
|
* @GST_LEVEL_DEBUG: Debugging messages should be used when something common
|
2010-06-03 00:49:51 +00:00
|
|
|
* happens that is not the expected default behavior, or something that's
|
|
|
|
* useful to know but doesn't happen all the time (ie. per loop iteration or
|
|
|
|
* buffer processed or event handled).
|
|
|
|
* An example would be notifications about state changes or receiving/sending
|
|
|
|
* of events.
|
2005-10-15 15:30:24 +00:00
|
|
|
* @GST_LEVEL_LOG: Log messages are messages that are very common but might be
|
2005-09-23 14:31:21 +00:00
|
|
|
* useful to know. As a rule of thumb a pipeline that is iterating as expected
|
2010-06-03 00:49:51 +00:00
|
|
|
* should never output anything else but LOG messages. Use this log level to
|
|
|
|
* log recurring information in chain functions and loop functions, for
|
|
|
|
* example.
|
2012-07-10 09:46:41 +00:00
|
|
|
* @GST_LEVEL_TRACE: Tracing-related messages.
|
2010-06-03 00:49:51 +00:00
|
|
|
* Examples for this are referencing/dereferencing of objects.
|
2009-04-06 00:27:26 +00:00
|
|
|
* @GST_LEVEL_MEMDUMP: memory dump messages are used to log (small) chunks of
|
|
|
|
* data as memory dumps in the log. They will be displayed as hexdump with
|
2012-07-10 09:46:41 +00:00
|
|
|
* ASCII characters.
|
2005-09-23 14:31:21 +00:00
|
|
|
* @GST_LEVEL_COUNT: The number of defined debugging levels.
|
2005-10-15 15:30:24 +00:00
|
|
|
*
|
|
|
|
* The level defines the importance of a debugging message. The more important a
|
2005-09-23 14:31:21 +00:00
|
|
|
* message is, the greater the probability that the debugging system outputs it.
|
2003-06-29 14:05:49 +00:00
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef enum {
|
2003-06-29 14:05:49 +00:00
|
|
|
GST_LEVEL_NONE = 0,
|
2011-11-30 12:39:34 +00:00
|
|
|
GST_LEVEL_ERROR = 1,
|
|
|
|
GST_LEVEL_WARNING = 2,
|
|
|
|
GST_LEVEL_FIXME = 3,
|
|
|
|
GST_LEVEL_INFO = 4,
|
|
|
|
GST_LEVEL_DEBUG = 5,
|
|
|
|
GST_LEVEL_LOG = 6,
|
2010-06-03 00:49:51 +00:00
|
|
|
GST_LEVEL_TRACE = 7,
|
2009-04-06 00:27:26 +00:00
|
|
|
/* add more */
|
|
|
|
GST_LEVEL_MEMDUMP = 9,
|
2003-06-29 14:05:49 +00:00
|
|
|
/* add more */
|
|
|
|
GST_LEVEL_COUNT
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstDebugLevel;
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_LEVEL_DEFAULT:
|
|
|
|
*
|
|
|
|
* Defines the default debugging level to be used with GStreamer. It is normally
|
|
|
|
* set to #GST_LEVEL_NONE so nothing get printed.
|
|
|
|
* As it can be configured at compile time, developer builds may chose to
|
|
|
|
* override that though.
|
|
|
|
* You can use this as an argument to gst_debug_set_default_threshold() to
|
|
|
|
* reset the debugging output to default behaviour.
|
|
|
|
*/
|
2003-06-29 14:05:49 +00:00
|
|
|
#ifndef GST_LEVEL_DEFAULT
|
2003-11-06 02:28:26 +00:00
|
|
|
#define GST_LEVEL_DEFAULT GST_LEVEL_NONE
|
2001-04-27 20:31:22 +00:00
|
|
|
#endif
|
|
|
|
|
2004-07-09 11:00:06 +00:00
|
|
|
/* defines for format (colors etc)
|
|
|
|
* don't change them around, it uses terminal layout
|
2003-06-29 14:05:49 +00:00
|
|
|
* Terminal color strings:
|
|
|
|
* 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
|
|
|
* Text color codes:
|
|
|
|
* 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
|
|
|
* Background color codes:
|
|
|
|
* 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
|
|
|
*/
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GstDebugColorFlags:
|
|
|
|
* @GST_DEBUG_FG_BLACK: Use black as foreground color.
|
|
|
|
* @GST_DEBUG_FG_RED: Use red as foreground color.
|
|
|
|
* @GST_DEBUG_FG_GREEN: Use green as foreground color.
|
|
|
|
* @GST_DEBUG_FG_YELLOW: Use yellow as foreground color.
|
|
|
|
* @GST_DEBUG_FG_BLUE: Use blue as foreground color.
|
|
|
|
* @GST_DEBUG_FG_MAGENTA: Use magenta as foreground color.
|
|
|
|
* @GST_DEBUG_FG_CYAN: Use cyan as foreground color.
|
|
|
|
* @GST_DEBUG_FG_WHITE: Use white as foreground color.
|
|
|
|
* @GST_DEBUG_BG_BLACK: Use black as background color.
|
|
|
|
* @GST_DEBUG_BG_RED: Use red as background color.
|
|
|
|
* @GST_DEBUG_BG_GREEN: Use green as background color.
|
|
|
|
* @GST_DEBUG_BG_YELLOW: Use yellow as background color.
|
|
|
|
* @GST_DEBUG_BG_BLUE: Use blue as background color.
|
|
|
|
* @GST_DEBUG_BG_MAGENTA: Use magenta as background color.
|
|
|
|
* @GST_DEBUG_BG_CYAN: Use cyan as background color.
|
|
|
|
* @GST_DEBUG_BG_WHITE: Use white as background color.
|
|
|
|
* @GST_DEBUG_BOLD: Make the output bold.
|
|
|
|
* @GST_DEBUG_UNDERLINE: Underline the output.
|
2005-10-15 15:30:24 +00:00
|
|
|
*
|
2005-09-23 14:31:21 +00:00
|
|
|
* These are some terminal style flags you can use when creating your
|
|
|
|
* debugging categories to make them stand out in debugging output.
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef enum {
|
2003-06-29 14:05:49 +00:00
|
|
|
/* colors */
|
2004-03-15 14:43:35 +00:00
|
|
|
GST_DEBUG_FG_BLACK = 0x0000,
|
|
|
|
GST_DEBUG_FG_RED = 0x0001,
|
|
|
|
GST_DEBUG_FG_GREEN = 0x0002,
|
|
|
|
GST_DEBUG_FG_YELLOW = 0x0003,
|
|
|
|
GST_DEBUG_FG_BLUE = 0x0004,
|
|
|
|
GST_DEBUG_FG_MAGENTA = 0x0005,
|
|
|
|
GST_DEBUG_FG_CYAN = 0x0006,
|
|
|
|
GST_DEBUG_FG_WHITE = 0x0007,
|
2003-06-29 14:05:49 +00:00
|
|
|
/* background colors */
|
2004-03-15 14:43:35 +00:00
|
|
|
GST_DEBUG_BG_BLACK = 0x0000,
|
|
|
|
GST_DEBUG_BG_RED = 0x0010,
|
|
|
|
GST_DEBUG_BG_GREEN = 0x0020,
|
|
|
|
GST_DEBUG_BG_YELLOW = 0x0030,
|
|
|
|
GST_DEBUG_BG_BLUE = 0x0040,
|
|
|
|
GST_DEBUG_BG_MAGENTA = 0x0050,
|
|
|
|
GST_DEBUG_BG_CYAN = 0x0060,
|
|
|
|
GST_DEBUG_BG_WHITE = 0x0070,
|
2003-06-29 14:05:49 +00:00
|
|
|
/* other formats */
|
2004-03-15 14:43:35 +00:00
|
|
|
GST_DEBUG_BOLD = 0x0100,
|
|
|
|
GST_DEBUG_UNDERLINE = 0x0200
|
|
|
|
} GstDebugColorFlags;
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_DEBUG_FG_MASK (0x000F)
|
|
|
|
#define GST_DEBUG_BG_MASK (0x00F0)
|
|
|
|
#define GST_DEBUG_FORMAT_MASK (0xFF00)
|
|
|
|
|
|
|
|
typedef struct _GstDebugCategory GstDebugCategory;
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GstDebugCategory:
|
|
|
|
*
|
|
|
|
* This is the struct that describes the categories. Once initialized with
|
|
|
|
* #GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore.
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstDebugCategory {
|
|
|
|
/*< private >*/
|
2005-04-24 22:49:45 +00:00
|
|
|
gint threshold;
|
2004-03-15 14:43:35 +00:00
|
|
|
guint color; /* see defines above */
|
|
|
|
|
|
|
|
const gchar * name;
|
|
|
|
const gchar * description;
|
2001-05-25 21:00:07 +00:00
|
|
|
};
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
/********** some convenience macros for debugging **********/
|
Another big set of changes. Connections are now also pullfunc based. gstqueue has been updated, I don't know of any ...
Original commit message from CVS:
Another big set of changes. Connections are now also pullfunc based.
gstqueue has been updated, I don't know of any other connections offhand.
There are still a few things that need doing, specifically the concept
of a source or connection with connections to multiple thread contexts is
not dealt with. This may force us to move the threadstate from the
element to the pad, maybe keeping the element's copy for simple cases.
Then the Bin would create a structure to pass to the cothreaded _wrappers
of any such elements, which would detail the pads that are to be dealt with
by this particular cothread context.
That will speed things up to, since we don't have to look through the list
of all pads for every Src or Connection element for every iteration, we can
simply step through the list provided by the plan. Special case might even
have a single pad pointer sitting there to trump the list, if there's only
one (the common case anyway).
Task 23098 is tracking these changes. The main task 22588 depends on that
subtask, as well as 22240, which is a consistency check on PAD_DISABLED.
2000-12-08 10:33:01 +00:00
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_STR_NULL:
|
|
|
|
* @str: The string to check.
|
|
|
|
*
|
|
|
|
* Macro to use when a string must not be NULL, but may be NULL. If the string
|
|
|
|
* is NULL, "(NULL)" is printed instead.
|
|
|
|
* In GStreamer printf string arguments may not be NULL, because on some
|
|
|
|
* platforms (ie Solaris) the libc crashes in that case. This includes debugging
|
|
|
|
* strings.
|
|
|
|
*/
|
2003-06-29 14:05:49 +00:00
|
|
|
#define GST_STR_NULL(str) ((str) ? (str) : "(NULL)")
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
/* FIXME, not MT safe */
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_PAD_NAME:
|
|
|
|
* @pad: The pad to debug.
|
|
|
|
*
|
|
|
|
* Evaluates to 2 strings, that describe the pad. Often used in debugging
|
|
|
|
* statements.
|
|
|
|
*/
|
Another big set of changes. Connections are now also pullfunc based. gstqueue has been updated, I don't know of any ...
Original commit message from CVS:
Another big set of changes. Connections are now also pullfunc based.
gstqueue has been updated, I don't know of any other connections offhand.
There are still a few things that need doing, specifically the concept
of a source or connection with connections to multiple thread contexts is
not dealt with. This may force us to move the threadstate from the
element to the pad, maybe keeping the element's copy for simple cases.
Then the Bin would create a structure to pass to the cothreaded _wrappers
of any such elements, which would detail the pads that are to be dealt with
by this particular cothread context.
That will speed things up to, since we don't have to look through the list
of all pads for every Src or Connection element for every iteration, we can
simply step through the list provided by the plan. Special case might even
have a single pad pointer sitting there to trump the list, if there's only
one (the common case anyway).
Task 23098 is tracking these changes. The main task 22588 depends on that
subtask, as well as 22240, which is a consistency check on PAD_DISABLED.
2000-12-08 10:33:01 +00:00
|
|
|
#define GST_DEBUG_PAD_NAME(pad) \
|
2005-11-24 16:56:28 +00:00
|
|
|
(pad != NULL) ? \
|
|
|
|
((GST_OBJECT_PARENT(pad) != NULL) ? \
|
2003-05-02 20:07:45 +00:00
|
|
|
GST_STR_NULL (GST_OBJECT_NAME (GST_OBJECT_PARENT(pad))) : \
|
2005-11-24 16:56:28 +00:00
|
|
|
"''" ) : "''", \
|
2006-02-19 12:25:01 +00:00
|
|
|
(pad != NULL) ? GST_STR_NULL (GST_OBJECT_NAME (pad)) : "''"
|
Another big set of changes. Connections are now also pullfunc based. gstqueue has been updated, I don't know of any ...
Original commit message from CVS:
Another big set of changes. Connections are now also pullfunc based.
gstqueue has been updated, I don't know of any other connections offhand.
There are still a few things that need doing, specifically the concept
of a source or connection with connections to multiple thread contexts is
not dealt with. This may force us to move the threadstate from the
element to the pad, maybe keeping the element's copy for simple cases.
Then the Bin would create a structure to pass to the cothreaded _wrappers
of any such elements, which would detail the pads that are to be dealt with
by this particular cothread context.
That will speed things up to, since we don't have to look through the list
of all pads for every Src or Connection element for every iteration, we can
simply step through the list provided by the plan. Special case might even
have a single pad pointer sitting there to trump the list, if there's only
one (the common case anyway).
Task 23098 is tracking these changes. The main task 22588 depends on that
subtask, as well as 22240, which is a consistency check on PAD_DISABLED.
2000-12-08 10:33:01 +00:00
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_FUNCTION:
|
|
|
|
*
|
|
|
|
* This macro should evaluate to the name of the current function and be should
|
|
|
|
* be defined when configuring your project, as it is compiler dependant. If it
|
|
|
|
* is not defined, some default value is used. It is used to provide debugging
|
|
|
|
* output with the function name of the message.
|
2008-05-08 14:23:16 +00:00
|
|
|
*
|
|
|
|
* Note that this is different from G_STRFUNC as we do not want the full
|
|
|
|
* function signature in C++ code.
|
2005-09-23 14:31:21 +00:00
|
|
|
*/
|
2003-06-29 14:05:49 +00:00
|
|
|
#ifndef GST_FUNCTION
|
2008-05-08 14:23:16 +00:00
|
|
|
#if defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
|
|
|
|
# define GST_FUNCTION ((const char*) (__FUNCTION__))
|
2009-04-17 09:11:21 +00:00
|
|
|
#elif defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
2008-05-08 14:23:16 +00:00
|
|
|
# define GST_FUNCTION ((const char*) (__func__))
|
|
|
|
#else
|
|
|
|
# define GST_FUNCTION ((const char*) ("???"))
|
|
|
|
#endif
|
2003-06-29 14:05:49 +00:00
|
|
|
#endif /* ifndef GST_FUNCTION */
|
|
|
|
|
2013-03-30 17:20:13 +00:00
|
|
|
/**
|
|
|
|
* GST_PTR_FORMAT:
|
|
|
|
*
|
|
|
|
* printf format type used to debug GStreamer types.
|
|
|
|
* This can only be used on types whose size is >= sizeof(gpointer).
|
|
|
|
*/
|
2013-03-30 18:28:38 +00:00
|
|
|
#define GST_PTR_FORMAT "p\aA"
|
2013-03-30 17:20:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_SEGMENT_FORMAT:
|
|
|
|
*
|
|
|
|
* printf format type used to debug GStreamer segments.
|
|
|
|
* This can only be used on pointers to GstSegment structures.
|
|
|
|
*/
|
2013-03-30 18:28:38 +00:00
|
|
|
#define GST_SEGMENT_FORMAT "p\aB"
|
2004-02-19 20:08:45 +00:00
|
|
|
|
2004-01-10 01:49:00 +00:00
|
|
|
typedef struct _GstDebugMessage GstDebugMessage;
|
2005-11-21 15:47:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstLogFunction:
|
|
|
|
* @category: a #GstDebugCategory
|
|
|
|
* @level: a #GstDebugLevel
|
|
|
|
* @file: file name
|
|
|
|
* @function: function name
|
|
|
|
* @line: line number
|
|
|
|
* @object: a #GObject
|
|
|
|
* @message: the message
|
2012-06-19 23:09:10 +00:00
|
|
|
* @user_data: user data for the log function
|
2005-11-21 15:47:09 +00:00
|
|
|
*
|
|
|
|
* Function prototype for a logging function that can be registered with
|
|
|
|
* gst_debug_add_log_function().
|
|
|
|
* Use G_GNUC_NO_INSTRUMENT on that function.
|
|
|
|
*/
|
2006-10-05 12:31:07 +00:00
|
|
|
typedef void (*GstLogFunction) (GstDebugCategory * category,
|
|
|
|
GstDebugLevel level,
|
|
|
|
const gchar * file,
|
|
|
|
const gchar * function,
|
|
|
|
gint line,
|
|
|
|
GObject * object,
|
|
|
|
GstDebugMessage * message,
|
2012-06-19 23:09:10 +00:00
|
|
|
gpointer user_data);
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
void gst_debug_log (GstDebugCategory * category,
|
|
|
|
GstDebugLevel level,
|
|
|
|
const gchar * file,
|
|
|
|
const gchar * function,
|
|
|
|
gint line,
|
|
|
|
GObject * object,
|
|
|
|
const gchar * format,
|
|
|
|
...) G_GNUC_PRINTF (7, 8) G_GNUC_NO_INSTRUMENT;
|
|
|
|
|
|
|
|
void gst_debug_log_valist (GstDebugCategory * category,
|
|
|
|
GstDebugLevel level,
|
|
|
|
const gchar * file,
|
|
|
|
const gchar * function,
|
|
|
|
gint line,
|
|
|
|
GObject * object,
|
|
|
|
const gchar * format,
|
|
|
|
va_list args) G_GNUC_NO_INSTRUMENT;
|
|
|
|
|
2010-03-28 10:14:06 +00:00
|
|
|
/* do not use this function, use the GST_DEBUG_CATEGORY_INIT macro */
|
|
|
|
GstDebugCategory *_gst_debug_category_new (const gchar * name,
|
|
|
|
guint color,
|
|
|
|
const gchar * description);
|
|
|
|
/* do not use this function, use the GST_DEBUG_CATEGORY_GET macro */
|
|
|
|
GstDebugCategory *_gst_debug_get_category (const gchar *name);
|
|
|
|
|
|
|
|
|
|
|
|
/* do not use this function, use the GST_CAT_MEMDUMP_* macros */
|
|
|
|
void _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
|
|
|
|
const gchar * func, gint line, GObject * obj, const gchar * msg,
|
|
|
|
const guint8 * data, guint length);
|
|
|
|
|
2010-03-29 13:05:44 +00:00
|
|
|
/* we define this to avoid a compiler warning regarding a cast from a function
|
|
|
|
* pointer to a void pointer
|
|
|
|
* (see https://bugzilla.gnome.org/show_bug.cgi?id=309253)
|
|
|
|
*/
|
2010-03-28 10:14:06 +00:00
|
|
|
typedef void (* GstDebugFuncPtr) (void);
|
|
|
|
|
|
|
|
/* do no use these functions, use the GST_DEBUG*_FUNCPTR macros */
|
2010-03-29 13:05:44 +00:00
|
|
|
void _gst_debug_register_funcptr (GstDebugFuncPtr func,
|
2010-03-28 10:14:06 +00:00
|
|
|
const gchar * ptrname);
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar *
|
2010-03-29 13:05:44 +00:00
|
|
|
_gst_debug_nameof_funcptr (GstDebugFuncPtr func) G_GNUC_NO_INSTRUMENT;
|
2010-03-28 10:14:06 +00:00
|
|
|
|
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
const gchar * gst_debug_message_get (GstDebugMessage * message);
|
|
|
|
|
|
|
|
void gst_debug_log_default (GstDebugCategory * category,
|
|
|
|
GstDebugLevel level,
|
|
|
|
const gchar * file,
|
|
|
|
const gchar * function,
|
|
|
|
gint line,
|
|
|
|
GObject * object,
|
|
|
|
GstDebugMessage * message,
|
|
|
|
gpointer unused) G_GNUC_NO_INSTRUMENT;
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar * gst_debug_level_get_name (GstDebugLevel level);
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
void gst_debug_add_log_function (GstLogFunction func,
|
2012-06-20 11:28:08 +00:00
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify notify);
|
2011-02-03 10:53:27 +00:00
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
guint gst_debug_remove_log_function (GstLogFunction func);
|
|
|
|
guint gst_debug_remove_log_function_by_data (gpointer data);
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
void gst_debug_set_active (gboolean active);
|
|
|
|
gboolean gst_debug_is_active (void);
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
void gst_debug_set_colored (gboolean colored);
|
|
|
|
gboolean gst_debug_is_colored (void);
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2010-03-28 11:49:03 +00:00
|
|
|
void gst_debug_set_default_threshold (GstDebugLevel level);
|
|
|
|
GstDebugLevel gst_debug_get_default_threshold (void);
|
|
|
|
void gst_debug_set_threshold_for_name (const gchar * name,
|
|
|
|
GstDebugLevel level);
|
2012-06-29 16:05:36 +00:00
|
|
|
void gst_debug_set_threshold_from_string (const gchar * list, gboolean reset);
|
2010-03-28 11:49:03 +00:00
|
|
|
void gst_debug_unset_threshold_for_name (const gchar * name);
|
|
|
|
|
|
|
|
|
|
|
|
void gst_debug_category_free (GstDebugCategory * category);
|
|
|
|
void gst_debug_category_set_threshold (GstDebugCategory * category,
|
|
|
|
GstDebugLevel level);
|
|
|
|
void gst_debug_category_reset_threshold (GstDebugCategory * category);
|
|
|
|
GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory * category);
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar * gst_debug_category_get_name (GstDebugCategory * category);
|
2010-03-28 11:49:03 +00:00
|
|
|
guint gst_debug_category_get_color (GstDebugCategory * category);
|
2011-06-09 16:13:35 +00:00
|
|
|
const gchar * gst_debug_category_get_description (GstDebugCategory * category);
|
2010-03-28 11:49:03 +00:00
|
|
|
GSList * gst_debug_get_all_categories (void);
|
|
|
|
|
|
|
|
|
|
|
|
gchar * gst_debug_construct_term_color (guint colorinfo);
|
|
|
|
gint gst_debug_construct_win_color (guint colorinfo);
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GST_DISABLE_GST_DEBUG
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2012-06-20 11:28:08 +00:00
|
|
|
#define gst_debug_add_log_function(func,data,notify) \
|
|
|
|
G_STMT_START{ \
|
|
|
|
if (func == gst_debug_log_default) { \
|
|
|
|
gst_debug_add_log_function(NULL,data,notify); \
|
|
|
|
} else { \
|
|
|
|
gst_debug_add_log_function(func,data,notify); \
|
|
|
|
} \
|
2011-05-06 08:35:36 +00:00
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
#define gst_debug_remove_log_function(func) \
|
|
|
|
(func == gst_debug_log_default) ? \
|
|
|
|
gst_debug_remove_log_function(NULL) : \
|
|
|
|
gst_debug_remove_log_function(func)
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_CATEGORY:
|
|
|
|
* @cat: the category
|
2004-02-26 17:02:49 +00:00
|
|
|
*
|
|
|
|
* Defines a GstDebugCategory variable.
|
2003-06-29 14:05:49 +00:00
|
|
|
* This macro expands to nothing if debugging is disabled.
|
|
|
|
*/
|
|
|
|
#define GST_DEBUG_CATEGORY(cat) GstDebugCategory *cat = NULL
|
|
|
|
/**
|
|
|
|
* GST_DEBUG_CATEGORY_EXTERN:
|
|
|
|
* @cat: the category
|
2004-02-26 17:02:49 +00:00
|
|
|
*
|
|
|
|
* Declares a GstDebugCategory variable as extern. Use in header files.
|
2003-06-29 14:05:49 +00:00
|
|
|
* This macro expands to nothing if debugging is disabled.
|
|
|
|
*/
|
|
|
|
#define GST_DEBUG_CATEGORY_EXTERN(cat) extern GstDebugCategory *cat
|
2006-07-25 13:06:14 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_CATEGORY_STATIC:
|
|
|
|
* @cat: the category
|
2004-02-26 17:02:49 +00:00
|
|
|
*
|
|
|
|
* Defines a static GstDebugCategory variable.
|
2003-06-29 14:05:49 +00:00
|
|
|
* This macro expands to nothing if debugging is disabled.
|
|
|
|
*/
|
|
|
|
#define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL
|
2009-06-30 08:26:34 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_CATEGORY_INIT:
|
2003-12-22 10:37:31 +00:00
|
|
|
* @cat: the category to initialize.
|
|
|
|
* @name: the name of the category.
|
|
|
|
* @color: the colors to use for a color representation or 0 for no color.
|
|
|
|
* @description: optional description of the category.
|
|
|
|
*
|
2003-12-25 09:42:56 +00:00
|
|
|
* Initializes a new #GstDebugCategory with the given properties and set to
|
2003-06-29 14:05:49 +00:00
|
|
|
* the default threshold.
|
2003-12-25 09:42:56 +00:00
|
|
|
*
|
2003-06-29 14:05:49 +00:00
|
|
|
* <note>
|
|
|
|
* <para>
|
2003-12-22 10:37:31 +00:00
|
|
|
* This macro expands to nothing if debugging is disabled.
|
|
|
|
* </para>
|
|
|
|
* <para>
|
|
|
|
* When naming your category, please follow the following conventions to ensure
|
2003-06-29 14:05:49 +00:00
|
|
|
* that the pattern matching for categories works as expected. It is not
|
|
|
|
* earth-shattering if you don't follow these conventions, but it would be nice
|
|
|
|
* for everyone.
|
|
|
|
* </para>
|
|
|
|
* <para>
|
2003-12-22 10:37:31 +00:00
|
|
|
* If you define a category for a plugin or a feature of it, name the category
|
|
|
|
* like the feature. So if you wanted to write a "filesrc" element, you would
|
2003-07-24 02:14:47 +00:00
|
|
|
* name the category "filesrc". Use lowercase letters only.
|
2003-12-22 10:37:31 +00:00
|
|
|
* If you define more than one category for the same element, append an
|
2003-06-29 14:05:49 +00:00
|
|
|
* underscore and an identifier to your categories, like this: "filesrc_cache"
|
|
|
|
* </para>
|
|
|
|
* <para>
|
|
|
|
* If you create a library or an application using debugging categories, use a
|
|
|
|
* common prefix followed by an underscore for all your categories. GStreamer
|
|
|
|
* uses the GST prefix so GStreamer categories look like "GST_STATES". Be sure
|
|
|
|
* to include uppercase letters.
|
|
|
|
* </para>
|
|
|
|
* </note>
|
|
|
|
*/
|
2004-07-09 11:00:06 +00:00
|
|
|
#define GST_DEBUG_CATEGORY_INIT(cat,name,color,description) G_STMT_START{\
|
|
|
|
if (cat == NULL) \
|
|
|
|
cat = _gst_debug_category_new (name,color,description); \
|
2003-06-29 14:05:49 +00:00
|
|
|
}G_STMT_END
|
2003-12-22 10:37:31 +00:00
|
|
|
|
2009-06-30 08:26:34 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_CATEGORY_GET:
|
|
|
|
* @cat: the category to initialize.
|
|
|
|
* @name: log category name
|
|
|
|
*
|
2010-08-31 00:26:18 +00:00
|
|
|
* Looks up an existing #GstDebugCategory by its @name and sets @cat. If the
|
|
|
|
* category is not found, but GST_CAT_DEFAULT is defined, that is assigned to
|
|
|
|
* @cat. Otherwise @cat will be NULL.
|
2009-06-30 08:26:34 +00:00
|
|
|
*
|
|
|
|
* |[
|
|
|
|
* GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug);
|
|
|
|
* #define GST_CAT_DEFAULT gst_myplugin_debug
|
|
|
|
* GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
|
|
|
|
* ...
|
|
|
|
* GST_DEBUG_CATEGORY_INIT (gst_myplugin_debug, "myplugin", 0, "nice element");
|
2010-06-11 14:36:10 +00:00
|
|
|
* GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
2009-06-30 08:26:34 +00:00
|
|
|
* ]|
|
|
|
|
*/
|
|
|
|
#ifdef GST_CAT_DEFAULT
|
|
|
|
#define GST_DEBUG_CATEGORY_GET(cat,name) G_STMT_START{\
|
|
|
|
cat = _gst_debug_get_category (name); \
|
|
|
|
if (!cat) { \
|
|
|
|
cat = GST_CAT_DEFAULT; \
|
|
|
|
} \
|
|
|
|
}G_STMT_END
|
|
|
|
#else
|
|
|
|
#define GST_DEBUG_CATEGORY_GET(cat,name) G_STMT_START{\
|
|
|
|
cat = _gst_debug_get_category (name); \
|
|
|
|
}G_STMT_END
|
|
|
|
#endif
|
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_DEFAULT:
|
|
|
|
*
|
|
|
|
* Default gstreamer core debug log category. Please define your own.
|
|
|
|
*/
|
2004-07-24 16:07:01 +00:00
|
|
|
GST_EXPORT GstDebugCategory * GST_CAT_DEFAULT;
|
2003-08-03 17:18:40 +00:00
|
|
|
/* this symbol may not be used */
|
2011-12-16 01:20:27 +00:00
|
|
|
GST_EXPORT gboolean _gst_debug_enabled;
|
2004-04-15 23:25:39 +00:00
|
|
|
|
2012-07-10 09:46:41 +00:00
|
|
|
/* the min debug level, used for quickly discarding debug
|
2006-06-12 08:47:16 +00:00
|
|
|
* messages that fall under the threshold. */
|
2011-10-08 12:37:09 +00:00
|
|
|
GST_EXPORT GstDebugLevel _gst_debug_min;
|
2006-06-12 08:47:16 +00:00
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_LEVEL_LOG:
|
|
|
|
* @cat: category to use
|
|
|
|
* @level: the severity of the message
|
|
|
|
* @object: the #GObject the message belongs to or NULL if none
|
|
|
|
* @...: A printf-style message to output
|
|
|
|
*
|
|
|
|
* Outputs a debugging message. This is the most general macro for outputting
|
|
|
|
* debugging messages. You will probably want to use one of the ones described
|
|
|
|
* below.
|
|
|
|
*/
|
2002-11-29 17:05:13 +00:00
|
|
|
#ifdef G_HAVE_ISO_VARARGS
|
2004-07-09 11:00:06 +00:00
|
|
|
#define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
|
2011-10-08 12:37:09 +00:00
|
|
|
if (G_UNLIKELY (level <= _gst_debug_min)) { \
|
2004-07-09 11:00:06 +00:00
|
|
|
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
|
|
|
|
(GObject *) (object), __VA_ARGS__); \
|
|
|
|
} \
|
2003-06-29 14:05:49 +00:00
|
|
|
}G_STMT_END
|
|
|
|
#else /* G_HAVE_GNUC_VARARGS */
|
2004-04-15 23:25:39 +00:00
|
|
|
#ifdef G_HAVE_GNUC_VARARGS
|
2004-07-09 11:00:06 +00:00
|
|
|
#define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{ \
|
2011-10-08 12:37:09 +00:00
|
|
|
if (G_UNLIKELY (level <= _gst_debug_min)) { \
|
2004-07-09 11:00:06 +00:00
|
|
|
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
|
|
|
|
(GObject *) (object), ##args ); \
|
|
|
|
} \
|
2003-06-29 14:05:49 +00:00
|
|
|
}G_STMT_END
|
2004-04-15 23:25:39 +00:00
|
|
|
#else /* no variadic macros, use inline */
|
|
|
|
static inline void
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
|
|
|
|
GstDebugLevel level, gpointer object, const char *format, va_list varargs)
|
|
|
|
{
|
2011-10-08 12:37:09 +00:00
|
|
|
if (G_UNLIKELY (level <= _gst_debug_min)) {
|
2007-08-23 20:41:30 +00:00
|
|
|
gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
|
|
|
|
varargs);
|
|
|
|
}
|
2004-04-15 23:25:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_LEVEL_LOG (GstDebugCategory * cat, GstDebugLevel level,
|
|
|
|
gpointer object, const char *format, ...)
|
|
|
|
{
|
2007-08-23 20:41:30 +00:00
|
|
|
va_list varargs;
|
2004-04-15 23:25:39 +00:00
|
|
|
|
2007-08-23 20:41:30 +00:00
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, level, object, format, varargs);
|
|
|
|
va_end (varargs);
|
2004-04-15 23:25:39 +00:00
|
|
|
}
|
|
|
|
#endif
|
2003-06-29 14:05:49 +00:00
|
|
|
#endif /* G_HAVE_ISO_VARARGS */
|
2002-11-29 17:05:13 +00:00
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
/* This one doesn't have varargs in the macro, so it's different than all the
|
|
|
|
* other macros and hence in a separate block right here. Docs chunks are
|
|
|
|
* with the other doc chunks below though. */
|
|
|
|
#define __GST_CAT_MEMDUMP_LOG(cat,object,msg,data,length) G_STMT_START{ \
|
2011-10-08 12:37:09 +00:00
|
|
|
if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= _gst_debug_min)) { \
|
2009-04-06 00:27:26 +00:00
|
|
|
_gst_debug_dump_mem ((cat), __FILE__, GST_FUNCTION, __LINE__, \
|
|
|
|
(GObject *) (object), (msg), (data), (length)); \
|
|
|
|
} \
|
|
|
|
}G_STMT_END
|
|
|
|
|
|
|
|
#define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length) \
|
|
|
|
__GST_CAT_MEMDUMP_LOG(cat,obj,msg,data,length)
|
|
|
|
#define GST_CAT_MEMDUMP(cat,msg,data,length) \
|
|
|
|
__GST_CAT_MEMDUMP_LOG(cat,NULL,msg,data,length)
|
|
|
|
#define GST_MEMDUMP_OBJECT(obj,msg,data,length) \
|
|
|
|
__GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,obj,msg,data,length)
|
|
|
|
#define GST_MEMDUMP(msg,data,length) \
|
|
|
|
__GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,NULL,msg,data,length)
|
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_ERROR_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an error message belonging to the given object in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_WARNING_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a warning message belonging to the given object in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_INFO_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an informational message belonging to the given object in the given
|
|
|
|
* category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_DEBUG_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an debugging message belonging to the given object in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_LOG_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an logging message belonging to the given object in the given category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_FIXME_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a fixme message belonging to the given object in the given category.
|
|
|
|
*/
|
2010-06-03 00:49:51 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_TRACE_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a tracing message belonging to the given object in the given
|
|
|
|
* category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_MEMDUMP_OBJECT:
|
|
|
|
* @cat: category to use
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @msg: message string to log with the data
|
|
|
|
* @data: pointer to the data to output
|
|
|
|
* @length: length of the data to output
|
|
|
|
*
|
|
|
|
* Output a hexdump of @data relating to the given object in the given
|
|
|
|
* category.
|
|
|
|
*/
|
2005-09-23 14:31:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_CAT_ERROR:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an error message in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_WARNING:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an warning message in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_INFO:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an informational message in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_DEBUG:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an debugging message in the given category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_CAT_LOG:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an logging message in the given category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_FIXME:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an fixme message in the given category.
|
|
|
|
*/
|
2010-06-03 00:49:51 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_TRACE:
|
|
|
|
* @cat: category to use
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a tracing message in the given category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_CAT_MEMDUMP:
|
|
|
|
* @cat: category to use
|
|
|
|
* @msg: message string to log with the data
|
|
|
|
* @data: pointer to the data to output
|
|
|
|
* @length: length of the data to output
|
|
|
|
*
|
|
|
|
* Output a hexdump of @data in the given category.
|
|
|
|
*/
|
2005-09-23 14:31:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_ERROR_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an error message belonging to the given object in the default category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_WARNING_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a warning message belonging to the given object in the default category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_INFO_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
2005-10-15 15:30:24 +00:00
|
|
|
* Output an informational message belonging to the given object in the default
|
2005-09-23 14:31:21 +00:00
|
|
|
* category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_DEBUG_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
2005-10-15 15:30:24 +00:00
|
|
|
* Output a debugging message belonging to the given object in the default
|
2005-09-23 14:31:21 +00:00
|
|
|
* category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_LOG_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a logging message belonging to the given object in the default category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_FIXME_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
2010-06-03 00:49:51 +00:00
|
|
|
* Output a fixme message belonging to the given object in the default category.
|
2009-04-06 00:27:26 +00:00
|
|
|
*/
|
2010-06-03 00:49:51 +00:00
|
|
|
/**
|
|
|
|
* GST_TRACE_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a tracing message belonging to the given object in the default category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_MEMDUMP_OBJECT:
|
|
|
|
* @obj: the #GObject the message belongs to
|
|
|
|
* @msg: message string to log with the data
|
|
|
|
* @data: pointer to the data to output
|
|
|
|
* @length: length of the data to output
|
|
|
|
*
|
|
|
|
* Output a logging message belonging to the given object in the default category.
|
|
|
|
*/
|
2005-09-23 14:31:21 +00:00
|
|
|
|
2005-10-15 15:30:24 +00:00
|
|
|
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_ERROR:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an error message in the default category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_WARNING:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a warning message in the default category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_INFO:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output an informational message in the default category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_DEBUG:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a debugging message in the default category.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GST_LOG:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a logging message in the default category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_FIXME:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a fixme message in the default category.
|
|
|
|
*/
|
2010-06-03 00:49:51 +00:00
|
|
|
/**
|
|
|
|
* GST_TRACE:
|
|
|
|
* @...: printf-style message to output
|
|
|
|
*
|
|
|
|
* Output a tracing message in the default category.
|
|
|
|
*/
|
2009-04-06 00:27:26 +00:00
|
|
|
/**
|
|
|
|
* GST_MEMDUMP:
|
|
|
|
* @msg: message string to log with the data
|
|
|
|
* @data: pointer to the data to output
|
|
|
|
* @length: length of the data to output
|
|
|
|
*
|
|
|
|
* Output a hexdump of @data.
|
|
|
|
*/
|
2005-09-23 14:31:21 +00:00
|
|
|
|
2002-11-29 17:05:13 +00:00
|
|
|
#ifdef G_HAVE_ISO_VARARGS
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#define GST_CAT_ERROR_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, obj, __VA_ARGS__)
|
|
|
|
#define GST_CAT_WARNING_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj, __VA_ARGS__)
|
|
|
|
#define GST_CAT_INFO_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, obj, __VA_ARGS__)
|
|
|
|
#define GST_CAT_DEBUG_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
|
|
|
|
#define GST_CAT_LOG_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, obj, __VA_ARGS__)
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_CAT_FIXME_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, obj, __VA_ARGS__)
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_CAT_TRACE_OBJECT(cat,obj,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, obj, __VA_ARGS__)
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_CAT_ERROR(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, NULL, __VA_ARGS__)
|
|
|
|
#define GST_CAT_WARNING(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
|
|
|
|
#define GST_CAT_INFO(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, NULL, __VA_ARGS__)
|
|
|
|
#define GST_CAT_DEBUG(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
|
|
|
|
#define GST_CAT_LOG(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, NULL, __VA_ARGS__)
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_CAT_FIXME(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, NULL, __VA_ARGS__)
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_CAT_TRACE(cat,...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, NULL, __VA_ARGS__)
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_ERROR_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, __VA_ARGS__)
|
|
|
|
#define GST_WARNING_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, __VA_ARGS__)
|
|
|
|
#define GST_INFO_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, __VA_ARGS__)
|
|
|
|
#define GST_DEBUG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, __VA_ARGS__)
|
|
|
|
#define GST_LOG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, __VA_ARGS__)
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_FIXME_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, __VA_ARGS__)
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_TRACE_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, obj, __VA_ARGS__)
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_ERROR(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, __VA_ARGS__)
|
|
|
|
#define GST_WARNING(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
|
|
|
|
#define GST_INFO(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, __VA_ARGS__)
|
|
|
|
#define GST_DEBUG(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
|
|
|
|
#define GST_LOG(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, __VA_ARGS__)
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_FIXME(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, __VA_ARGS__)
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_TRACE(...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, __VA_ARGS__)
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
#else
|
|
|
|
#ifdef G_HAVE_GNUC_VARARGS
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_CAT_ERROR_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, obj, ##args )
|
|
|
|
#define GST_CAT_WARNING_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj, ##args )
|
|
|
|
#define GST_CAT_INFO_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, obj, ##args )
|
|
|
|
#define GST_CAT_DEBUG_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, obj, ##args )
|
|
|
|
#define GST_CAT_LOG_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, obj, ##args )
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_CAT_FIXME_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, obj, ##args )
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_CAT_TRACE_OBJECT(cat,obj,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, obj, ##args )
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_CAT_ERROR(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR, NULL, ##args )
|
|
|
|
#define GST_CAT_WARNING(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, ##args )
|
|
|
|
#define GST_CAT_INFO(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO, NULL, ##args )
|
|
|
|
#define GST_CAT_DEBUG(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG, NULL, ##args )
|
|
|
|
#define GST_CAT_LOG(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG, NULL, ##args )
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_CAT_FIXME(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME, NULL, ##args )
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_CAT_TRACE(cat,args...) GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE, NULL, ##args )
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_ERROR_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, ##args )
|
|
|
|
#define GST_WARNING_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, ##args )
|
|
|
|
#define GST_INFO_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, ##args )
|
|
|
|
#define GST_DEBUG_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, ##args )
|
|
|
|
#define GST_LOG_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, ##args )
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_FIXME_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, ##args )
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_TRACE_OBJECT(obj,args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, obj, ##args )
|
2003-06-29 14:05:49 +00:00
|
|
|
|
|
|
|
#define GST_ERROR(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, ##args )
|
|
|
|
#define GST_WARNING(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, ##args )
|
|
|
|
#define GST_INFO(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, ##args )
|
|
|
|
#define GST_DEBUG(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, ##args )
|
|
|
|
#define GST_LOG(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, ##args )
|
2009-04-06 00:27:26 +00:00
|
|
|
#define GST_FIXME(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, ##args )
|
2010-06-03 00:49:51 +00:00
|
|
|
#define GST_TRACE(args...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, ##args )
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
#else
|
|
|
|
/* no variadic macros, use inline */
|
|
|
|
static inline void
|
|
|
|
GST_CAT_ERROR_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_ERROR, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_WARNING_OBJECT (GstDebugCategory * cat, gpointer obj,
|
|
|
|
const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_WARNING, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_INFO_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_INFO, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_DEBUG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_DEBUG, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_LOG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_FIXME_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_FIXME, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2010-06-03 00:49:51 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_TRACE_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_TRACE, obj, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_ERROR, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_WARNING (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_WARNING, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_INFO (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_INFO, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_DEBUG (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_DEBUG, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_LOG (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_LOG, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_FIXME (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_FIXME, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2010-06-03 00:49:51 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_TRACE (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (cat, GST_LEVEL_TRACE, NULL, format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_ERROR, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_WARNING_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_INFO_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_INFO, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_DEBUG_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_LOG_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_LOG, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
static inline void
|
|
|
|
GST_FIXME_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_FIXME, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2010-06-03 00:49:51 +00:00
|
|
|
static inline void
|
|
|
|
GST_TRACE_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_TRACE, obj, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_ERROR (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_WARNING (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_INFO (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_DEBUG (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_LOG (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL,
|
|
|
|
format, varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
2009-04-06 00:27:26 +00:00
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_FIXME (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_FIXME, NULL, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
2010-06-03 00:49:51 +00:00
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_TRACE (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list varargs;
|
|
|
|
|
|
|
|
va_start (varargs, format);
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, format,
|
|
|
|
varargs);
|
|
|
|
va_end (varargs);
|
|
|
|
}
|
2004-04-15 23:25:39 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2002-11-29 17:05:13 +00:00
|
|
|
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
/********** function pointer stuff **********/
|
2005-09-23 14:31:21 +00:00
|
|
|
|
2009-12-01 16:53:03 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_REGISTER_FUNCPTR:
|
|
|
|
* @ptr: pointer to the function to register
|
|
|
|
*
|
|
|
|
* Register a pointer to a function with its name, so it can later be used by
|
|
|
|
* GST_DEBUG_FUNCPTR_NAME().
|
|
|
|
*
|
|
|
|
* Use this variant of #GST_DEBUG_FUNCPTR if you do not need to use @ptr.
|
|
|
|
*/
|
|
|
|
#define GST_DEBUG_REGISTER_FUNCPTR(ptr) \
|
2010-03-29 13:05:44 +00:00
|
|
|
_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr)
|
2005-09-23 14:31:21 +00:00
|
|
|
/**
|
|
|
|
* GST_DEBUG_FUNCPTR:
|
|
|
|
* @ptr: pointer to the function to register
|
|
|
|
*
|
|
|
|
* Register a pointer to a function with its name, so it can later be used by
|
|
|
|
* GST_DEBUG_FUNCPTR_NAME().
|
2009-12-01 16:53:03 +00:00
|
|
|
*
|
|
|
|
* Returns: the value passed to @ptr.
|
2005-09-23 14:31:21 +00:00
|
|
|
*/
|
2005-07-20 16:20:39 +00:00
|
|
|
#define GST_DEBUG_FUNCPTR(ptr) \
|
2010-03-29 13:05:44 +00:00
|
|
|
(_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
|
2005-09-23 14:31:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_DEBUG_FUNCPTR_NAME:
|
2006-09-01 15:55:20 +00:00
|
|
|
* @ptr: address of the function of which to look up the name
|
2005-09-23 14:31:21 +00:00
|
|
|
*
|
|
|
|
* Retrieves the name of the function, if it was previously registered with
|
|
|
|
* GST_DEBUG_FUNCPTR(). If not, it returns a description of the pointer.
|
|
|
|
*
|
2006-09-01 15:55:20 +00:00
|
|
|
* This macro returns a constant string which must not be modified or
|
|
|
|
* freed by the caller.
|
2005-09-23 14:31:21 +00:00
|
|
|
*/
|
2005-07-20 16:20:39 +00:00
|
|
|
#define GST_DEBUG_FUNCPTR_NAME(ptr) \
|
2010-03-29 13:05:44 +00:00
|
|
|
_gst_debug_nameof_funcptr((GstDebugFuncPtr)ptr)
|
2000-12-30 02:41:15 +00:00
|
|
|
|
2007-10-17 12:58:23 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#else /* GST_DISABLE_GST_DEBUG */
|
2000-12-30 02:41:15 +00:00
|
|
|
|
2007-10-17 12:58:23 +00:00
|
|
|
|
2009-04-16 19:26:00 +00:00
|
|
|
#ifndef GST_INFO_C
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && __GNUC__ >= 3
|
2003-06-29 14:05:49 +00:00
|
|
|
# pragma GCC poison gst_debug_log
|
2003-11-24 02:09:23 +00:00
|
|
|
# pragma GCC poison gst_debug_log_valist
|
2003-06-29 14:05:49 +00:00
|
|
|
# pragma GCC poison _gst_debug_category_new
|
2002-11-29 17:05:13 +00:00
|
|
|
#endif
|
|
|
|
|
2011-10-08 12:37:09 +00:00
|
|
|
#define _gst_debug_min GST_LEVEL_NONE
|
2009-06-19 13:45:42 +00:00
|
|
|
|
2009-07-20 19:54:00 +00:00
|
|
|
#define gst_debug_set_default_threshold(level) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
|
|
|
|
|
2006-10-05 12:31:07 +00:00
|
|
|
#define gst_debug_level_get_name(level) ("NONE")
|
2009-04-16 19:26:00 +00:00
|
|
|
#define gst_debug_message_get(message) ("")
|
2012-06-20 11:28:08 +00:00
|
|
|
#define gst_debug_add_log_function(func,data,notify) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
#define gst_debug_set_active(active) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
#define gst_debug_is_active() (FALSE)
|
2009-07-20 19:54:00 +00:00
|
|
|
#define gst_debug_set_colored(colored) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
#define gst_debug_is_colored() (FALSE)
|
2009-07-20 19:54:00 +00:00
|
|
|
#define gst_debug_set_default_threshold(level) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
#define gst_debug_get_default_threshold() (GST_LEVEL_NONE)
|
2009-07-20 19:54:00 +00:00
|
|
|
#define gst_debug_set_threshold_for_name(name,level) G_STMT_START{ }G_STMT_END
|
|
|
|
#define gst_debug_unset_threshold_for_name(name) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2010-03-29 13:34:03 +00:00
|
|
|
/* we are using dummy function prototypes here to eat ';' as these macros are
|
|
|
|
* used outside of functions */
|
2010-03-28 12:10:20 +00:00
|
|
|
#define GST_DEBUG_CATEGORY(var) void _gst_debug_dummy_##var (void)
|
|
|
|
#define GST_DEBUG_CATEGORY_EXTERN(var) void _gst_debug_dummy_extern_##var (void)
|
2010-03-29 13:13:54 +00:00
|
|
|
#define GST_DEBUG_CATEGORY_STATIC(var) void _gst_debug_dummy_static_##var (void)
|
2010-03-29 13:34:03 +00:00
|
|
|
|
2009-07-20 19:54:00 +00:00
|
|
|
#define GST_DEBUG_CATEGORY_INIT(var,name,color,desc) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_DEBUG_CATEGORY_GET(var,name) G_STMT_START{ }G_STMT_END
|
|
|
|
#define gst_debug_category_free(category) G_STMT_START{ }G_STMT_END
|
|
|
|
#define gst_debug_category_set_threshold(category,level) G_STMT_START{ }G_STMT_END
|
|
|
|
#define gst_debug_category_reset_threshold(category) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
#define gst_debug_category_get_threshold(category) (GST_LEVEL_NONE)
|
|
|
|
#define gst_debug_category_get_name(cat) ("")
|
|
|
|
#define gst_debug_category_get_color(cat) (0)
|
|
|
|
#define gst_debug_category_get_description(cat) ("")
|
|
|
|
#define gst_debug_get_all_categories() (NULL)
|
|
|
|
#define gst_debug_construct_term_color(colorinfo) (g_strdup ("00"))
|
2009-03-18 16:30:12 +00:00
|
|
|
#define gst_debug_construct_win_color(colorinfo) (0)
|
2000-12-29 10:02:17 +00:00
|
|
|
|
2009-04-16 19:26:00 +00:00
|
|
|
#endif /* !GST_INFO_C */
|
|
|
|
|
2002-11-29 17:05:13 +00:00
|
|
|
#ifdef G_HAVE_ISO_VARARGS
|
|
|
|
|
2009-07-20 19:54:00 +00:00
|
|
|
#define GST_CAT_LEVEL_LOG(cat,level,...) G_STMT_START{ }G_STMT_END
|
|
|
|
|
|
|
|
#define GST_CAT_ERROR_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_WARNING_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_INFO_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_DEBUG_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_LOG_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_FIXME_OBJECT(...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_CAT_TRACE_OBJECT(...) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
|
|
|
|
#define GST_CAT_ERROR(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_WARNING(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_INFO(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_DEBUG(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_LOG(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_FIXME(...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_CAT_TRACE(...) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
|
|
|
|
#define GST_ERROR_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_WARNING_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_INFO_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_DEBUG_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_LOG_OBJECT(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_FIXME_OBJECT(...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_TRACE_OBJECT(...) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
|
|
|
|
#define GST_ERROR(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_WARNING(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_INFO(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_DEBUG(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_LOG(...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_FIXME(...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_TRACE(...) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2009-06-19 13:45:42 +00:00
|
|
|
#else /* !G_HAVE_ISO_VARARGS */
|
2004-04-15 23:25:39 +00:00
|
|
|
#ifdef G_HAVE_GNUC_VARARGS
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2009-07-20 19:54:00 +00:00
|
|
|
#define GST_CAT_LEVEL_LOG(cat,level,args...) G_STMT_START{ }G_STMT_END
|
|
|
|
|
|
|
|
#define GST_CAT_ERROR_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_WARNING_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_INFO_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_DEBUG_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_LOG_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_FIXME_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_CAT_TRACE_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
|
|
|
|
#define GST_CAT_ERROR(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_WARNING(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_INFO(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_DEBUG(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_LOG(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_FIXME(args...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_CAT_TRACE(args...) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
|
|
|
|
#define GST_ERROR_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_WARNING_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_INFO_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_DEBUG_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_LOG_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_FIXME_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_TRACE_OBJECT(args...) G_STMT_START{ }G_STMT_END
|
2009-07-20 19:54:00 +00:00
|
|
|
|
|
|
|
#define GST_ERROR(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_WARNING(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_INFO(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_DEBUG(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_LOG(args...) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_FIXME(args...) G_STMT_START{ }G_STMT_END
|
2010-06-15 09:46:08 +00:00
|
|
|
#define GST_TRACE(args...) G_STMT_START{ }G_STMT_END
|
2003-06-29 14:05:49 +00:00
|
|
|
|
2009-06-19 13:45:42 +00:00
|
|
|
#else /* !G_HAVE_GNUC_VARARGS */
|
2004-05-10 18:07:24 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
|
|
|
|
GstDebugLevel level, gpointer object, const char *format, va_list varargs)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_ERROR_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_WARNING_OBJECT (GstDebugCategory * cat, gpointer obj,
|
|
|
|
const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_INFO_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_DEBUG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_LOG_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_FIXME_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-06-15 09:46:08 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_TRACE_OBJECT (GstDebugCategory * cat, gpointer obj, const char *format,
|
|
|
|
...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_ERROR (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_WARNING (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_INFO (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_DEBUG (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_CAT_LOG (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_FIXME (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-06-15 09:46:08 +00:00
|
|
|
static inline void
|
|
|
|
GST_CAT_TRACE (GstDebugCategory * cat, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_ERROR_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_WARNING_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_INFO_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_DEBUG_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_LOG_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-04-06 00:27:26 +00:00
|
|
|
static inline void
|
|
|
|
GST_FIXME_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-06-15 09:46:08 +00:00
|
|
|
static inline void
|
|
|
|
GST_TRACE_OBJECT (gpointer obj, const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-04-15 23:25:39 +00:00
|
|
|
static inline void
|
|
|
|
GST_ERROR (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_WARNING (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_INFO (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_DEBUG (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_LOG (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
2009-04-06 00:27:26 +00:00
|
|
|
|
|
|
|
static inline void
|
|
|
|
GST_FIXME (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-06-15 09:46:08 +00:00
|
|
|
static inline void
|
|
|
|
GST_TRACE (const char *format, ...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-06-19 13:45:42 +00:00
|
|
|
#endif /* G_HAVE_GNUC_VARARGS */
|
|
|
|
#endif /* G_HAVE_ISO_VARARGS */
|
2000-12-29 10:02:17 +00:00
|
|
|
|
2009-12-01 16:53:03 +00:00
|
|
|
#define GST_DEBUG_REGISTER_FUNCPTR(ptr) G_STMT_START{ }G_STMT_END
|
2002-12-11 21:33:07 +00:00
|
|
|
#define GST_DEBUG_FUNCPTR(ptr) (ptr)
|
2003-06-29 14:05:49 +00:00
|
|
|
#define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))
|
|
|
|
|
2009-07-20 19:54:00 +00:00
|
|
|
#define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_CAT_MEMDUMP(cat,msg,data,length) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_MEMDUMP_OBJECT(obj,msg,data,length) G_STMT_START{ }G_STMT_END
|
|
|
|
#define GST_MEMDUMP(msg,data,length) G_STMT_START{ }G_STMT_END
|
2009-04-06 00:27:26 +00:00
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#endif /* GST_DISABLE_GST_DEBUG */
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2007-10-17 12:58:23 +00:00
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
void gst_debug_print_stack_trace (void);
|
|
|
|
|
2003-07-12 15:15:57 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2000-12-29 10:02:17 +00:00
|
|
|
#endif /* __GSTINFO_H__ */
|