Package org.freedesktop.gstreamer.gst
Class DebugCategory
java.lang.Object
org.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
ConstructorsConstructorDescriptionAllocate 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 TypeMethodDescriptionvoidfree()Deprecated.This function can easily cause memory corruption, don't use it.intgetColor()Returns the color of a debug category used when printing output in this category.Returns the description of a debug category.static MemoryLayoutThe memory layout of the native struct.getName()Returns the name of a debug category.Returns the threshold of aGstDebugCategory.intRead the value of the fieldcolor.Read the value of the fielddescription.readName()Read the value of the fieldname.intRead the value of the fieldthreshold.voidResets the threshold of the category to the default level.voidsetThreshold(DebugLevel level) Sets the threshold of the category to the given level.voidwriteColor(int color) Write a value in the fieldcolor.voidwriteDescription(String description, Arena _arena) Write a value in the fielddescription.voidWrite a value in the fieldname.voidwriteThreshold(int threshold) Write a value in the fieldthreshold.Methods inherited from class org.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 fieldthresholdcolor- value for the fieldcolorname- value for the fieldnamedescription- value for the fielddescriptionarena- 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 fieldthresholdcolor- value for the fieldcolorname- value for the fieldnamedescription- 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
GstDebugLevelthat 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- theGstDebugLevelthreshold to set.
-