DeviceMonitor.addFilter

uint addFilter(string classes = null, gst.caps.Caps caps = null)

Adds a filter for which #GstDevice will be monitored, any device that matches all these classes and the #GstCaps 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 #GstCaps supported by the device as returned by [gst.device.Device.getCaps] are not intersected with caps filters added using this function.

Filters must be added before the #GstDeviceMonitor is started.

Parameters

classesdevice classes to use as filter or null for any class
capsthe #GstCaps to filter or null for ANY

Returns

The id of the new filter or 0 if no provider matched the filter's

classes.