Class DebugCategory

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.DebugCategory
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class DebugCategory extends ProxyInstance
This is the struct that describes the categories. Once initialized with GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore.
  • Constructor Details

    • DebugCategory

      public DebugCategory(MemorySegment address)
      Create a DebugCategory proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • DebugCategory

      public DebugCategory(Arena arena)
      Allocate a new DebugCategory.
      Parameters:
      arena - to control the memory allocation scope
    • DebugCategory

      public DebugCategory()
      Allocate a new DebugCategory. The memory is allocated with Arena.ofAuto().
    • DebugCategory

      public DebugCategory(int threshold, int color, String name, String description, Arena arena)
      Allocate a new DebugCategory with the fields set to the provided values.
      Parameters:
      threshold - value for the field threshold
      color - value for the field color
      name - value for the field name
      description - value for the field description
      arena - to control the memory allocation scope
    • DebugCategory

      public DebugCategory(int threshold, int color, String name, String description)
      Allocate a new DebugCategory with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      threshold - value for the field threshold
      color - value for the field color
      name - value for the field name
      description - value for the field description
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readThreshold

      public int readThreshold()
      Read the value of the field threshold.
      Returns:
      The value of the field threshold
    • writeThreshold

      public void writeThreshold(int threshold)
      Write a value in the field threshold.
      Parameters:
      threshold - The new value for the field threshold
    • readColor

      public int readColor()
      Read the value of the field color.
      Returns:
      The value of the field color
    • writeColor

      public void writeColor(int color)
      Write a value in the field color.
      Parameters:
      color - The new value for the field color
    • readName

      public String readName()
      Read the value of the field name.
      Returns:
      The value of the field name
    • writeName

      public void writeName(String name, Arena _arena)
      Write a value in the field name.
      Parameters:
      name - The new value for the field name
      _arena - to control the memory allocation scope
    • readDescription

      public String readDescription()
      Read the value of the field description.
      Returns:
      The value of the field description
    • writeDescription

      public void writeDescription(String description, Arena _arena)
      Write a value in the field description.
      Parameters:
      description - The new value for the field description
      _arena - to control the memory allocation scope
    • free

      @Deprecated public void 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

      public String getDescription()
      Returns the description of a debug category.
      Returns:
      the description of the category.
    • getName

      public String getName()
      Returns the name of a debug category.
      Returns:
      the name of the category.
    • getThreshold

      public DebugLevel getThreshold()
      Returns the threshold of a GstDebugCategory.
      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

      public void setThreshold(DebugLevel 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:
      level - the GstDebugLevel threshold to set.