DeviceMonitor

Added in version 1.4.

class DeviceMonitor(**properties: Any)

Superclasses: Object, InitiallyUnowned, Object

Constructors:

DeviceMonitor(**properties)
new() -> Gst.DeviceMonitor

Constructors

class DeviceMonitor
classmethod new() DeviceMonitor

Create a new DeviceMonitor

Added in version 1.4.

Methods

class DeviceMonitor
add_filter(classes: str | None = None, caps: Caps | None = None) int

Adds a filter for which Device will be monitored, any device that matches all these classes and the Caps will be returned.

If this function is called multiple times to add more filters, each will be matched independently. That is, adding more filters will not further restrict what devices are matched.

The Caps supported by the device as returned by get_caps() are not intersected with caps filters added using this function.

Filters must be added before the DeviceMonitor is started.

Added in version 1.4.

Parameters:
  • classes – device classes to use as filter or None for any class

  • caps – the Caps to filter or None for ANY

get_bus() Bus

Gets the Bus of this DeviceMonitor

Added in version 1.4.

get_devices() list[Device] | None

Gets a list of devices from all of the relevant monitors. This may actually probe the hardware if the monitor is not currently started.

Added in version 1.4.

get_providers() list[str]

Get a list of the currently selected device provider factories.

This

Added in version 1.6.

get_show_all_devices() bool

Get if monitor is currently showing all devices, even those from hidden providers.

Added in version 1.6.

remove_filter(filter_id: int) bool

Removes a filter from the DeviceMonitor using the id that was returned by add_filter().

Added in version 1.4.

Parameters:

filter_id – the id of the filter

set_show_all_devices(show_all: bool) None

Set if all devices should be visible, even those devices from hidden providers. Setting show_all to true might show some devices multiple times.

Added in version 1.6.

Parameters:

show_all – show all devices

start() bool

Starts monitoring the devices, one this has succeeded, the DEVICE_ADDED and DEVICE_REMOVED messages will be emitted on the bus when the list of devices changes.

Added in version 1.4.

stop() None

Stops monitoring the devices.

Added in version 1.4.

Properties

class DeviceMonitor
props.show_all: bool

Fields

class DeviceMonitor
parent

The parent Object structure

priv