DeviceProviderFactory

Added in version 1.4.

class DeviceProviderFactory(**properties: Any)

Superclasses: PluginFeature, Object, InitiallyUnowned, Object

DeviceProviderFactory is used to create instances of device providers. A GstDeviceProviderfactory can be added to a Plugin as it is also a PluginFeature.

Use the find() and get() functions to create device provider instances or use get_by_name() as a convenient shortcut.

Methods

class DeviceProviderFactory
find(name: str) DeviceProviderFactory | None

Search for an device provider factory of the given name. Refs the returned device provider factory; caller is responsible for unreffing.

Added in version 1.4.

Parameters:

name – name of factory to find

get() DeviceProvider | None

Returns the device provider of the type defined by the given device providerfactory.

Added in version 1.4.

get_by_name(factoryname: str) DeviceProvider | None

Returns the device provider of the type defined by the given device provider factory.

Added in version 1.4.

Parameters:

factoryname – a named factory to instantiate

get_device_provider_type() type

Get the Type 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 load().

Added in version 1.4.

get_metadata(key: str) str | None

Get the metadata on factory with key.

Added in version 1.4.

Parameters:

key – a key

get_metadata_keys() list[str] | None

Get the available keys for the metadata on factory.

Added in version 1.4.

has_classes(classes: str | None = None) bool

Check if factory matches all of the given classes

Added in version 1.4.

Parameters:

classes – a “/” separate list of classes to match, only match if all classes are matched

has_classesv(classes: Sequence[str] | None = None) bool

Check if factory matches all of the given classes

Added in version 1.4.

Parameters:

classes – a None terminated array of classes to match, only match if all classes are matched

list_get_device_providers(minrank: Rank) list[DeviceProviderFactory]

Get a list of factories with a rank greater or equal to minrank. The list of factories is returned by decreasing rank.

Added in version 1.4.

Parameters:

minrank – Minimum rank