Class DynamicTypeFactory

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class DynamicTypeFactory extends PluginFeature

GstDynamicTypeFactory is used to represent a type that can be automatically loaded the first time it is used. For example, a non-standard type for use in caps fields.

In general, applications and plugins don't need to use the factory beyond registering the type in a plugin init function. Once that is done, the type is stored in the registry, and ready as soon as the registry is loaded.

Registering a type for dynamic loading


static gboolean
plugin_init (GstPlugin * plugin)
{
  return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD);
}
Since:
1.12
  • Constructor Details

    • DynamicTypeFactory

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

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

    • getType

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

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

      protected DynamicTypeFactory 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 PluginFeature
      Returns:
      the instance as if it were its parent type
    • load

      public static Type load(String factoryname)
    • builder

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