Package org.freedesktop.gstreamer.gst
Class DebugCategory
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.DebugCategory
- All Implemented Interfaces:
Proxy
This is the struct that describes the categories. Once initialized with
GST_DEBUG_CATEGORY_INIT
, its values can't be changed anymore.-
Constructor Summary
ConstructorDescriptionAllocate a new DebugCategory.DebugCategory
(int threshold, int color, String name, String description) Allocate a new DebugCategory with the fields set to the provided values.DebugCategory
(int threshold, int color, String name, String description, Arena arena) Allocate a new DebugCategory with the fields set to the provided values.DebugCategory
(Arena arena) Allocate a new DebugCategory.DebugCategory
(MemorySegment address) Create a DebugCategory proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
free()
Deprecated.This function can easily cause memory corruption, don't use it.int
getColor()
Returns the color of a debug category used when printing output in this category.Returns the description of a debug category.static MemoryLayout
The memory layout of the native struct.getName()
Returns the name of a debug category.Returns the threshold of aGstDebugCategory
.int
Read the value of the fieldcolor
.Read the value of the fielddescription
.readName()
Read the value of the fieldname
.int
Read the value of the fieldthreshold
.void
Resets the threshold of the category to the default level.void
setThreshold
(DebugLevel level) Sets the threshold of the category to the given level.void
writeColor
(int color) Write a value in the fieldcolor
.void
writeDescription
(String description, Arena _arena) Write a value in the fielddescription
.void
Write a value in the fieldname
.void
writeThreshold
(int threshold) Write a value in the fieldthreshold
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
DebugCategory
Create a DebugCategory proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
DebugCategory
Allocate a new DebugCategory.- Parameters:
arena
- to control the memory allocation scope
-
DebugCategory
public DebugCategory()Allocate a new DebugCategory. The memory is allocated withArena.ofAuto()
. -
DebugCategory
Allocate a new DebugCategory with the fields set to the provided values.- Parameters:
threshold
- value for the fieldthreshold
color
- value for the fieldcolor
name
- value for the fieldname
description
- value for the fielddescription
arena
- to control the memory allocation scope
-
DebugCategory
Allocate a new DebugCategory with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
threshold
- value for the fieldthreshold
color
- value for the fieldcolor
name
- value for the fieldname
description
- value for the fielddescription
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readThreshold
public int readThreshold()Read the value of the fieldthreshold
.- Returns:
- The value of the field
threshold
-
writeThreshold
public void writeThreshold(int threshold) Write a value in the fieldthreshold
.- Parameters:
threshold
- The new value for the fieldthreshold
-
readColor
public int readColor()Read the value of the fieldcolor
.- Returns:
- The value of the field
color
-
writeColor
public void writeColor(int color) Write a value in the fieldcolor
.- Parameters:
color
- The new value for the fieldcolor
-
readName
-
writeName
-
readDescription
Read the value of the fielddescription
.- Returns:
- The value of the field
description
-
writeDescription
-
free
Deprecated.This function can easily cause memory corruption, don't use it.Removes and frees the category and all associated resources. -
getColor
public int getColor()Returns the color of a debug category used when printing output in this category.- Returns:
- the color of the category.
-
getDescription
Returns the description of a debug category.- Returns:
- the description of the category.
-
getName
-
getThreshold
Returns the threshold of aGstDebugCategory
.- Returns:
- the
GstDebugLevel
that is used as threshold.
-
resetThreshold
public void resetThreshold()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(). -
setThreshold
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:
level
- theGstDebugLevel
threshold to set.
-