Class TracerRecord

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class TracerRecord extends GstObject
Tracing modules will create instances of this class to announce the data they will log and create a log formatter.
Since:
1.8
  • Constructor Details

    • TracerRecord

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

      public TracerRecord(String name, String firstfield, Object... varargs)

      Create a new tracer record. The record instance can be used to efficiently log entries using gst_tracer_record_log(). null terminator required after the last argument.

      The name without the ".class" suffix will be used for the log records. There must be fields for each value that gets logged where the field name is the value name. The field must be a GstStructure describing the value. The sub structure must contain a field called 'type' of G_TYPE_GTYPE that contains the GType of the value. The resulting GstTracerRecord will take ownership of the field structures.

      The way to deal with optional values is to log an additional boolean before the optional field, that if true signals that the optional field is valid and false signals that the optional field should be ignored. One must still log a placeholder value for the optional field though. Please also note, that pointer type values must not be NULL - the underlying serialisation can not handle that right now.

      Please note that this is still under discussion and subject to change.

      Parameters:
      name - name of new record, must end on ".class".
      firstfield - name of first field to set
      varargs - additional arguments
      Since:
      1.8
    • TracerRecord

      public TracerRecord()
      Create a new TracerRecord.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the TracerRecord class.
      Returns:
      the GType
    • getMemoryLayout

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

      protected TracerRecord asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GstObject
      Returns:
      the instance as if it were its parent type
    • log

      public void log(Object... varargs)

      Serialzes the trace event into the log.

      Right now this is using the gstreamer debug log with the level TRACE (7) and the category "GST_TRACER".

      Please note that this is still under discussion and subject to change.

      Parameters:
      varargs - the args as described in the spec-
      Since:
      1.8
    • builder

      public static TracerRecord.Builder<? extends TracerRecord.Builder> builder()
      A TracerRecord.Builder object constructs a TracerRecord with the specified properties. Use the various set...() methods to set properties, and finish construction with TracerRecord.Builder.build().
      Returns:
      the builder object