![]() |
![]() |
![]() |
GStreamer 0.10 Core Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/gst.h> enum GstDebugLevel; #define GST_LEVEL_DEFAULT enum GstDebugColorFlags; GstDebugCategory; #define GST_STR_NULL (str) #define GST_DEBUG_PAD_NAME (pad) #define GST_FUNCTION void (*GstLogFunction) (GstDebugCategory *category, GstDebugLevel level, const gchar *file, const gchar *function, gint line, GObject *object, GstDebugMessage *message, gpointer data); void gst_debug_log (GstDebugCategory *category, GstDebugLevel level, const gchar *file, const gchar *function, gint line, GObject *object, const gchar *format, ...); 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); 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); const gchar* gst_debug_level_get_name (GstDebugLevel level); void gst_debug_add_log_function (GstLogFunction func, gpointer data); guint gst_debug_remove_log_function (GstLogFunction func); guint gst_debug_remove_log_function_by_data (gpointer data); void gst_debug_set_active (gboolean active); gboolean gst_debug_is_active (void); void gst_debug_set_colored (gboolean colored); gboolean gst_debug_is_colored (void); 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); void gst_debug_unset_threshold_for_name (const gchar *name); #define GST_DEBUG_CATEGORY (cat) #define GST_DEBUG_CATEGORY_EXTERN (cat) #define GST_DEBUG_CATEGORY_STATIC (cat) #define GST_DEBUG_CATEGORY_INIT (cat,name,color,description) 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); const gchar* gst_debug_category_get_name (GstDebugCategory *category); guint gst_debug_category_get_color (GstDebugCategory *category); const gchar* gst_debug_category_get_description (GstDebugCategory *category); GSList* gst_debug_get_all_categories (void); gchar* gst_debug_construct_term_color (guint colorinfo); #define GST_CAT_LEVEL_LOG (cat,level,object,...) #define GST_CAT_ERROR_OBJECT (cat,obj,...) #define GST_CAT_WARNING_OBJECT (cat,obj,...) #define GST_CAT_INFO_OBJECT (cat,obj,...) #define GST_CAT_DEBUG_OBJECT (cat,obj,...) #define GST_CAT_LOG_OBJECT (cat,obj,...) #define GST_CAT_ERROR (cat,...) #define GST_CAT_WARNING (cat,...) #define GST_CAT_INFO (cat,...) #define GST_CAT_DEBUG (cat,...) #define GST_CAT_LOG (cat,...) #define GST_ERROR_OBJECT (obj,...) #define GST_WARNING_OBJECT (obj,...) #define GST_INFO_OBJECT (obj,...) #define GST_DEBUG_OBJECT (obj,...) #define GST_LOG_OBJECT (obj,...) #define GST_ERROR (...) #define GST_WARNING (...) #define GST_INFO (...) #define GST_DEBUG (...) #define GST_LOG (...) #define GST_DEBUG_FUNCPTR (ptr) #define GST_DEBUG_FUNCPTR_NAME (ptr) void gst_debug_print_stack_trace (void); #define GST_TIME_FORMAT #define GST_TIME_ARGS (t)
GStreamer's debugging subsystem is an easy way to get information about what the application is doing. It is not meant for programming errors. Use GLib methods (g_warning and friends) for that.
The debugging subsystem works only after GStreamer has been initialized
- for example by calling gst_init()
.
The debugging subsystem is used to log informational messages while the application runs. Each messages has some properties attached to it. Among these properties are the debugging category, the severity (called "level" here) and an optional GObject it belongs to. Each of these messages is sent to all registered debugging handlers, which then handle the messages. GStreamer attaches a default handler on startup, which outputs requested messages to stderr.
Messages are output by using shortcut macros like GST_DEBUG,
GST_CAT_ERROR_OBJECT or similar. These all expand to calling gst_debug_log()
with the right parameters.
The only thing a developer will probably want to do is define his own
categories. This is easily done with 3 lines. At the top of your code,
declare
the variables and set the default category.
GST_DEBUG_CATEGORY_STATIC (my_category); // define category (statically) #define GST_CAT_DEFAULT my_category // set as default
After that you only need to initialize the category.
GST_DEBUG_CATEGORY_INIT (my_category, "my category", 0, "This is my very own");
Initialization must be done before the category is used first. Plugins do this in their plugin_init function, libraries and applications should do that during their initialization.
The whole debugging subsystem can be disabled at build time with passing the --disable-gst-debug switch to configure. If this is done, every function, macro and even structs described in this file evaluate to default values or nothing at all. So don't take addresses of these functions or use other tricks. If you must do that for some reason, there is still an option. If the debugging subsystem was compiled out, GST_DISABLE_GST_DEBUG is defined in <gst/gst.h>, so you can check that before doing your trick. Disabling the debugging subsystem will give you a slight (read: unnoticable) speed increase and will reduce the size of your compiled code. The GStreamer library itself becomes around 10% smaller.
Please note that there are naming conventions for the names of debugging
categories. These are explained at GST_DEBUG_CATEGORY_INIT()
.
typedef enum { GST_LEVEL_NONE = 0, GST_LEVEL_ERROR, GST_LEVEL_WARNING, GST_LEVEL_INFO, GST_LEVEL_DEBUG, GST_LEVEL_LOG, /* add more */ GST_LEVEL_COUNT } GstDebugLevel;
The level defines the importance of a debugging message. The more important a message is, the greater the probability that the debugging system outputs it.
GST_LEVEL_NONE
GST_LEVEL_NONE
No debugging level specified or desired. Used to deactivate
debugging output.
No debugging level specified or desired. Used to deactivate
debugging output.
GST_LEVEL_ERROR
GST_LEVEL_ERROR
Error messages are to be used only when an error occured
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.
Error messages are to be used only when an error occured
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
GST_LEVEL_WARNING
Warning messages are to inform about abnormal behaviour
that could lead to problems or weird behaviour later on. An example of this
would be clocking issues ("your computer is pretty slow") or broken input
data ("Can't synchronize to stream.")
Warning messages are to inform about abnormal behaviour
that could lead to problems or weird behaviour later on. An example of this
would be clocking issues ("your computer is pretty slow") or broken input
data ("Can't synchronize to stream.")
GST_LEVEL_INFO
GST_LEVEL_INFO
Informational messages should be used to keep the developer
updated about what is happening.
Examples where this should be used are when a typefind function has
successfully determined the type of the stream or when an mp3 plugin detects
the format to be used. ("This file has mono sound.")
Informational messages should be used to keep the developer
updated about what is happening.
Examples where this should be used are when a typefind function has
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
GST_LEVEL_DEBUG
Debugging messages should be used when something common
happens that is not the expected default behavior.
An example would be notifications about state changes or receiving/sending of
events.
Debugging messages should be used when something common
happens that is not the expected default behavior.
An example would be notifications about state changes or receiving/sending of
events.
GST_LEVEL_LOG
GST_LEVEL_LOG
Log messages are messages that are very common but might be
useful to know. As a rule of thumb a pipeline that is iterating as expected
should never output anzthing else but LOG messages.
Examples for this are referencing/dereferencing of objects or cothread switches.
Log messages are messages that are very common but might be
useful to know. As a rule of thumb a pipeline that is iterating as expected
should never output anzthing else but LOG messages.
Examples for this are referencing/dereferencing of objects or cothread switches.
GST_LEVEL_COUNT
GST_LEVEL_COUNT
The number of defined debugging levels.
The number of defined debugging levels.
#define GST_LEVEL_DEFAULT GST_LEVEL_NONE
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.
typedef enum { /* colors */ 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, /* background colors */ 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, /* other formats */ GST_DEBUG_BOLD = 0x0100, GST_DEBUG_UNDERLINE = 0x0200 } GstDebugColorFlags;
These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output.
GST_DEBUG_FG_BLACK
GST_DEBUG_FG_BLACK
Use black as foreground color.
Use black as foreground color.
GST_DEBUG_FG_RED
GST_DEBUG_FG_RED
Use red as foreground color.
Use red as foreground color.
GST_DEBUG_FG_GREEN
GST_DEBUG_FG_GREEN
Use green as foreground color.
Use green as foreground color.
GST_DEBUG_FG_YELLOW
GST_DEBUG_FG_YELLOW
Use yellow as foreground color.
Use yellow as foreground color.
GST_DEBUG_FG_BLUE
GST_DEBUG_FG_BLUE
Use blue as foreground color.
Use blue as foreground color.
GST_DEBUG_FG_MAGENTA
GST_DEBUG_FG_MAGENTA
Use magenta as foreground color.
Use magenta as foreground color.
GST_DEBUG_FG_CYAN
GST_DEBUG_FG_CYAN
Use cyan as foreground color.
Use cyan as foreground color.
GST_DEBUG_FG_WHITE
GST_DEBUG_FG_WHITE
Use white as foreground color.
Use white as foreground color.
GST_DEBUG_BG_BLACK
GST_DEBUG_BG_BLACK
Use black as background color.
Use black as background color.
GST_DEBUG_BG_RED
GST_DEBUG_BG_RED
Use red as background color.
Use red as background color.
GST_DEBUG_BG_GREEN
GST_DEBUG_BG_GREEN
Use green as background color.
Use green as background color.
GST_DEBUG_BG_YELLOW
GST_DEBUG_BG_YELLOW
Use yellow as background color.
Use yellow as background color.
GST_DEBUG_BG_BLUE
GST_DEBUG_BG_BLUE
Use blue as background color.
Use blue as background color.
GST_DEBUG_BG_MAGENTA
GST_DEBUG_BG_MAGENTA
Use magenta as background color.
Use magenta as background color.
GST_DEBUG_BG_CYAN
GST_DEBUG_BG_CYAN
Use cyan as background color.
Use cyan as background color.
GST_DEBUG_BG_WHITE
GST_DEBUG_BG_WHITE
Use white as background color.
Use white as background color.
GST_DEBUG_BOLD
GST_DEBUG_BOLD
Make the output bold.
Make the output bold.
GST_DEBUG_UNDERLINE
GST_DEBUG_UNDERLINE
Underline the output.
Underline the output.
typedef struct { } GstDebugCategory;
This is the struct that describes the categories. Once initialized with GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore.
#define GST_STR_NULL(str) ((str) ? (str) : "(NULL)")
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.
str
:str
The string to check.
The string to check.
str : |
The string to check. |
#define GST_DEBUG_PAD_NAME(pad)
Evaluates to 2 strings, that describe the pad. Often used in debugging statements.
pad
:pad
The pad to debug.
The pad to debug.
pad : |
The pad to debug. |
#define 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.
void (*GstLogFunction) (GstDebugCategory *category, GstDebugLevel level, const gchar *file, const gchar *function, gint line, GObject *object, GstDebugMessage *message, gpointer data);
Function prototype for a logging function that can be registered with
gst_debug_add_log_function()
.
Use G_GNUC_NO_INSTRUMENT on that function.
category
:category
a GstDebugCategory
a GstDebugCategory
GstDebugCategoryGstDebugCategorylevel
:level
a GstDebugLevel
a GstDebugLevel
GstDebugLevelGstDebugLevelfile
:file
file name
file name
function
:function
function name
function name
line
:line
line number
line number
object
:object
a GObject
a GObject
GObjectGObjectmessage
:message
the message
the message
data
:data
user data for the log function
user data for the log function
category : |
a GstDebugCategory |
level : |
a GstDebugLevel |
file : |
file name |
function : |
function name |
line : |
line number |
object : |
a GObject |
message : |
the message |
data : |
user data for the log function |
void gst_debug_log (GstDebugCategory *category, GstDebugLevel level, const gchar *file, const gchar *function, gint line, GObject *object, const gchar *format, ...);
Logs the given message using the currently registered debugging handlers.
category
:category
category to log
category to log
level
:level
level of the message is in
level of the message is in
file
:file
the file that emitted the message, usually the __FILE__ identifier
the file that emitted the message, usually the __FILE__ identifier
function
:function
the function that emitted the message
the function that emitted the message
line
:line
the line from that the message was emitted, usually __LINE__
the line from that the message was emitted, usually __LINE__
object
:object
the object this message relates to or NULL if none
the object this message relates to or NULL if none
format
:format
a printf style format string
a printf style format string
...
:...
optional arguments for the format
optional arguments for the format
category : |
category to log |
level : |
level of the message is in |
file : |
the file that emitted the message, usually the __FILE__ identifier |
function : |
the function that emitted the message |
line : |
the line from that the message was emitted, usually __LINE__ |
object : |
the object this message relates to or NULL if none |
format : |
a printf style format string |
... : |
optional arguments for the format |
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);
Logs the given message using the currently registered debugging handlers.
category
:category
category to log
category to log
level
:level
level of the message is in
level of the message is in
file
:file
the file that emitted the message, usually the __FILE__ identifier
the file that emitted the message, usually the __FILE__ identifier
function
:function
the function that emitted the message
the function that emitted the message
line
:line
the line from that the message was emitted, usually __LINE__
the line from that the message was emitted, usually __LINE__
object
:object
the object this message relates to or NULL if none
the object this message relates to or NULL if none
format
:format
a printf style format string
a printf style format string
args
:args
optional arguments for the format
optional arguments for the format
category : |
category to log |
level : |
level of the message is in |
file : |
the file that emitted the message, usually the __FILE__ identifier |
function : |
the function that emitted the message |
line : |
the line from that the message was emitted, usually __LINE__ |
object : |
the object this message relates to or NULL if none |
format : |
a printf style format string |
args : |
optional arguments for the format |
const gchar* gst_debug_message_get (GstDebugMessage *message);
Gets the string representation of a GstDebugMessage. This function is used in debug handlers to extract the message.
message
:message
a debug message
a debug message
Returns :Returns the string representation of a GstDebugMessage.
the string representation of a GstDebugMessage.
GstDebugMessageGstDebugMessage
message : |
a debug message |
Returns : | the string representation of a GstDebugMessage. |
void gst_debug_log_default (GstDebugCategory *category, GstDebugLevel level, const gchar *file, const gchar *function, gint line, GObject *object, GstDebugMessage *message, gpointer unused);
The default logging handler used by GStreamer. Logging functions get called
whenever a macro like GST_DEBUG or similar is used. This function outputs the
message and additional info using the glib error handler.
You can add other handlers by using gst_debug_add_log_function()
.
And you can remove this handler by calling
gst_debug_remove_log_function(gst_debug_log_default);
category
:category
category to log
category to log
level
:level
level of the message
level of the message
file
:file
the file that emitted the message, usually the __FILE__ identifier
the file that emitted the message, usually the __FILE__ identifier
function
:function
the function that emitted the message
the function that emitted the message
line
:line
the line from that the message was emitted, usually __LINE__
the line from that the message was emitted, usually __LINE__
object
:object
the object this message relates to or NULL if none
the object this message relates to or NULL if none
message
:message
the actual message
the actual message
unused
:unused
an unused variable, reserved for some user_data.
an unused variable, reserved for some user_data.
category : |
category to log |
level : |
level of the message |
file : |
the file that emitted the message, usually the __FILE__ identifier |
function : |
the function that emitted the message |
line : |
the line from that the message was emitted, usually __LINE__ |
object : |
the object this message relates to or NULL if none |
message : |
the actual message |
unused : |
an unused variable, reserved for some user_data. |
const gchar* gst_debug_level_get_name (GstDebugLevel level);
Get the string trepresentation of a debugging level
level
:level
the level to get the name for
the level to get the name for
Returns :Returns the name
the name
level : |
the level to get the name for |
Returns : | the name |
void gst_debug_add_log_function (GstLogFunction func, gpointer data);
Adds the logging function to the list of logging functions. Be sure to use G_GNUC_NO_INSTRUMENT on that function, it is needed.
func
:func
the function to use
the function to use
data
:data
user data
user data
func : |
the function to use |
data : |
user data |
guint gst_debug_remove_log_function (GstLogFunction func);
Removes all registrered instances of the given logging functions.
func
:func
the log function to remove
the log function to remove
Returns :Returns How many instances of the function were removed
How many instances of the function were removed
func : |
the log function to remove |
Returns : | How many instances of the function were removed |
guint gst_debug_remove_log_function_by_data (gpointer data);
Removes all registrered instances of log functions with the given user data.
data
:data
user data of the log function to remove
user data of the log function to remove
Returns :Returns How many instances of the function were removed
How many instances of the function were removed
data : |
user data of the log function to remove |
Returns : | How many instances of the function were removed |
void gst_debug_set_active (gboolean active);
If activated, debugging messages are sent to the debugging handlers. It makes sense to deactivate it for speed issues.
This function is not threadsafe. It makes sense to only call it during initialization.
active
:active
Whether to use debugging output or not
Whether to use debugging output or not
active : |
Whether to use debugging output or not |
gboolean gst_debug_is_active (void);
Checks if debugging output is activated.
Returns : | TRUE, if debugging is activated |
void gst_debug_set_colored (gboolean colored);
Sets or unsets the use of coloured debugging output.
colored
:colored
Whether to use colored output or not
Whether to use colored output or not
colored : |
Whether to use colored output or not |
gboolean gst_debug_is_colored (void);
Checks if the debugging output should be colored.
Returns : | TRUE, if the debug output should be colored. |
void gst_debug_set_default_threshold (GstDebugLevel level);
Sets the default threshold to the given level and updates all categories to use this threshold.
level
:level
level to set
level to set
level : |
level to set |
GstDebugLevel gst_debug_get_default_threshold (void);
Returns the default threshold that is used for new categories.
Returns : | the default threshold level |
void gst_debug_set_threshold_for_name (const gchar *name, GstDebugLevel level);
Sets all categories which match the given glob style pattern to the given level.
name
:name
name of the categories to set
name of the categories to set
level
:level
level to set them to
level to set them to
name : |
name of the categories to set |
level : |
level to set them to |
void gst_debug_unset_threshold_for_name (const gchar *name);
Resets all categories with the given name back to the default level.
name
:name
name of the categories to set
name of the categories to set
name : |
name of the categories to set |
#define GST_DEBUG_CATEGORY(cat)
Defines a GstDebugCategory variable. This macro expands to nothing if debugging is disabled.
cat
:cat
the category
the category
cat : |
the category |
#define GST_DEBUG_CATEGORY_EXTERN(cat)
Declares a GstDebugCategory variable as extern. Use in header files. This macro expands to nothing if debugging is disabled.
cat
:cat
the category
the category
cat : |
the category |
#define GST_DEBUG_CATEGORY_STATIC(cat)
Defines a static GstDebugCategory variable. This macro expands to nothing if debugging is disabled.
cat
:cat
the category
the category
cat : |
the category |
#define GST_DEBUG_CATEGORY_INIT(cat,name,color,description)
Initializes a new GstDebugCategory with the given properties and set to the default threshold.
This macro expands to nothing if debugging is disabled.
When naming your category, please follow the following conventions to ensure 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.
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 name the category "filesrc". Use lowercase letters only. If you define more than one category for the same element, append an underscore and an identifier to your categories, like this: "filesrc_cache"
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.
cat
:cat
the category to initialize.
the category to initialize.
name
:name
the name of the category.
the name of the category.
color
:color
the colors to use for a color representation or 0 for no color.
the colors to use for a color representation or 0 for no color.
description
:description
optional description of the category.
optional description of the category.
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. |
void gst_debug_category_free (GstDebugCategory *category);
Removes and frees the category and all associated resources.
category
:category
GstDebugCategory to free.
GstDebugCategory to free.
GstDebugCategoryGstDebugCategory
category : |
GstDebugCategory to free. |
void gst_debug_category_set_threshold (GstDebugCategory *category, GstDebugLevel level);
Sets the threshold of the category to the given level. Debug information will only be output if the threshold is lower or equal to the level of the debugging message.
Do not use this function in production code, because other functions may change the threshold of categories as side effect. It is however a nice function to use when debugging (even from gdb).
category
:category
a GstDebugCategory to set threshold of.
a GstDebugCategory to set threshold of.
GstDebugCategoryGstDebugCategorylevel
:level
the GstDebugLevel threshold to set.
the GstDebugLevel threshold to set.
GstDebugLevelGstDebugLevel
category : |
a GstDebugCategory to set threshold of. |
level : |
the GstDebugLevel threshold to set. |
void gst_debug_category_reset_threshold (GstDebugCategory *category);
Resets the threshold of the category to the default level. Debug information
will only be output if the threshold is lower or equal to the level of the
debugging message.
Use this function to set the threshold back to where it was after using
gst_debug_category_set_threshold()
.
category
:category
a GstDebugCategory to reset threshold of.
a GstDebugCategory to reset threshold of.
GstDebugCategoryGstDebugCategory
category : |
a GstDebugCategory to reset threshold of. |
GstDebugLevel gst_debug_category_get_threshold (GstDebugCategory *category);
Returns the threshold of a GstCategory.
category
:category
a GstDebugCategory to get threshold of.
a GstDebugCategory to get threshold of.
GstDebugCategoryGstDebugCategoryReturns :Returns the GstDebugLevel that is used as threshold.
the GstDebugLevel that is used as threshold.
GstDebugLevelGstDebugLevel
category : |
a GstDebugCategory to get threshold of. |
Returns : | the GstDebugLevel that is used as threshold. |
const gchar* gst_debug_category_get_name (GstDebugCategory *category);
Returns the name of a debug category.
category
:category
a GstDebugCategory to get name of.
a GstDebugCategory to get name of.
GstDebugCategoryGstDebugCategoryReturns :Returns the name of the category.
the name of the category.
category : |
a GstDebugCategory to get name of. |
Returns : | the name of the category. |
guint gst_debug_category_get_color (GstDebugCategory *category);
Returns the color of a debug category used when printing output in this category.
category
:category
a GstDebugCategory to get the color of.
a GstDebugCategory to get the color of.
GstDebugCategoryGstDebugCategoryReturns :Returns the color of the category.
the color of the category.
category : |
a GstDebugCategory to get the color of. |
Returns : | the color of the category. |
const gchar* gst_debug_category_get_description (GstDebugCategory *category);
Returns the description of a debug category.
category
:category
a GstDebugCategory to get the description of.
a GstDebugCategory to get the description of.
GstDebugCategoryGstDebugCategoryReturns :Returns the description of the category.
the description of the category.
category : |
a GstDebugCategory to get the description of. |
Returns : | the description of the category. |
GSList* gst_debug_get_all_categories (void);
Returns a snapshot of a all categories that are currently in use . This list may change anytime. The caller has to free the list after use.
Returns : | the list of categories |
gchar* gst_debug_construct_term_color (guint colorinfo);
Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use.
colorinfo
:colorinfo
the color info
the color info
Returns :Returns a string containing the color definition
a string containing the color definition
colorinfo : |
the color info |
Returns : | a string containing the color definition |
#define GST_CAT_LEVEL_LOG(cat,level,object,...)
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.
cat
:cat
category to use
category to use
level
:level
the severity of the message
the severity of the message
object
:object
the GObject the message belongs to or NULL if none
the GObject the message belongs to or NULL if none
GObjectGObject...
:...
A printf-style message to output
A printf-style message to output
...
:...
...
:...
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 |
... : |
|
... : |
#define GST_CAT_ERROR_OBJECT(cat,obj,...)
Output an error message belonging to the given object in the given category.
cat
:cat
category to use
category to use
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_WARNING_OBJECT(cat,obj,...)
Output a warning message belonging to the given object in the given category.
cat
:cat
category to use
category to use
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_INFO_OBJECT(cat,obj,...)
Output an informational message belonging to the given object in the given category.
cat
:cat
category to use
category to use
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_DEBUG_OBJECT(cat,obj,...)
Output an debugging message belonging to the given object in the given category.
cat
:cat
category to use
category to use
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_LOG_OBJECT(cat,obj,...)
Output an logging message belonging to the given object in the given category.
cat
:cat
category to use
category to use
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_ERROR(cat,...)
Output an error message in the given category.
cat
:cat
category to use
category to use
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_WARNING(cat,...)
Output an warning message in the given category.
cat
:cat
category to use
category to use
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_INFO(cat,...)
Output an informational message in the given category.
cat
:cat
category to use
category to use
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_DEBUG(cat,...)
Output an debugging message in the given category.
cat
:cat
category to use
category to use
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_CAT_LOG(cat,...)
Output an logging message in the given category.
cat
:cat
category to use
category to use
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
cat : |
category to use |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_ERROR_OBJECT(obj,...)
Output an error message belonging to the given object in the default category.
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_WARNING_OBJECT(obj,...)
Output a warning message belonging to the given object in the default category.
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_INFO_OBJECT(obj,...)
Output an informational message belonging to the given object in the default category.
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_DEBUG_OBJECT(obj,...)
Output a debugging message belonging to the given object in the default category.
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_LOG_OBJECT(obj,...)
Output a logging message belonging to the given object in the default category.
obj
:obj
the GObject the message belongs to
the GObject the message belongs to
GObjectGObject...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
obj : |
the GObject the message belongs to |
... : |
printf-style message to output |
... : |
|
... : |
#define GST_ERROR(...)
Output an error message in the default category.
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
... : |
printf-style message to output |
... : |
|
... : |
#define GST_WARNING(...)
Output a warning message in the default category.
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
... : |
printf-style message to output |
... : |
|
... : |
#define GST_INFO(...)
Output an informational message in the default category.
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
... : |
printf-style message to output |
... : |
|
... : |
#define GST_DEBUG(...)
Output a debugging message in the default category.
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
... : |
printf-style message to output |
... : |
|
... : |
#define GST_LOG(...)
Output a logging message in the default category.
...
:...
printf-style message to output
printf-style message to output
...
:...
...
:...
... : |
printf-style message to output |
... : |
|
... : |
#define GST_DEBUG_FUNCPTR(ptr)
Register a pointer to a function with its name, so it can later be used by
GST_DEBUG_FUNCPTR_NAME()
.
ptr
:ptr
pointer to the function to register
pointer to the function to register
ptr : |
pointer to the function to register |
#define GST_DEBUG_FUNCPTR_NAME(ptr)
Retrieves the name of the function, if it was previously registered with
GST_DEBUG_FUNCPTR()
. If not, it returns a description of the pointer.
This macro returns a constant string which must not be modified or freed by the caller.
ptr
:ptr
address of the function of which to look up the name
address of the function of which to look up the name
ptr : |
address of the function of which to look up the name |
void gst_debug_print_stack_trace (void);
If GST_ENABLE_FUNC_INSTRUMENTATION is defined a stacktracke is available for gstreamer code, which can be printed with this function.
#define GST_TIME_FORMAT "u:%02u:%02u.%09u"
A format that can be used in printf like format strings to format a GstClockTime value.