# GstInfo

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: unnoticeable) 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.

## GstDebugCategory

This is the struct that describes the categories. Once initialized with GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore.

## Gst.DebugCategory

This is the struct that describes the categories. Once initialized with GST_DEBUG_CATEGORY_INIT (not introspectable), its values can't be changed anymore.

## Gst.DebugCategory

This is the struct that describes the categories. Once initialized with GST_DEBUG_CATEGORY_INIT (not introspectable), its values can't be changed anymore.

### Methods

#### gst_debug_category_free

    gst_debug_category_free (GstDebugCategory * category)

Removes and frees the category and all associated resources.

Parameters:

`category` –

GstDebugCategory to free.

deprecated : This function can easily cause memory corruption, don't use it.

#### Gst.DebugCategory.prototype.free

    function Gst.DebugCategory.prototype.free(): {
        // javascript wrapper for 'gst_debug_category_free'
    }

Removes and frees the category and all associated resources.

Parameters:

`category` (Gst.DebugCategory) –

Gst.DebugCategory to free.

deprecated : This function can easily cause memory corruption, don't use it.

#### Gst.DebugCategory.free

    def Gst.DebugCategory.free (self):
        #python wrapper for 'gst_debug_category_free'

Removes and frees the category and all associated resources.

Parameters:

`category` (Gst.DebugCategory) –

Gst.DebugCategory to free.

deprecated : This function can easily cause memory corruption, don't use it.

#### gst_debug_category_get_color

    guint
    gst_debug_category_get_color (GstDebugCategory * category)

Returns the color of a debug category used when printing output in this category.

Parameters:

`category` –

a GstDebugCategory to get the color of.

Returns –

the color of the category.

#### Gst.DebugCategory.prototype.get_color

    function Gst.DebugCategory.prototype.get_color(): {
        // javascript wrapper for 'gst_debug_category_get_color'
    }

Returns the color of a debug category used when printing output in this category.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get the color of.

Returns (Number) –

the color of the category.

#### Gst.DebugCategory.get_color

    def Gst.DebugCategory.get_color (self):
        #python wrapper for 'gst_debug_category_get_color'

Returns the color of a debug category used when printing output in this category.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get the color of.

Returns (int) –

the color of the category.

#### gst_debug_category_get_description

    const gchar *
    gst_debug_category_get_description (GstDebugCategory * category)

Returns the description of a debug category.

Parameters:

`category` –

a GstDebugCategory to get the description of.

Returns –

the description of the category.

#### Gst.DebugCategory.prototype.get_description

    function Gst.DebugCategory.prototype.get_description(): {
        // javascript wrapper for 'gst_debug_category_get_description'
    }

Returns the description of a debug category.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get the description of.

Returns (String) –

the description of the category.

#### Gst.DebugCategory.get_description

    def Gst.DebugCategory.get_description (self):
        #python wrapper for 'gst_debug_category_get_description'

Returns the description of a debug category.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get the description of.

Returns (str) –

the description of the category.

#### gst_debug_category_get_name

    const gchar *
    gst_debug_category_get_name (GstDebugCategory * category)

Returns the name of a debug category.

Parameters:

`category` –

a GstDebugCategory to get name of.

Returns –

the name of the category.

#### Gst.DebugCategory.prototype.get_name

    function Gst.DebugCategory.prototype.get_name(): {
        // javascript wrapper for 'gst_debug_category_get_name'
    }

Returns the name of a debug category.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get name of.

Returns (String) –

the name of the category.

#### Gst.DebugCategory.get_name

    def Gst.DebugCategory.get_name (self):
        #python wrapper for 'gst_debug_category_get_name'

Returns the name of a debug category.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get name of.

Returns (str) –

the name of the category.

#### gst_debug_category_get_threshold

    GstDebugLevel
    gst_debug_category_get_threshold (GstDebugCategory * category)

Returns the threshold of a GstDebugCategory.

Parameters:

`category` –

a GstDebugCategory to get threshold of.

Returns –

the GstDebugLevel that is used as threshold.

#### Gst.DebugCategory.prototype.get_threshold

    function Gst.DebugCategory.prototype.get_threshold(): {
        // javascript wrapper for 'gst_debug_category_get_threshold'
    }

Returns the threshold of a Gst.DebugCategory.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get threshold of.

Returns (Gst.DebugLevel) –

the Gst.DebugLevel that is used as threshold.

#### Gst.DebugCategory.get_threshold

    def Gst.DebugCategory.get_threshold (self):
        #python wrapper for 'gst_debug_category_get_threshold'

Returns the threshold of a Gst.DebugCategory.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to get threshold of.

Returns (Gst.DebugLevel) –

the Gst.DebugLevel that is used as threshold.

#### gst_debug_category_reset_threshold

    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.

Parameters:

`category` –

a GstDebugCategory to reset threshold of.

#### Gst.DebugCategory.prototype.reset_threshold

    function Gst.DebugCategory.prototype.reset_threshold(): {
        // javascript wrapper for 'gst_debug_category_reset_threshold'
    }

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.DebugCategory.prototype.set_threshold.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to reset threshold of.

#### Gst.DebugCategory.reset_threshold

    def Gst.DebugCategory.reset_threshold (self):
        #python wrapper for 'gst_debug_category_reset_threshold'

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.DebugCategory.set_threshold.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to reset threshold of.

#### gst_debug_category_set_threshold

    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).

Parameters:

`category` –

a GstDebugCategory to set threshold of.

`level` –

the GstDebugLevel threshold to set.

#### Gst.DebugCategory.prototype.set_threshold

    function Gst.DebugCategory.prototype.set_threshold(level: Gst.DebugLevel): {
        // javascript wrapper for 'gst_debug_category_set_threshold'
    }

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).

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to set threshold of.

`level` (Gst.DebugLevel) –

the Gst.DebugLevel threshold to set.

#### Gst.DebugCategory.set_threshold

    def Gst.DebugCategory.set_threshold (self, level):
        #python wrapper for 'gst_debug_category_set_threshold'

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).

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory to set threshold of.

`level` (Gst.DebugLevel) –

the Gst.DebugLevel threshold to set.

## GstDebugMessage

## Gst.DebugMessage

### Methods

#### gst_debug_message_get

    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.

Parameters:

`message` –

a debug message

Returns ( [nullable]) –

the string representation of a GstDebugMessage.

#### Gst.DebugMessage.prototype.get

    function Gst.DebugMessage.prototype.get(): {
        // javascript wrapper for 'gst_debug_message_get'
    }

Gets the string representation of a Gst.DebugMessage. This function is used in debug handlers to extract the message.

Parameters:

`message` (Gst.DebugMessage) –

a debug message

Returns (String) –

the string representation of a Gst.DebugMessage.

#### Gst.DebugMessage.get

    def Gst.DebugMessage.get (self):
        #python wrapper for 'gst_debug_message_get'

Gets the string representation of a Gst.DebugMessage. This function is used in debug handlers to extract the message.

Parameters:

`message` (Gst.DebugMessage) –

a debug message

Returns (str) –

the string representation of a Gst.DebugMessage.

#### gst_debug_message_get_id

    const gchar *
    gst_debug_message_get_id (GstDebugMessage * message)

Get the id of the object that emitted this message. This function is used in debug handlers. Can be empty.

Parameters:

`message` –

a debug message

Returns ( [nullable]) –

The emitter of a GstDebugMessage.

Since : 1.22

#### Gst.DebugMessage.prototype.get_id

    function Gst.DebugMessage.prototype.get_id(): {
        // javascript wrapper for 'gst_debug_message_get_id'
    }

Get the id of the object that emitted this message. This function is used in debug handlers. Can be empty.

Parameters:

`message` (Gst.DebugMessage) –

a debug message

Returns (String) –

The emitter of a Gst.DebugMessage.

Since : 1.22

#### Gst.DebugMessage.get_id

    def Gst.DebugMessage.get_id (self):
        #python wrapper for 'gst_debug_message_get_id'

Get the id of the object that emitted this message. This function is used in debug handlers. Can be empty.

Parameters:

`message` (Gst.DebugMessage) –

a debug message

Returns (str) –

The emitter of a Gst.DebugMessage.

Since : 1.22

## Functions

### gst_debug_add_log_function

    gst_debug_add_log_function (GstLogFunction func,
                                gpointer user_data,
                                GDestroyNotify notify)

Adds the logging function to the list of logging functions. Be sure to use G_GNUC_NO_INSTRUMENT on that function, it is needed.

Parameters:

`func` –

the function to use

`user_data` –

user data

`notify` –

called when user_data is not used anymore

### Gst.prototype.debug_add_log_function

    function Gst.prototype.debug_add_log_function(func: Gst.LogFunction, user_data: Object): {
        // javascript wrapper for 'gst_debug_add_log_function'
    }

Adds the logging function to the list of logging functions. Be sure to use G_GNUC_NO_INSTRUMENT (not introspectable) on that function, it is needed.

Parameters:

`func` (Gst.LogFunction) –

the function to use

`user_data` (Object) –

user data

### Gst.debug_add_log_function

    def Gst.debug_add_log_function (func, *user_data):
        #python wrapper for 'gst_debug_add_log_function'

Adds the logging function to the list of logging functions. Be sure to use G_GNUC_NO_INSTRUMENT (not introspectable) on that function, it is needed.

Parameters:

`func` (Gst.LogFunction) –

the function to use

`user_data` (variadic) –

user data

### gst_debug_add_ring_buffer_logger

    gst_debug_add_ring_buffer_logger (guint max_size_per_thread,
                                      guint thread_timeout)

Adds a memory ringbuffer based debug logger that stores up to max_size_per_thread bytes of logs per thread and times out threads after thread_timeout seconds of inactivity.

Logs can be fetched with gst_debug_ring_buffer_logger_get_logs and the logger can be removed again with gst_debug_remove_ring_buffer_logger. Only one logger at a time is possible.

Parameters:

`max_size_per_thread` –

Maximum size of log per thread in bytes

`thread_timeout` –

Timeout for threads in seconds

Since : 1.14

### Gst.prototype.debug_add_ring_buffer_logger

    function Gst.prototype.debug_add_ring_buffer_logger(max_size_per_thread: Number, thread_timeout: Number): {
        // javascript wrapper for 'gst_debug_add_ring_buffer_logger'
    }

Adds a memory ringbuffer based debug logger that stores up to max_size_per_thread bytes of logs per thread and times out threads after thread_timeout seconds of inactivity.

Logs can be fetched with Gst.prototype.debug_ring_buffer_logger_get_logs and the logger can be removed again with Gst.prototype.debug_remove_ring_buffer_logger. Only one logger at a time is possible.

Parameters:

`max_size_per_thread` (Number) –

Maximum size of log per thread in bytes

`thread_timeout` (Number) –

Timeout for threads in seconds

Since : 1.14

### Gst.debug_add_ring_buffer_logger

    def Gst.debug_add_ring_buffer_logger (max_size_per_thread, thread_timeout):
        #python wrapper for 'gst_debug_add_ring_buffer_logger'

Adds a memory ringbuffer based debug logger that stores up to max_size_per_thread bytes of logs per thread and times out threads after thread_timeout seconds of inactivity.

Logs can be fetched with Gst.debug_ring_buffer_logger_get_logs and the logger can be removed again with Gst.debug_remove_ring_buffer_logger. Only one logger at a time is possible.

Parameters:

`max_size_per_thread` (int) –

Maximum size of log per thread in bytes

`thread_timeout` (int) –

Timeout for threads in seconds

Since : 1.14

### gst_debug_construct_term_color

    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.

Parameters:

`colorinfo` –

the color info

Returns ( [transfer: full][typegchar*]) –

a string containing the color definition

### Gst.prototype.debug_construct_term_color

    function Gst.prototype.debug_construct_term_color(colorinfo: Number): {
        // javascript wrapper for 'gst_debug_construct_term_color'
    }

Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use.

Parameters:

`colorinfo` (Number) –

the color info

Returns (String) –

a string containing the color definition

### Gst.debug_construct_term_color

    def Gst.debug_construct_term_color (colorinfo):
        #python wrapper for 'gst_debug_construct_term_color'

Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use.

Parameters:

`colorinfo` (int) –

the color info

Returns (str) –

a string containing the color definition

### gst_debug_construct_win_color

    gint
    gst_debug_construct_win_color (guint colorinfo)

Constructs an integer that can be used for getting the desired color in windows' terminals (cmd.exe). As there is no mean to underline, we simply ignore this attribute.

This function returns 0 on non-windows machines.

Parameters:

`colorinfo` –

the color info

Returns –

an integer containing the color definition

### Gst.prototype.debug_construct_win_color

    function Gst.prototype.debug_construct_win_color(colorinfo: Number): {
        // javascript wrapper for 'gst_debug_construct_win_color'
    }

Constructs an integer that can be used for getting the desired color in windows' terminals (cmd.exe). As there is no mean to underline, we simply ignore this attribute.

This function returns 0 on non-windows machines.

Parameters:

`colorinfo` (Number) –

the color info

Returns (Number) –

an integer containing the color definition

### Gst.debug_construct_win_color

    def Gst.debug_construct_win_color (colorinfo):
        #python wrapper for 'gst_debug_construct_win_color'

Constructs an integer that can be used for getting the desired color in windows' terminals (cmd.exe). As there is no mean to underline, we simply ignore this attribute.

This function returns 0 on non-windows machines.

Parameters:

`colorinfo` (int) –

the color info

Returns (int) –

an integer containing the color definition

### gst_debug_get_all_categories

    GSList *
    gst_debug_get_all_categories ()

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 ( [transfer: container][element-typeGst.DebugCategory]) –

the list of debug categories

### Gst.prototype.debug_get_all_categories

    function Gst.prototype.debug_get_all_categories(): {
        // javascript wrapper for 'gst_debug_get_all_categories'
    }

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 (GLib.SList) –

the list of debug categories

### Gst.debug_get_all_categories

    def Gst.debug_get_all_categories ():
        #python wrapper for 'gst_debug_get_all_categories'

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 (GLib.SList) –

the list of debug categories

### gst_debug_get_color_mode

    GstDebugColorMode
    gst_debug_get_color_mode ()

Changes the coloring mode for debug output.

Returns –

see GstDebugColorMode for possible values.

Since : 1.2

### Gst.prototype.debug_get_color_mode

    function Gst.prototype.debug_get_color_mode(): {
        // javascript wrapper for 'gst_debug_get_color_mode'
    }

Changes the coloring mode for debug output.

Returns (Gst.DebugColorMode) –

see GstDebugColorMode for possible values.

Since : 1.2

### Gst.debug_get_color_mode

    def Gst.debug_get_color_mode ():
        #python wrapper for 'gst_debug_get_color_mode'

Changes the coloring mode for debug output.

Returns (Gst.DebugColorMode) –

see GstDebugColorMode for possible values.

Since : 1.2

### gst_debug_get_default_threshold

    GstDebugLevel
    gst_debug_get_default_threshold ()

Returns the default threshold that is used for new categories.

Returns –

the default threshold level

### Gst.prototype.debug_get_default_threshold

    function Gst.prototype.debug_get_default_threshold(): {
        // javascript wrapper for 'gst_debug_get_default_threshold'
    }

Returns the default threshold that is used for new categories.

Returns (Gst.DebugLevel) –

the default threshold level

### Gst.debug_get_default_threshold

    def Gst.debug_get_default_threshold ():
        #python wrapper for 'gst_debug_get_default_threshold'

Returns the default threshold that is used for new categories.

Returns (Gst.DebugLevel) –

the default threshold level

### gst_debug_get_stack_trace

    gchar *
    gst_debug_get_stack_trace (GstStackTraceFlags flags)

Parameters:

`flags` –

A set of GstStackTraceFlags to determine how the stack trace should look like. Pass GST_STACK_TRACE_SHOW_NONE to retrieve a minimal backtrace.

Returns ( [nullable]) –

a stack trace, if libunwind or glibc backtrace are present, else NULL.

Since : 1.12

### Gst.prototype.debug_get_stack_trace

    function Gst.prototype.debug_get_stack_trace(flags: Gst.StackTraceFlags): {
        // javascript wrapper for 'gst_debug_get_stack_trace'
    }

Parameters:

`flags` (Gst.StackTraceFlags) –

A set of Gst.StackTraceFlags to determine how the stack trace should look like. Pass Gst.StackTraceFlags.NONE to retrieve a minimal backtrace.

Returns (String) –

a stack trace, if libunwind or glibc backtrace are present, else null.

Since : 1.12

### Gst.debug_get_stack_trace

    def Gst.debug_get_stack_trace (flags):
        #python wrapper for 'gst_debug_get_stack_trace'

Parameters:

`flags` (Gst.StackTraceFlags) –

A set of Gst.StackTraceFlags to determine how the stack trace should look like. Pass Gst.StackTraceFlags.NONE to retrieve a minimal backtrace.

Returns (str) –

a stack trace, if libunwind or glibc backtrace are present, else None.

Since : 1.12

### gst_debug_is_active

    gboolean
    gst_debug_is_active ()

Checks if debugging output is activated.

Returns –

TRUE, if debugging is activated

### Gst.prototype.debug_is_active

    function Gst.prototype.debug_is_active(): {
        // javascript wrapper for 'gst_debug_is_active'
    }

Checks if debugging output is activated.

Returns (Number) –

true, if debugging is activated

### Gst.debug_is_active

    def Gst.debug_is_active ():
        #python wrapper for 'gst_debug_is_active'

Checks if debugging output is activated.

Returns (bool) –

True, if debugging is activated

### gst_debug_is_colored

    gboolean
    gst_debug_is_colored ()

Checks if the debugging output should be colored.

Returns –

TRUE, if the debug output should be colored.

### Gst.prototype.debug_is_colored

    function Gst.prototype.debug_is_colored(): {
        // javascript wrapper for 'gst_debug_is_colored'
    }

Checks if the debugging output should be colored.

Returns (Number) –

true, if the debug output should be colored.

### Gst.debug_is_colored

    def Gst.debug_is_colored ():
        #python wrapper for 'gst_debug_is_colored'

Checks if the debugging output should be colored.

Returns (bool) –

True, if the debug output should be colored.

### gst_debug_level_get_name

    const gchar *
    gst_debug_level_get_name (GstDebugLevel level)

Get the string representation of a debugging level

Parameters:

`level` –

the level to get the name for

Returns –

the name

### Gst.prototype.debug_level_get_name

    function Gst.prototype.debug_level_get_name(level: Gst.DebugLevel): {
        // javascript wrapper for 'gst_debug_level_get_name'
    }

Get the string representation of a debugging level

Parameters:

`level` (Gst.DebugLevel) –

the level to get the name for

Returns (String) –

the name

### Gst.debug_level_get_name

    def Gst.debug_level_get_name (level):
        #python wrapper for 'gst_debug_level_get_name'

Get the string representation of a debugging level

Parameters:

`level` (Gst.DebugLevel) –

the level to get the name for

Returns (str) –

the name

### gst_debug_log

    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.

Parameters:

`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` ( [transfer: none][allow-none]) –

the object this message relates to, or NULL if none

`format` –

a printf style format string

`...` –

optional arguments for the format

### gst_debug_log_default

    gst_debug_log_default (GstDebugCategory * category,
                           GstDebugLevel level,
                           const gchar * file,
                           const gchar * function,
                           gint line,
                           GObject * object,
                           GstDebugMessage * message,
                           gpointer user_data)

The default logging handler used by GStreamer. Logging functions get called whenever a macro like GST_DEBUG or similar is used. By default this function is setup to output the message and additional info to stderr (or the log file specified via the GST_DEBUG_FILE environment variable) as received via user_data.

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);

Parameters:

`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` ( [transfer: none][allow-none]) –

the object this message relates to, or NULL if none

`message` –

the actual message

`user_data` –

the FILE* to log to

### Gst.prototype.debug_log_default

    function Gst.prototype.debug_log_default(category: Gst.DebugCategory, level: Gst.DebugLevel, file: String, function: String, line: Number, object: GObject.Object, message: Gst.DebugMessage, user_data: Object): {
        // javascript wrapper for 'gst_debug_log_default'
    }

The default logging handler used by GStreamer. Logging functions get called whenever a macro like GST_DEBUG or similar is used. By default this function is setup to output the message and additional info to stderr (or the log file specified via the GST_DEBUG_FILE environment variable) as received via user_data.

You can add other handlers by using Gst.prototype.debug_add_log_function. And you can remove this handler by calling gst_debug_remove_log_function(gst_debug_log_default);

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message

`file` (String) –

the file that emitted the message, usually the FILE identifier

`function` (String) –

the function that emitted the message

`line` (Number) –

the line from that the message was emitted, usually LINE

`object` (GObject.Object) –

the object this message relates to, or null if none

`message` (Gst.DebugMessage) –

the actual message

`user_data` (Object) –

the FILE* to log to

### Gst.debug_log_default

    def Gst.debug_log_default (category, level, file, function, line, object, message, user_data):
        #python wrapper for 'gst_debug_log_default'

The default logging handler used by GStreamer. Logging functions get called whenever a macro like GST_DEBUG or similar is used. By default this function is setup to output the message and additional info to stderr (or the log file specified via the GST_DEBUG_FILE environment variable) as received via user_data.

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);

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message

`file` (str) –

the file that emitted the message, usually the FILE identifier

`function` (str) –

the function that emitted the message

`line` (int) –

the line from that the message was emitted, usually LINE

`object` (GObject.Object) –

the object this message relates to, or None if none

`message` (Gst.DebugMessage) –

the actual message

`user_data` (object) –

the FILE* to log to

### gst_debug_log_get_line

    gchar *
    gst_debug_log_get_line (GstDebugCategory * category,
                            GstDebugLevel level,
                            const gchar * file,
                            const gchar * function,
                            gint line,
                            GObject * object,
                            GstDebugMessage * message)

Returns the string representation for the specified debug log message formatted in the same way as gst_debug_log_default (the default handler), without color. The purpose is to make it easy for custom log output handlers to get a log output that is identical to what the default handler would write out.

Parameters:

`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` ( [transfer: none][allow-none]) –

the object this message relates to, or NULL if none

`message` –

the actual message

Returns –
No description available

Since : 1.18

### Gst.prototype.debug_log_get_line

    function Gst.prototype.debug_log_get_line(category: Gst.DebugCategory, level: Gst.DebugLevel, file: String, function: String, line: Number, object: GObject.Object, message: Gst.DebugMessage): {
        // javascript wrapper for 'gst_debug_log_get_line'
    }

Returns the string representation for the specified debug log message formatted in the same way as Gst.prototype.debug_log_default (the default handler), without color. The purpose is to make it easy for custom log output handlers to get a log output that is identical to what the default handler would write out.

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message

`file` (String) –

the file that emitted the message, usually the FILE identifier

`function` (String) –

the function that emitted the message

`line` (Number) –

the line from that the message was emitted, usually LINE

`object` (GObject.Object) –

the object this message relates to, or null if none

`message` (Gst.DebugMessage) –

the actual message

Returns (String) –
No description available

Since : 1.18

### Gst.debug_log_get_line

    def Gst.debug_log_get_line (category, level, file, function, line, object, message):
        #python wrapper for 'gst_debug_log_get_line'

Returns the string representation for the specified debug log message formatted in the same way as Gst.debug_log_default (the default handler), without color. The purpose is to make it easy for custom log output handlers to get a log output that is identical to what the default handler would write out.

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message

`file` (str) –

the file that emitted the message, usually the FILE identifier

`function` (str) –

the function that emitted the message

`line` (int) –

the line from that the message was emitted, usually LINE

`object` (GObject.Object) –

the object this message relates to, or None if none

`message` (Gst.DebugMessage) –

the actual message

Returns (str) –
No description available

Since : 1.18

### gst_debug_log_id

    gst_debug_log_id (GstDebugCategory * category,
                      GstDebugLevel level,
                      const gchar * file,
                      const gchar * function,
                      gint line,
                      const gchar * id,
                      const gchar * format,
                      ... ...)

Logs the given message using the currently registered debugging handlers.

Parameters:

`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

`id` ( [transfer: none][allow-none]) –

the identifier of the object this message relates to, or NULL if none.

`format` –

a printf style format string

`...` –

optional arguments for the format

Since : 1.22

### gst_debug_log_id_literal

    gst_debug_log_id_literal (GstDebugCategory * category,
                              GstDebugLevel level,
                              const gchar * file,
                              const gchar * function,
                              gint line,
                              const gchar * id,
                              const gchar * message_string)

Logs the given message using the currently registered debugging handlers.

Parameters:

`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

`id` ( [transfer: none][allow-none]) –

the identifier of the object this message relates to or NULL if none

`message_string` –

a message string

Since : 1.22

### Gst.prototype.debug_log_id_literal

    function Gst.prototype.debug_log_id_literal(category: Gst.DebugCategory, level: Gst.DebugLevel, file: String, function: String, line: Number, id: String, message_string: String): {
        // javascript wrapper for 'gst_debug_log_id_literal'
    }

Logs the given message using the currently registered debugging handlers.

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message is in

`file` (String) –

the file that emitted the message, usually the FILE identifier

`function` (String) –

the function that emitted the message

`line` (Number) –

the line from that the message was emitted, usually LINE

`id` (String) –

the identifier of the object this message relates to or null if none

`message_string` (String) –

a message string

Since : 1.22

### Gst.debug_log_id_literal

    def Gst.debug_log_id_literal (category, level, file, function, line, id, message_string):
        #python wrapper for 'gst_debug_log_id_literal'

Logs the given message using the currently registered debugging handlers.

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message is in

`file` (str) –

the file that emitted the message, usually the FILE identifier

`function` (str) –

the function that emitted the message

`line` (int) –

the line from that the message was emitted, usually LINE

`id` (str) –

the identifier of the object this message relates to or None if none

`message_string` (str) –

a message string

Since : 1.22

### gst_debug_log_id_valist

    gst_debug_log_id_valist (GstDebugCategory * category,
                             GstDebugLevel level,
                             const gchar * file,
                             const gchar * function,
                             gint line,
                             const gchar * id,
                             const gchar * format,
                             va_list args)

Logs the given message using the currently registered debugging handlers.

Parameters:

`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

`id` ( [transfer: none][allow-none]) –

the identifier of the object this message relates to or NULL if none.

`format` –

a printf style format string

`args` –

optional arguments for the format

Since : 1.22

### gst_debug_log_literal

    gst_debug_log_literal (GstDebugCategory * category,
                           GstDebugLevel level,
                           const gchar * file,
                           const gchar * function,
                           gint line,
                           GObject * object,
                           const gchar * message_string)

Logs the given message using the currently registered debugging handlers.

Parameters:

`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` ( [transfer: none][allow-none]) –

the object this message relates to, or NULL if none

`message_string` –

a message string

Since : 1.20

### Gst.prototype.debug_log_literal

    function Gst.prototype.debug_log_literal(category: Gst.DebugCategory, level: Gst.DebugLevel, file: String, function: String, line: Number, object: GObject.Object, message_string: String): {
        // javascript wrapper for 'gst_debug_log_literal'
    }

Logs the given message using the currently registered debugging handlers.

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message is in

`file` (String) –

the file that emitted the message, usually the FILE identifier

`function` (String) –

the function that emitted the message

`line` (Number) –

the line from that the message was emitted, usually LINE

`object` (GObject.Object) –

the object this message relates to, or null if none

`message_string` (String) –

a message string

Since : 1.20

### Gst.debug_log_literal

    def Gst.debug_log_literal (category, level, file, function, line, object, message_string):
        #python wrapper for 'gst_debug_log_literal'

Logs the given message using the currently registered debugging handlers.

Parameters:

`category` (Gst.DebugCategory) –

category to log

`level` (Gst.DebugLevel) –

level of the message is in

`file` (str) –

the file that emitted the message, usually the FILE identifier

`function` (str) –

the function that emitted the message

`line` (int) –

the line from that the message was emitted, usually LINE

`object` (GObject.Object) –

the object this message relates to, or None if none

`message_string` (str) –

a message string

Since : 1.20

### gst_debug_log_valist

    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.

Parameters:

`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` ( [transfer: none][allow-none]) –

the object this message relates to, or NULL if none

`format` –

a printf style format string

`args` –

optional arguments for the format

### gst_debug_print_stack_trace

    gst_debug_print_stack_trace ()

If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed.

### Gst.prototype.debug_print_stack_trace

    function Gst.prototype.debug_print_stack_trace(): {
        // javascript wrapper for 'gst_debug_print_stack_trace'
    }

If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed.

### Gst.debug_print_stack_trace

    def Gst.debug_print_stack_trace ():
        #python wrapper for 'gst_debug_print_stack_trace'

If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed.

### gst_debug_remove_log_function

    guint
    gst_debug_remove_log_function (GstLogFunction func)

Removes all registered instances of the given logging functions.

Parameters:

`func` ( [scope call][allow-none]) –

the log function to remove, or NULL to remove the default log function

Returns –

How many instances of the function were removed

### Gst.prototype.debug_remove_log_function

    function Gst.prototype.debug_remove_log_function(func: Gst.LogFunction): {
        // javascript wrapper for 'gst_debug_remove_log_function'
    }

Removes all registered instances of the given logging functions.

Parameters:

`func` (Gst.LogFunction) –

the log function to remove, or null to remove the default log function

Returns (Number) –

How many instances of the function were removed

### Gst.debug_remove_log_function

    def Gst.debug_remove_log_function (func):
        #python wrapper for 'gst_debug_remove_log_function'

Removes all registered instances of the given logging functions.

Parameters:

`func` (Gst.LogFunction) –

the log function to remove, or None to remove the default log function

Returns (int) –

How many instances of the function were removed

### gst_debug_remove_log_function_by_data

    guint
    gst_debug_remove_log_function_by_data (gpointer data)

Removes all registered instances of log functions with the given user data.

Parameters:

`data` –

user data of the log function to remove

Returns –

How many instances of the function were removed

### Gst.prototype.debug_remove_log_function_by_data

    function Gst.prototype.debug_remove_log_function_by_data(data: Object): {
        // javascript wrapper for 'gst_debug_remove_log_function_by_data'
    }

Removes all registered instances of log functions with the given user data.

Parameters:

`data` (Object) –

user data of the log function to remove

Returns (Number) –

How many instances of the function were removed

### Gst.debug_remove_log_function_by_data

    def Gst.debug_remove_log_function_by_data (data):
        #python wrapper for 'gst_debug_remove_log_function_by_data'

Removes all registered instances of log functions with the given user data.

Parameters:

`data` (object) –

user data of the log function to remove

Returns (int) –

How many instances of the function were removed

### gst_debug_remove_ring_buffer_logger

    gst_debug_remove_ring_buffer_logger ()

Removes any previously added ring buffer logger with gst_debug_add_ring_buffer_logger.

Since : 1.14

### Gst.prototype.debug_remove_ring_buffer_logger

    function Gst.prototype.debug_remove_ring_buffer_logger(): {
        // javascript wrapper for 'gst_debug_remove_ring_buffer_logger'
    }

Removes any previously added ring buffer logger with Gst.prototype.debug_add_ring_buffer_logger.

Since : 1.14

### Gst.debug_remove_ring_buffer_logger

    def Gst.debug_remove_ring_buffer_logger ():
        #python wrapper for 'gst_debug_remove_ring_buffer_logger'

Removes any previously added ring buffer logger with Gst.debug_add_ring_buffer_logger.

Since : 1.14

### gst_debug_ring_buffer_logger_get_logs

    gchar **
    gst_debug_ring_buffer_logger_get_logs ()

Fetches the current logs per thread from the ring buffer logger. See gst_debug_add_ring_buffer_logger for details.

Returns ( [transfer: full][arrayzero-terminated=1]) –

NULL-terminated array of strings with the debug output per thread

Since : 1.14

### Gst.prototype.debug_ring_buffer_logger_get_logs

    function Gst.prototype.debug_ring_buffer_logger_get_logs(): {
        // javascript wrapper for 'gst_debug_ring_buffer_logger_get_logs'
    }

Fetches the current logs per thread from the ring buffer logger. See Gst.prototype.debug_add_ring_buffer_logger for details.

Returns ([ String ]) –

NULL-terminated array of strings with the debug output per thread

Since : 1.14

### Gst.debug_ring_buffer_logger_get_logs

    def Gst.debug_ring_buffer_logger_get_logs ():
        #python wrapper for 'gst_debug_ring_buffer_logger_get_logs'

Fetches the current logs per thread from the ring buffer logger. See Gst.debug_add_ring_buffer_logger for details.

Returns ([ str ]) –

NULL-terminated array of strings with the debug output per thread

Since : 1.14

### gst_debug_set_active

    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.

Parameters:

`active` –

Whether to use debugging output or not

### Gst.prototype.debug_set_active

    function Gst.prototype.debug_set_active(active: Number): {
        // javascript wrapper for 'gst_debug_set_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.

Parameters:

`active` (Number) –

Whether to use debugging output or not

### Gst.debug_set_active

    def Gst.debug_set_active (active):
        #python wrapper for 'gst_debug_set_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.

Parameters:

`active` (bool) –

Whether to use debugging output or not

### gst_debug_set_color_mode

    gst_debug_set_color_mode (GstDebugColorMode mode)

Changes the coloring mode for debug output.

This function may be called before gst_init.

Parameters:

`mode` –

The coloring mode for debug output. See GstDebugColorMode.

Since : 1.2

### Gst.prototype.debug_set_color_mode

    function Gst.prototype.debug_set_color_mode(mode: Gst.DebugColorMode): {
        // javascript wrapper for 'gst_debug_set_color_mode'
    }

Changes the coloring mode for debug output.

This function may be called before Gst.prototype.init.

Parameters:

`mode` (Gst.DebugColorMode) –

The coloring mode for debug output. See GstDebugColorMode.

Since : 1.2

### Gst.debug_set_color_mode

    def Gst.debug_set_color_mode (mode):
        #python wrapper for 'gst_debug_set_color_mode'

Changes the coloring mode for debug output.

This function may be called before Gst.init.

Parameters:

`mode` (Gst.DebugColorMode) –

The coloring mode for debug output. See GstDebugColorMode.

Since : 1.2

### gst_debug_set_color_mode_from_string

    gst_debug_set_color_mode_from_string (const gchar * mode)

Changes the coloring mode for debug output.

This function may be called before gst_init.

Parameters:

`mode` –

The coloring mode for debug output. One of the following: "on", "auto", "off", "disable", "unix".

Since : 1.2

### Gst.prototype.debug_set_color_mode_from_string

    function Gst.prototype.debug_set_color_mode_from_string(mode: String): {
        // javascript wrapper for 'gst_debug_set_color_mode_from_string'
    }

Changes the coloring mode for debug output.

This function may be called before Gst.prototype.init.

Parameters:

`mode` (String) –

The coloring mode for debug output. One of the following: "on", "auto", "off", "disable", "unix".

Since : 1.2

### Gst.debug_set_color_mode_from_string

    def Gst.debug_set_color_mode_from_string (mode):
        #python wrapper for 'gst_debug_set_color_mode_from_string'

Changes the coloring mode for debug output.

This function may be called before Gst.init.

Parameters:

`mode` (str) –

The coloring mode for debug output. One of the following: "on", "auto", "off", "disable", "unix".

Since : 1.2

### gst_debug_set_colored

    gst_debug_set_colored (gboolean colored)

Sets or unsets the use of coloured debugging output. Same as gst_debug_set_color_mode () with the argument being being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF.

This function may be called before gst_init.

Parameters:

`colored` –

Whether to use colored output or not

### Gst.prototype.debug_set_colored

    function Gst.prototype.debug_set_colored(colored: Number): {
        // javascript wrapper for 'gst_debug_set_colored'
    }

Sets or unsets the use of coloured debugging output. Same as gst_debug_set_color_mode () with the argument being being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF.

This function may be called before Gst.prototype.init.

Parameters:

`colored` (Number) –

Whether to use colored output or not

### Gst.debug_set_colored

    def Gst.debug_set_colored (colored):
        #python wrapper for 'gst_debug_set_colored'

Sets or unsets the use of coloured debugging output. Same as gst_debug_set_color_mode () with the argument being being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF.

This function may be called before Gst.init.

Parameters:

`colored` (bool) –

Whether to use colored output or not

### gst_debug_set_default_threshold

    gst_debug_set_default_threshold (GstDebugLevel level)

Sets the default threshold to the given level and updates all categories to use this threshold.

This function may be called before gst_init.

Parameters:

`level` –

level to set

### Gst.prototype.debug_set_default_threshold

    function Gst.prototype.debug_set_default_threshold(level: Gst.DebugLevel): {
        // javascript wrapper for 'gst_debug_set_default_threshold'
    }

Sets the default threshold to the given level and updates all categories to use this threshold.

This function may be called before Gst.prototype.init.

Parameters:

`level` (Gst.DebugLevel) –

level to set

### Gst.debug_set_default_threshold

    def Gst.debug_set_default_threshold (level):
        #python wrapper for 'gst_debug_set_default_threshold'

Sets the default threshold to the given level and updates all categories to use this threshold.

This function may be called before Gst.init.

Parameters:

`level` (Gst.DebugLevel) –

level to set

### gst_debug_set_threshold_for_name

    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.

Parameters:

`name` –

name of the categories to set

`level` –

level to set them to

### Gst.prototype.debug_set_threshold_for_name

    function Gst.prototype.debug_set_threshold_for_name(name: String, level: Gst.DebugLevel): {
        // javascript wrapper for 'gst_debug_set_threshold_for_name'
    }

Sets all categories which match the given glob style pattern to the given level.

Parameters:

`name` (String) –

name of the categories to set

`level` (Gst.DebugLevel) –

level to set them to

### Gst.debug_set_threshold_for_name

    def Gst.debug_set_threshold_for_name (name, level):
        #python wrapper for 'gst_debug_set_threshold_for_name'

Sets all categories which match the given glob style pattern to the given level.

Parameters:

`name` (str) –

name of the categories to set

`level` (Gst.DebugLevel) –

level to set them to

### gst_debug_set_threshold_from_string

    gst_debug_set_threshold_from_string (const gchar * list,
                                         gboolean reset)

Sets the debug logging wanted in the same form as with the GST_DEBUG environment variable. You can use wildcards such as `*`, but note that the order matters when you use wild cards, e.g. `foosrc:6,*src:3,*:2` sets everything to log level 2.

Parameters:

`list` –

comma-separated list of "category:level" pairs to be used as debug logging levels

`reset` –

TRUE to clear all previously-set debug levels before setting new thresholds FALSE if adding the threshold described by list to the one already set.

Since : 1.2

### Gst.prototype.debug_set_threshold_from_string

    function Gst.prototype.debug_set_threshold_from_string(list: String, reset: Number): {
        // javascript wrapper for 'gst_debug_set_threshold_from_string'
    }

Sets the debug logging wanted in the same form as with the GST_DEBUG environment variable. You can use wildcards such as `*`, but note that the order matters when you use wild cards, e.g. `foosrc:6,*src:3,*:2` sets everything to log level 2.

Parameters:

`list` (String) –

comma-separated list of "category:level" pairs to be used as debug logging levels

`reset` (Number) –

true to clear all previously-set debug levels before setting new thresholds false if adding the threshold described by list to the one already set.

Since : 1.2

### Gst.debug_set_threshold_from_string

    def Gst.debug_set_threshold_from_string (list, reset):
        #python wrapper for 'gst_debug_set_threshold_from_string'

Sets the debug logging wanted in the same form as with the GST_DEBUG environment variable. You can use wildcards such as `*`, but note that the order matters when you use wild cards, e.g. `foosrc:6,*src:3,*:2` sets everything to log level 2.

Parameters:

`list` (str) –

comma-separated list of "category:level" pairs to be used as debug logging levels

`reset` (bool) –

True to clear all previously-set debug levels before setting new thresholds False if adding the threshold described by list to the one already set.

Since : 1.2

### gst_debug_unset_threshold_for_name

    gst_debug_unset_threshold_for_name (const gchar * name)

Resets all categories with the given name back to the default level.

Parameters:

`name` –

name of the categories to set

### Gst.prototype.debug_unset_threshold_for_name

    function Gst.prototype.debug_unset_threshold_for_name(name: String): {
        // javascript wrapper for 'gst_debug_unset_threshold_for_name'
    }

Resets all categories with the given name back to the default level.

Parameters:

`name` (String) –

name of the categories to set

### Gst.debug_unset_threshold_for_name

    def Gst.debug_unset_threshold_for_name (name):
        #python wrapper for 'gst_debug_unset_threshold_for_name'

Resets all categories with the given name back to the default level.

Parameters:

`name` (str) –

name of the categories to set

### gst_info_strdup_printf

    gchar *
    gst_info_strdup_printf (const gchar * format,
                            ... ...)

Allocates, fills and returns a 0-terminated string from the printf style format string and corresponding arguments.

See gst_info_vasprintf for when this function is required.

Free with g_free.

Parameters:

`format` –

a printf style format string

`...` –

the printf arguments for format

Returns ( [nullable]) –

a newly allocated null terminated string or NULL on any error

Since : 1.8

### gst_info_strdup_vprintf

    gchar *
    gst_info_strdup_vprintf (const gchar * format,
                             va_list args)

Allocates, fills and returns a null terminated string from the printf style format string and args.

See gst_info_vasprintf for when this function is required.

Free with g_free.

Parameters:

`format` –

a printf style format string

`args` –

the va_list of printf arguments for format

Returns ( [nullable]) –

a newly allocated null terminated string or NULL on any error

Since : 1.8

### gst_info_vasprintf

    gint
    gst_info_vasprintf (gchar ** result,
                        const gchar * format,
                        va_list args)

Allocates and fills a string large enough (including the terminating null byte) to hold the specified printf style format and args.

This function deals with the GStreamer specific printf specifiers GST_PTR_FORMAT and GST_SEGMENT_FORMAT. If you do not have these specifiers in your format string, you do not need to use this function and can use alternatives such as g_vasprintf.

Free result with g_free.

Parameters:

`result` ( [out]) –

the resulting string

`format` –

a printf style format string

`args` –

the va_list of printf arguments for format

Returns –

the length of the string allocated into result or -1 on any error

Since : 1.8

### gst_print

    gst_print (const gchar * format,
               ... ...)

Outputs a formatted message via the GLib print handler. The default print handler simply outputs the message to stdout.

This function will not append a new-line character at the end, unlike gst_println which will.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_print in that it supports all the additional printf specifiers that are supported by GStreamer's debug logging system, such as GST_PTR_FORMAT and GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

`format` –

a printf style format string

`...` –

the printf arguments for format

Since : 1.12

### gst_printerr

    gst_printerr (const gchar * format,
                  ... ...)

Outputs a formatted message via the GLib error message handler. The default handler simply outputs the message to stderr.

This function will not append a new-line character at the end, unlike gst_printerrln which will.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_printerr in that it supports the additional printf specifiers that are supported by GStreamer's debug logging system, such as GST_PTR_FORMAT and GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

`format` –

a printf style format string

`...` –

the printf arguments for format

Since : 1.12

### gst_printerrln

    gst_printerrln (const gchar * format,
                    ... ...)

Outputs a formatted message via the GLib error message handler. The default handler simply outputs the message to stderr.

This function will append a new-line character at the end, unlike gst_printerr which will not.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_printerr in that it supports the additional printf specifiers that are supported by GStreamer's debug logging system, such as GST_PTR_FORMAT and GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

`format` –

a printf style format string

`...` –

the printf arguments for format

Since : 1.12

### gst_println

    gst_println (const gchar * format,
                 ... ...)

Outputs a formatted message via the GLib print handler. The default print handler simply outputs the message to stdout.

This function will append a new-line character at the end, unlike gst_print which will not.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_print in that it supports all the additional printf specifiers that are supported by GStreamer's debug logging system, such as GST_PTR_FORMAT and GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

`format` –

a printf style format string

`...` –

the printf arguments for format

Since : 1.12

## Function Macros

### GST_CAT_DEBUG

    #define GST_CAT_DEBUG(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)

Output an debugging message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_DEBUG_OBJECT

    #define GST_CAT_DEBUG_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)

Output an debugging message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_CAT_ERROR

    #define GST_CAT_ERROR(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)

Output an error message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_ERROR_OBJECT

    #define GST_CAT_ERROR_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_ERROR,   obj,  __VA_ARGS__)

Output an error message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_CAT_FIXME

    #define GST_CAT_FIXME(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME,   NULL, __VA_ARGS__)

Output an fixme message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_FIXME_OBJECT

    #define GST_CAT_FIXME_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_FIXME,   obj,  __VA_ARGS__)

Output a fixme message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_CAT_INFO

    #define GST_CAT_INFO(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    NULL, __VA_ARGS__)

Output an informational message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_INFO_OBJECT

    #define GST_CAT_INFO_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_INFO,    obj,  __VA_ARGS__)

Output an informational message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_CAT_LEVEL_LOG

    #define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{		\
      if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {						\
        gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__,	\
            (GObject *) (object), __VA_ARGS__);				\
      }									\
    }G_STMT_END

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.

There is no need to finish the end of the debug message with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`level` –

the severity of the message

`object` ( [allow-none]) –

the GObject the message belongs to or NULL if none

`...` –

A printf-style message to output

### GST_CAT_LEVEL_LOG_ID

    #define GST_CAT_LEVEL_LOG_ID(cat,level,id,...) G_STMT_START{		\
      if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {						\
        gst_debug_log_id ((cat), (level), __FILE__, GST_FUNCTION, __LINE__,	\
    		      (id), __VA_ARGS__);				\
      }									\
    }G_STMT_END

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.

There is no need to finish the end of the debug message with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`level` –

the severity of the message

`id` ( [transfer: none][allow-none]) –

the identifier of the object this message relates to, or NULL if none

`...` –

A printf-style message to output

Since : 1.22

### GST_CAT_LOG

    #define GST_CAT_LOG(cat,...)			GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     NULL, __VA_ARGS__)

Output an logging message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_LOG_OBJECT

    #define GST_CAT_LOG_OBJECT(cat,obj,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_LOG,     obj,  __VA_ARGS__)

Output an logging message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_CAT_MEMDUMP

    #define GST_CAT_MEMDUMP(cat,msg,data,length)             \
        __GST_CAT_MEMDUMP_LOG(cat,NULL,msg,data,length)

Output a hexdump of data in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`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

### GST_CAT_MEMDUMP_ID

    #define GST_CAT_MEMDUMP_ID(cat,id,msg,data,length)	\
        __GST_CAT_MEMDUMP_LOG_ID(cat,id,msg,data,length)

Output a hexdump of data relating to the given id in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`id` –

An identifier of the message provider

`msg` –

message string to log with the data

`data` –

pointer to the data to output

`length` –

length of the data to output

Since : 1.22

### GST_CAT_MEMDUMP_OBJECT

    #define GST_CAT_MEMDUMP_OBJECT(cat,obj,msg,data,length)  \
        __GST_CAT_MEMDUMP_LOG(cat,obj,msg,data,length)

Output a hexdump of data relating to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`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

### GST_CAT_TRACE

    #define GST_CAT_TRACE(cat,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE,   NULL, __VA_ARGS__)

Output a tracing message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_TRACE_OBJECT

    #define GST_CAT_TRACE_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_TRACE,   obj,  __VA_ARGS__)

Output a tracing message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_CAT_WARNING

    #define GST_CAT_WARNING(cat,...)		GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, NULL, __VA_ARGS__)

Output an warning message in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`...` –

printf-style message to output

### GST_CAT_WARNING_OBJECT

    #define GST_CAT_WARNING_OBJECT(cat,obj,...)	GST_CAT_LEVEL_LOG (cat, GST_LEVEL_WARNING, obj,  __VA_ARGS__)

Output a warning message belonging to the given object in the given category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`cat` –

category to use

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_DEBUG

    #define GST_DEBUG(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)

Output a debugging message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_DEBUG_CATEGORY

    #define GST_DEBUG_CATEGORY(cat) GstDebugCategory *cat = NULL

Defines a GstDebugCategory variable. This macro expands to nothing if debugging is disabled.

Parameters:

`cat` –

the category

### GST_DEBUG_CATEGORY_EXTERN

    #define GST_DEBUG_CATEGORY_EXTERN(cat) extern GstDebugCategory *cat

Declares a GstDebugCategory variable as extern. Use in header files. This macro expands to nothing if debugging is disabled.

Parameters:

`cat` –

the category

### GST_DEBUG_CATEGORY_GET

    #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

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.

     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");
     GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");

Parameters:

`cat` –

the category to initialize.

`name` –

log category name

### GST_DEBUG_CATEGORY_INIT

    #define GST_DEBUG_CATEGORY_INIT(cat,name,color,description) G_STMT_START{\
      if (cat == NULL)							\
        cat = _gst_debug_category_new (name,color,description);		\
    }G_STMT_END

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.

Parameters:

`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.

### GST_DEBUG_CATEGORY_STATIC

    #define GST_DEBUG_CATEGORY_STATIC(cat) static GstDebugCategory *cat = NULL

Defines a static GstDebugCategory variable. This macro expands to nothing if debugging is disabled.

Parameters:

`cat` –

the category

### GST_DEBUG_FUNCPTR

    #define GST_DEBUG_FUNCPTR(ptr) \
      (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)

Register a pointer to a function with its name, so it can later be used by GST_DEBUG_FUNCPTR_NAME.

Parameters:

`ptr` –

pointer to the function to register

Returns –

the value passed to ptr.

### GST_DEBUG_FUNCPTR_NAME

    #define GST_DEBUG_FUNCPTR_NAME(ptr) \
      _gst_debug_nameof_funcptr((GstDebugFuncPtr)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.

Parameters:

`ptr` –

address of the function of which to look up the name

### GST_DEBUG_ID

    #define GST_DEBUG_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   id,  __VA_ARGS__)

Output a debugging message for the given identifier in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_DEBUG_OBJECT

    #define GST_DEBUG_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)

Output a debugging message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_DEBUG_PAD_NAME

    #define GST_DEBUG_PAD_NAME(pad) \
      (pad != NULL) ?  \
      ((GST_OBJECT_PARENT(pad) != NULL) ? \
      GST_STR_NULL (GST_OBJECT_NAME (GST_OBJECT_PARENT(pad))) : \
      "''" ) : "''", \
      (pad != NULL) ? GST_STR_NULL (GST_OBJECT_NAME (pad)) : "''"

Evaluates to 2 strings, that describe the pad. Often used in debugging statements.

Parameters:

`pad` –

The pad to debug.

### GST_DEBUG_REGISTER_FUNCPTR

    #define GST_DEBUG_REGISTER_FUNCPTR(ptr) \
      _gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr)

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.

Parameters:

`ptr` –

pointer to the function to register

### GST_ERROR

    #define GST_ERROR(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   NULL, __VA_ARGS__)

Output an error message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_ERROR_ID

    #define GST_ERROR_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   id,  __VA_ARGS__)

Output an error message for the given identifier in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_ERROR_OBJECT

    #define GST_ERROR_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR,   obj,  __VA_ARGS__)

Output an error message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_FIXME

    #define GST_FIXME(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   NULL, __VA_ARGS__)

Output a fixme message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_FIXME_ID

    #define GST_FIXME_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   id,  __VA_ARGS__)

Output a fixme message for the given identifier in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_FIXME_OBJECT

    #define GST_FIXME_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_FIXME,   obj,  __VA_ARGS__)

Output a fixme message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_INFO

    #define GST_INFO(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    NULL, __VA_ARGS__)

Output an informational message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_INFO_ID

    #define GST_INFO_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_INFO,    id,  __VA_ARGS__)

Output an informational message for the given identifier the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_INFO_OBJECT

    #define GST_INFO_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO,    obj,  __VA_ARGS__)

Output an informational message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_LOG

    #define GST_LOG(...)			GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     NULL, __VA_ARGS__)

Output a logging message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_LOG_ID

    #define GST_LOG_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_LOG,     id,  __VA_ARGS__)

Output a logging message for the given identifier in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_LOG_OBJECT

    #define GST_LOG_OBJECT(obj,...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG,     obj,  __VA_ARGS__)

Output a logging message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_MEMDUMP

    #define GST_MEMDUMP(msg,data,length)                     \
        __GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,NULL,msg,data,length)

Output a hexdump of data.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`msg` –

message string to log with the data

`data` –

pointer to the data to output

`length` –

length of the data to output

### GST_MEMDUMP_ID

    #define GST_MEMDUMP_ID(id,msg,data,length)          \
        __GST_CAT_MEMDUMP_LOG_ID(GST_CAT_DEFAULT,id,msg,data,length)

Output a logging message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`msg` –

message string to log with the data

`data` –

pointer to the data to output

`length` –

length of the data to output

Since : 1.22

### GST_MEMDUMP_OBJECT

    #define GST_MEMDUMP_OBJECT(obj,msg,data,length)          \
        __GST_CAT_MEMDUMP_LOG(GST_CAT_DEFAULT,obj,msg,data,length)

Output a logging message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`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

### GST_STR_NULL

    #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.

Parameters:

`str` ( [allow-none]) –

The string to check.

### GST_TRACE

    #define GST_TRACE(...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE,   NULL, __VA_ARGS__)

Output a tracing message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_TRACE_ID

    #define GST_TRACE_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_TRACE,   id,  __VA_ARGS__)

Output a tracing message for the given identifier in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_TRACE_OBJECT

    #define GST_TRACE_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE,   obj,  __VA_ARGS__)

Output a tracing message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### GST_WARNING

    #define GST_WARNING(...)		GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)

Output a warning message in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`...` –

printf-style message to output

### GST_WARNING_ID

    #define GST_WARNING_ID(id,...)	GST_CAT_LEVEL_LOG_ID (GST_CAT_DEFAULT, GST_LEVEL_WARNING, id,  __VA_ARGS__)

Output a warning message for the given identifier in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`id` –

An identifier of the message provider

`...` –

printf-style message to output

Since : 1.22

### GST_WARNING_OBJECT

    #define GST_WARNING_OBJECT(obj,...)	GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  __VA_ARGS__)

Output a warning message belonging to the given object in the default category.

There is no need to finish the end of the message string with a newline character, a newline character will be added automatically.

Parameters:

`obj` –

the GObject the message belongs to

`...` –

printf-style message to output

### __GST_CAT_MEMDUMP_LOG

    #define __GST_CAT_MEMDUMP_LOG(cat,object,msg,data,length) G_STMT_START{       \
        if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= GST_LEVEL_MAX &&		      \
    		    GST_LEVEL_MEMDUMP <= _gst_debug_min)) {		      \
        _gst_debug_dump_mem ((cat), __FILE__, GST_FUNCTION, __LINE__,             \
            (GObject *) (object), (msg), (data), (length));                       \
      }                                                                           \
    }G_STMT_END

### __GST_CAT_MEMDUMP_LOG_ID

    #define __GST_CAT_MEMDUMP_LOG_ID(cat,id,msg,data,length) G_STMT_START{	\
        if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= GST_LEVEL_MAX &&		\
    		    GST_LEVEL_MEMDUMP <= _gst_debug_min)) {		\
          _gst_debug_dump_mem_id ((cat), __FILE__, GST_FUNCTION, __LINE__,	\
    			      (id), (msg), (data), (length));		\
        }									\
    }G_STMT_END

Only for private usage

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.

Since : 1.22

## Enumerations

### GstDebugColorFlags

These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output.

##### Members

`GST_DEBUG_FG_BLACK` (0) –

Use black as foreground color.

`GST_DEBUG_FG_RED` (1) –

Use red as foreground color.

`GST_DEBUG_FG_GREEN` (2) –

Use green as foreground color.

`GST_DEBUG_FG_YELLOW` (3) –

Use yellow as foreground color.

`GST_DEBUG_FG_BLUE` (4) –

Use blue as foreground color.

`GST_DEBUG_FG_MAGENTA` (5) –

Use magenta as foreground color.

`GST_DEBUG_FG_CYAN` (6) –

Use cyan as foreground color.

`GST_DEBUG_FG_WHITE` (7) –

Use white as foreground color.

`GST_DEBUG_BG_BLACK` (0) –

Use black as background color.

`GST_DEBUG_BG_RED` (16) –

Use red as background color.

`GST_DEBUG_BG_GREEN` (32) –

Use green as background color.

`GST_DEBUG_BG_YELLOW` (48) –

Use yellow as background color.

`GST_DEBUG_BG_BLUE` (64) –

Use blue as background color.

`GST_DEBUG_BG_MAGENTA` (80) –

Use magenta as background color.

`GST_DEBUG_BG_CYAN` (96) –

Use cyan as background color.

`GST_DEBUG_BG_WHITE` (112) –

Use white as background color.

`GST_DEBUG_BOLD` (256) –

Make the output bold.

`GST_DEBUG_UNDERLINE` (512) –

Underline the output.

### Gst.DebugColorFlags

These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output.

##### Members

`Gst.DebugColorFlags.FG_BLACK` (0) –

Use black as foreground color.

`Gst.DebugColorFlags.FG_RED` (1) –

Use red as foreground color.

`Gst.DebugColorFlags.FG_GREEN` (2) –

Use green as foreground color.

`Gst.DebugColorFlags.FG_YELLOW` (3) –

Use yellow as foreground color.

`Gst.DebugColorFlags.FG_BLUE` (4) –

Use blue as foreground color.

`Gst.DebugColorFlags.FG_MAGENTA` (5) –

Use magenta as foreground color.

`Gst.DebugColorFlags.FG_CYAN` (6) –

Use cyan as foreground color.

`Gst.DebugColorFlags.FG_WHITE` (7) –

Use white as foreground color.

`Gst.DebugColorFlags.BG_BLACK` (0) –

Use black as background color.

`Gst.DebugColorFlags.BG_RED` (16) –

Use red as background color.

`Gst.DebugColorFlags.BG_GREEN` (32) –

Use green as background color.

`Gst.DebugColorFlags.BG_YELLOW` (48) –

Use yellow as background color.

`Gst.DebugColorFlags.BG_BLUE` (64) –

Use blue as background color.

`Gst.DebugColorFlags.BG_MAGENTA` (80) –

Use magenta as background color.

`Gst.DebugColorFlags.BG_CYAN` (96) –

Use cyan as background color.

`Gst.DebugColorFlags.BG_WHITE` (112) –

Use white as background color.

`Gst.DebugColorFlags.BOLD` (256) –

Make the output bold.

`Gst.DebugColorFlags.UNDERLINE` (512) –

Underline the output.

### Gst.DebugColorFlags

These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output.

##### Members

`Gst.DebugColorFlags.FG_BLACK` (0) –

Use black as foreground color.

`Gst.DebugColorFlags.FG_RED` (1) –

Use red as foreground color.

`Gst.DebugColorFlags.FG_GREEN` (2) –

Use green as foreground color.

`Gst.DebugColorFlags.FG_YELLOW` (3) –

Use yellow as foreground color.

`Gst.DebugColorFlags.FG_BLUE` (4) –

Use blue as foreground color.

`Gst.DebugColorFlags.FG_MAGENTA` (5) –

Use magenta as foreground color.

`Gst.DebugColorFlags.FG_CYAN` (6) –

Use cyan as foreground color.

`Gst.DebugColorFlags.FG_WHITE` (7) –

Use white as foreground color.

`Gst.DebugColorFlags.BG_BLACK` (0) –

Use black as background color.

`Gst.DebugColorFlags.BG_RED` (16) –

Use red as background color.

`Gst.DebugColorFlags.BG_GREEN` (32) –

Use green as background color.

`Gst.DebugColorFlags.BG_YELLOW` (48) –

Use yellow as background color.

`Gst.DebugColorFlags.BG_BLUE` (64) –

Use blue as background color.

`Gst.DebugColorFlags.BG_MAGENTA` (80) –

Use magenta as background color.

`Gst.DebugColorFlags.BG_CYAN` (96) –

Use cyan as background color.

`Gst.DebugColorFlags.BG_WHITE` (112) –

Use white as background color.

`Gst.DebugColorFlags.BOLD` (256) –

Make the output bold.

`Gst.DebugColorFlags.UNDERLINE` (512) –

Underline the output.

### GstDebugColorMode

##### Members

`GST_DEBUG_COLOR_MODE_OFF` (0) –

Do not use colors in logs.

`GST_DEBUG_COLOR_MODE_ON` (1) –

Paint logs in a platform-specific way.

`GST_DEBUG_COLOR_MODE_UNIX` (2) –

Paint logs with UNIX terminal color codes no matter what platform GStreamer is running on.

### Gst.DebugColorMode

##### Members

`Gst.DebugColorMode.OFF` (0) –

Do not use colors in logs.

`Gst.DebugColorMode.ON` (1) –

Paint logs in a platform-specific way.

`Gst.DebugColorMode.UNIX` (2) –

Paint logs with UNIX terminal color codes no matter what platform GStreamer is running on.

### Gst.DebugColorMode

##### Members

`Gst.DebugColorMode.OFF` (0) –

Do not use colors in logs.

`Gst.DebugColorMode.ON` (1) –

Paint logs in a platform-specific way.

`Gst.DebugColorMode.UNIX` (2) –

Paint logs with UNIX terminal color codes no matter what platform GStreamer is running on.

### 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.

##### Members

`GST_LEVEL_NONE` (0) –

No debugging level specified or desired. Used to deactivate debugging output.

`GST_LEVEL_ERROR` (1) –

Error messages are to be used only when an error occurred 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_error.

`GST_LEVEL_WARNING` (2) –

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_FIXME` (3) –

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 of code when reading the debug log.

`GST_LEVEL_INFO` (4) –

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` (5) –

Debugging messages should be used when something common 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.

`GST_LEVEL_LOG` (6) –

Log messages are messages that are very common but might be useful to know. As a rule of thumb a pipeline that is running as expected should never output anything else but LOG messages whilst processing data. Use this log level to log recurring information in chain functions and loop functions, for example.

`GST_LEVEL_TRACE` (7) –

Tracing-related messages. Examples for this are referencing/dereferencing of objects.

`GST_LEVEL_MEMDUMP` (9) –

memory dump messages are used to log (small) chunks of data as memory dumps in the log. They will be displayed as hexdump with ASCII characters.

`GST_LEVEL_COUNT` (10) –

The number of defined debugging levels.

### Gst.DebugLevel

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.

##### Members

`Gst.DebugLevel.NONE` (0) –

No debugging level specified or desired. Used to deactivate debugging output.

`Gst.DebugLevel.ERROR` (1) –

Error messages are to be used only when an error occurred 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_error.

`Gst.DebugLevel.WARNING` (2) –

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.DebugLevel.FIXME` (3) –

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 of code when reading the debug log.

`Gst.DebugLevel.INFO` (4) –

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.DebugLevel.DEBUG` (5) –

Debugging messages should be used when something common 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.

`Gst.DebugLevel.LOG` (6) –

Log messages are messages that are very common but might be useful to know. As a rule of thumb a pipeline that is running as expected should never output anything else but LOG messages whilst processing data. Use this log level to log recurring information in chain functions and loop functions, for example.

`Gst.DebugLevel.TRACE` (7) –

Tracing-related messages. Examples for this are referencing/dereferencing of objects.

`Gst.DebugLevel.MEMDUMP` (9) –

memory dump messages are used to log (small) chunks of data as memory dumps in the log. They will be displayed as hexdump with ASCII characters.

`Gst.DebugLevel.COUNT` (10) –

The number of defined debugging levels.

### Gst.DebugLevel

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.

##### Members

`Gst.DebugLevel.NONE` (0) –

No debugging level specified or desired. Used to deactivate debugging output.

`Gst.DebugLevel.ERROR` (1) –

Error messages are to be used only when an error occurred 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_error.

`Gst.DebugLevel.WARNING` (2) –

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.DebugLevel.FIXME` (3) –

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 of code when reading the debug log.

`Gst.DebugLevel.INFO` (4) –

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.DebugLevel.DEBUG` (5) –

Debugging messages should be used when something common 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.

`Gst.DebugLevel.LOG` (6) –

Log messages are messages that are very common but might be useful to know. As a rule of thumb a pipeline that is running as expected should never output anything else but LOG messages whilst processing data. Use this log level to log recurring information in chain functions and loop functions, for example.

`Gst.DebugLevel.TRACE` (7) –

Tracing-related messages. Examples for this are referencing/dereferencing of objects.

`Gst.DebugLevel.MEMDUMP` (9) –

memory dump messages are used to log (small) chunks of data as memory dumps in the log. They will be displayed as hexdump with ASCII characters.

`Gst.DebugLevel.COUNT` (10) –

The number of defined debugging levels.

### GstStackTraceFlags

##### Members

`GST_STACK_TRACE_SHOW_NONE` (0) –

Try to retrieve the minimum information available, which may be none on some platforms (Since: 1.18)

`GST_STACK_TRACE_SHOW_FULL` (1) –

Try to retrieve as much information as possible, including source information when getting the stack trace

Since : 1.12

### Gst.StackTraceFlags

##### Members

`Gst.StackTraceFlags.NONE` (0) –

Try to retrieve the minimum information available, which may be none on some platforms (Since: 1.18)

`Gst.StackTraceFlags.FULL` (1) –

Try to retrieve as much information as possible, including source information when getting the stack trace

Since : 1.12

### Gst.StackTraceFlags

##### Members

`Gst.StackTraceFlags.NONE` (0) –

Try to retrieve the minimum information available, which may be none on some platforms (Since: 1.18)

`Gst.StackTraceFlags.FULL` (1) –

Try to retrieve as much information as possible, including source information when getting the stack trace

Since : 1.12

## Constants

### GST_DEBUG_BG_MASK

    #define GST_DEBUG_BG_MASK	(0x00F0)

### Gst.DEBUG_BG_MASK

### GST_DEBUG_FG_MASK

    #define GST_DEBUG_FG_MASK	(0x000F)

### Gst.DEBUG_FG_MASK

### GST_DEBUG_FORMAT_MASK

    #define GST_DEBUG_FORMAT_MASK	(0xFF00)

### Gst.DEBUG_FORMAT_MASK

### GST_FUNCTION

    #define GST_FUNCTION     ((const char*) (__func__))

This macro should evaluate to the name of the current function and be should be defined when configuring your project, as it is compiler dependent. If it is not defined, some default value is used. It is used to provide debugging output with the function name of the message.

Note that this is different from G_STRFUNC as we do not want the full function signature in C++ code.

### GST_LEVEL_DEFAULT

    #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.

### GST_LEVEL_MAX

    #define GST_LEVEL_MAX GST_LEVEL_COUNT

Defines the maximum debugging level to be enabled at compilation time. By default it is set such that all debugging statements will be enabled.

If you wish to compile GStreamer and plugins with only some debugging statements (Such as just warnings and errors), you can define it at compile time to the maximum debug level. Any debug statements above that level will be compiled out.

Since : 1.6

### GST_PTR_FORMAT

    #define GST_PTR_FORMAT     "p\aA"

printf format type used to debug GStreamer types. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf, gst_info_strdup_vprintf and gst_info_strdup_printf to pretty-print the following types: GstCaps, GstStructure, GstCapsFeatures, GstTagList, GstDateTime, GstBuffer, GstBufferList, GstMessage, GstEvent, GstQuery, GstContext, GstPad, GstObject. All GObject types will be printed as typename plus pointer, and everything else will simply be printed as pointer address.

This can only be used on types whose size is >= sizeof(gpointer).

### GST_SEGMENT_FORMAT

    #define GST_SEGMENT_FORMAT "p\aB"

printf format type used to debug GStreamer segments. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf, gst_info_strdup_vprintf and gst_info_strdup_printf to pretty-print GstSegment structures. This can only be used on pointers to GstSegment structures.

### GST_STIMEP_FORMAT

    #define GST_STIMEP_FORMAT "p\aS"

printf format type used to debug GStreamer signed time value pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf, gst_info_strdup_vprintf and gst_info_strdup_printf to pretty-print signed time (pointers to GstClockTimeDiff or gint64).

Since : 1.18

### GST_TIMEP_FORMAT

    #define GST_TIMEP_FORMAT "p\aT"

printf format type used to debug GStreamer ClockTime pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf, gst_info_strdup_vprintf and gst_info_strdup_printf to pretty-print GstClockTime pointers. This can only be used on pointers to GstClockTime values.

Since : 1.18

### _gst_debug_min

    #define _gst_debug_min GST_LEVEL_NONE

## Callbacks

### GstLogFunction

    (*GstLogFunction) (GstDebugCategory * category,
                       GstDebugLevel level,
                       const gchar * file,
                       const gchar * function,
                       gint line,
                       GObject * object,
                       GstDebugMessage * message,
                       gpointer user_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.

Parameters:

`category` –

a GstDebugCategory

`level` –

a GstDebugLevel

`file` –

file name

`function` –

function name

`line` –

line number

`object` –

a GObject

`message` –

the message

`user_data` –

user data for the log function

### Gst.LogFunction

    function Gst.LogFunction(category: Gst.DebugCategory, level: Gst.DebugLevel, file: String, function: String, line: Number, object: GObject.Object, message: Gst.DebugMessage, user_data: Object): {
        // javascript wrapper for 'GstLogFunction'
    }

Function prototype for a logging function that can be registered with Gst.prototype.debug_add_log_function. Use G_GNUC_NO_INSTRUMENT on that function.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory

`level` (Gst.DebugLevel) –

a Gst.DebugLevel

`file` (String) –

file name

`function` (String) –

function name

`line` (Number) –

line number

`object` (GObject.Object) –

a GObject.Object

`message` (Gst.DebugMessage) –

the message

`user_data` (Object) –

user data for the log function

### Gst.LogFunction

    def Gst.LogFunction (category, level, file, function, line, object, message, *user_data):
        #python wrapper for 'GstLogFunction'

Function prototype for a logging function that can be registered with Gst.debug_add_log_function. Use G_GNUC_NO_INSTRUMENT on that function.

Parameters:

`category` (Gst.DebugCategory) –

a Gst.DebugCategory

`level` (Gst.DebugLevel) –

a Gst.DebugLevel

`file` (str) –

file name

`function` (str) –

function name

`line` (int) –

line number

`object` (GObject.Object) –

a GObject.Object

`message` (Gst.DebugMessage) –

the message

`user_data` (variadic) –

user data for the log function

The results of the search are