Class DeviceProviderFactory

All Implemented Interfaces:
Proxy

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

GstDeviceProviderFactory is used to create instances of device providers. A GstDeviceProviderfactory can be added to a GstPlugin as it is also a GstPluginFeature.

Use the gst_device_provider_factory_find() and gst_device_provider_factory_get() functions to create device provider instances or use gst_device_provider_factory_get_by_name() as a convenient shortcut.

Since:
1.4
  • Constructor Details

    • DeviceProviderFactory

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

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

    • getType

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

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

      protected DeviceProviderFactory 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
    • find

      public static @Nullable DeviceProviderFactory find(String name)
      Search for an device provider factory of the given name. Refs the returned device provider factory; caller is responsible for unreffing.
      Parameters:
      name - name of factory to find
      Returns:
      GstDeviceProviderFactory if found, null otherwise
      Since:
      1.4
    • getByName

      public static @Nullable DeviceProvider getByName(String factoryname)
      Returns the device provider of the type defined by the given device provider factory.
      Parameters:
      factoryname - a named factory to instantiate
      Returns:
      a GstDeviceProvider or null if unable to create device provider
      Since:
      1.4
    • listGetDeviceProviders

      public static List<DeviceProviderFactory> listGetDeviceProviders(Rank minrank)
      Get a list of factories with a rank greater or equal to minrank. The list of factories is returned by decreasing rank.
      Parameters:
      minrank - Minimum rank
      Returns:
      a GList of GstDeviceProviderFactory device providers. Use gst_plugin_feature_list_free() after usage.
      Since:
      1.4
    • get

      public @Nullable DeviceProvider get()
      Returns the device provider of the type defined by the given device providerfactory.
      Returns:
      the GstDeviceProvider or null if the device provider couldn't be created
      Since:
      1.4
    • getDeviceProviderType

      public Type getDeviceProviderType()
      Get the GType for device providers managed by this factory. The type can only be retrieved if the device provider factory is loaded, which can be assured with gst_plugin_feature_load().
      Returns:
      the GType for device providers managed by this factory.
      Since:
      1.4
    • getMetadata

      public @Nullable String getMetadata(String key)
      Get the metadata on this DeviceProviderFactory with key.
      Parameters:
      key - a key
      Returns:
      the metadata with key on this DeviceProviderFactory or null when there was no metadata with the given key.
      Since:
      1.4
    • getMetadataKeys

      public @Nullable String @Nullable [] getMetadataKeys()
      Get the available keys for the metadata on factory.
      Returns:
      a null-terminated array of key strings, or null when there is no metadata. Free with g_strfreev() when no longer needed.
      Since:
      1.4
    • hasClasses

      public boolean hasClasses(@Nullable String classes)
      Check if this DeviceProviderFactory matches all of the given classes
      Parameters:
      classes - a "/" separate list of classes to match, only match if all classes are matched
      Returns:
      true if this DeviceProviderFactory matches or if classes is null.
      Since:
      1.4
    • hasClassesv

      public boolean hasClassesv(@Nullable String @Nullable [] classes)
      Check if this DeviceProviderFactory matches all of the given classes
      Parameters:
      classes - a null terminated array of classes to match, only match if all classes are matched
      Returns:
      true if this DeviceProviderFactory matches.
      Since:
      1.4
    • builder

      A DeviceProviderFactory.Builder object constructs a DeviceProviderFactory with the specified properties. Use the various set...() methods to set properties, and finish construction with DeviceProviderFactory.Builder.build().
      Returns:
      the builder object