Klasse DeviceProvider

Alle implementierten Schnittstellen:
PointerInterface

public class DeviceProvider extends PropertyHolder
A #GstDeviceProvider subclass is provided by a plugin that handles devices
if there is a way to programmatically list connected devices. It can also
optionally provide updates to the list of connected devices.

Each #GstDeviceProvider subclass is a singleton, a plugin should
normally provide a single subclass for all devices.

Applications would normally use a #GstDeviceMonitor to monitor devices
from all relevant providers.

https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html

  • Felddetails Linksymbol

  • Konstruktordetails Linksymbol

  • Methodendetails Linksymbol

    • getClassHandler Linksymbol

      public static ClassHandler getClassHandler()
    • canMonitor Linksymbol

      public boolean canMonitor()
      Gibt zurück:
    • deviceAdd Linksymbol

      public void deviceAdd(@Nonnull Device device)
      Posts a message on the provider's #GstBus to inform applications that
      a new device has been added.

      This is for use by subclasses.

      @device's reference count will be incremented, and any floating reference
      will be removed (see gst_object_ref_sink()).
      Parameter:
      device - a #GstDevice that has been added
    • deviceChanged Linksymbol

      public void deviceChanged(@Nonnull Device device, @Nonnull Device changed_device)
      This function is used when @changed_device was modified into its new form
      @device. This will post a `DEVICE_CHANGED` message on the bus to let
      the application know that the device was modified. #GstDevice is immutable
      for MT. safety purposes so this is an "atomic" way of letting the application
      know when a device was modified.
      Parameter:
      device - the new version of @changed_device
      changed_device - the old version of the device that has been updated
    • deviceRemove Linksymbol

      public void deviceRemove(@Nonnull Device device)
      Posts a message on the provider's #GstBus to inform applications that
      a device has been removed.

      This is for use by subclasses.
      Parameter:
      device - a #GstDevice that has been removed
    • getBus Linksymbol

      public Bus getBus()
      Gets the #GstBus of this #GstDeviceProvider
      Gibt zurück:
      a #GstBus
    • getDevices Linksymbol

      public List getDevices()
      Gets a list of devices that this provider understands. This may actually
      probe the hardware if the provider is not currently started.

      If the provider has been started, this will returned the same #GstDevice
      objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages.
      Gibt zurück:
      a #GList of #GstDevice
    • getFactory Linksymbol

      public DeviceProviderFactory getFactory()
      Retrieves the factory that was used to create this device provider.
      Gibt zurück:
      the #GstDeviceProviderFactory used for creating this device provider. no refcounting is needed.
    • getMetadata Linksymbol

      public Str getMetadata(@Nonnull Str key)
      Get metadata with @key in @provider.
      Parameter:
      key - the key to get
      Gibt zurück:
      the metadata for @key.
    • getMetadata Linksymbol

      public Str getMetadata(String key)
      Get metadata with @key in @provider.
      Parameter:
      key - the key to get
      Gibt zurück:
      the metadata for @key.
    • hideProvider Linksymbol

      public void hideProvider(@Nonnull Str name)
      Make @provider hide the devices from the factory with @name.

      This function is used when @provider will also provide the devices reported
      by provider factory @name. A monitor should stop monitoring the
      device provider with @name to avoid duplicate devices.
      Parameter:
      name - a provider factory name
    • hideProvider Linksymbol

      public void hideProvider(String name)
      Make @provider hide the devices from the factory with @name.

      This function is used when @provider will also provide the devices reported
      by provider factory @name. A monitor should stop monitoring the
      device provider with @name to avoid duplicate devices.
      Parameter:
      name - a provider factory name
    • isStarted Linksymbol

      public boolean isStarted()
      This function can be used to know if the @provider was successfully started.
      Gibt zurück:
    • start Linksymbol

      public boolean start()
      Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED
      and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus
      when devices are added or removed from the system.

      Since the #GstDeviceProvider is a singleton,
      gst_device_provider_start() may already have been called by another
      user of the object, gst_device_provider_stop() needs to be called the same
      number of times.

      After this function has been called, gst_device_provider_get_devices() will
      return the same objects that have been received from the
      #GST_MESSAGE_DEVICE_ADDED messages and will no longer probe.
      Gibt zurück:
      %TRUE if the device providering could be started
    • stop Linksymbol

      public void stop()
      Decreases the use-count by one. If the use count reaches zero, this
      #GstDeviceProvider will stop providering the devices. This needs to be
      called the same number of times that gst_device_provider_start() was called.
    • unhideProvider Linksymbol

      public void unhideProvider(@Nonnull Str name)
      Make @provider unhide the devices from factory @name.

      This function is used when @provider will no longer provide the devices
      reported by provider factory @name. A monitor should start
      monitoring the devices from provider factory @name in order to see
      all devices again.
      Parameter:
      name - a provider factory name
    • unhideProvider Linksymbol

      public void unhideProvider(String name)
      Make @provider unhide the devices from factory @name.

      This function is used when @provider will no longer provide the devices
      reported by provider factory @name. A monitor should start
      monitoring the devices from provider factory @name in order to see
      all devices again.
      Parameter:
      name - a provider factory name
    • onProviderHidden Linksymbol

      public SignalHandler onProviderHidden(DeviceProvider.OnProviderHidden signal)
      Connect to signal "provider-hidden".
      See DeviceProvider.OnProviderHidden.onProviderHidden(ch.bailu.gtk.type.Str) for signal description.
      Field SIGNAL_ON_PROVIDER_HIDDEN contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onProviderUnhidden Linksymbol

      public SignalHandler onProviderUnhidden(DeviceProvider.OnProviderUnhidden signal)
      Connect to signal "provider-unhidden".
      See DeviceProvider.OnProviderUnhidden.onProviderUnhidden(ch.bailu.gtk.type.Str) for signal description.
      Field SIGNAL_ON_PROVIDER_UNHIDDEN contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • register Linksymbol

      public static boolean register(@Nullable Plugin plugin, @Nonnull Str name, int rank, long type)
      Create a new device providerfactory capable of instantiating objects of the
      @type and add the factory to @plugin.
      Parameter:
      plugin - #GstPlugin to register the device provider with, or %NULL for a static device provider.
      name - name of device providers of this type
      rank - rank of device provider (higher rank means more importance when autoplugging)
      type - GType of device provider to register
      Gibt zurück:
      %TRUE, if the registering succeeded, %FALSE on error
    • getTypeID Linksymbol

      public static long getTypeID()
    • getParentTypeID Linksymbol

      public static long getParentTypeID()
    • getTypeSize Linksymbol

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize Linksymbol

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize Linksymbol

      public static int getInstanceSize()