:right-sidebar: True DeviceMonitor =================================================================== .. currentmodule:: gi.repository.Gst .. versionadded:: 1.4 .. class:: DeviceMonitor(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` :Constructors: :: DeviceMonitor(**properties) new() -> Gst.DeviceMonitor Constructors ------------ .. rst-class:: interim-class .. class:: DeviceMonitor :no-index: .. classmethod:: new() -> ~gi.repository.Gst.DeviceMonitor Create a new :obj:`~gi.repository.Gst.DeviceMonitor` .. versionadded:: 1.4 Methods ------- .. rst-class:: interim-class .. class:: DeviceMonitor :no-index: .. method:: add_filter(classes: str | None = None, caps: ~gi.repository.Gst.Caps | None = None) -> int Adds a filter for which :obj:`~gi.repository.Gst.Device` will be monitored, any device that matches all these classes and the :obj:`~gi.repository.Gst.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 :obj:`~gi.repository.Gst.Caps` supported by the device as returned by :func:`~gi.repository.Gst.Device.get_caps` are not intersected with caps filters added using this function. Filters must be added before the :obj:`~gi.repository.Gst.DeviceMonitor` is started. .. versionadded:: 1.4 :param classes: device classes to use as filter or :const:`None` for any class :param caps: the :obj:`~gi.repository.Gst.Caps` to filter or :const:`None` for ANY .. method:: get_bus() -> ~gi.repository.Gst.Bus Gets the :obj:`~gi.repository.Gst.Bus` of this :obj:`~gi.repository.Gst.DeviceMonitor` .. versionadded:: 1.4 .. method:: get_devices() -> list[~gi.repository.Gst.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. .. versionadded:: 1.4 .. method:: get_providers() -> list[str] Get a list of the currently selected device provider factories. This .. versionadded:: 1.6 .. method:: get_show_all_devices() -> bool Get if ``monitor`` is currently showing all devices, even those from hidden providers. .. versionadded:: 1.6 .. method:: remove_filter(filter_id: int) -> bool Removes a filter from the :obj:`~gi.repository.Gst.DeviceMonitor` using the id that was returned by :func:`~gi.repository.Gst.DeviceMonitor.add_filter`. .. versionadded:: 1.4 :param filter_id: the id of the filter .. method:: 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. .. versionadded:: 1.6 :param show_all: show all devices .. method:: start() -> bool Starts monitoring the devices, one this has succeeded, the :const:`~gi.repository.Gst.MessageType.DEVICE_ADDED` and :const:`~gi.repository.Gst.MessageType.DEVICE_REMOVED` messages will be emitted on the bus when the list of devices changes. .. versionadded:: 1.4 .. method:: stop() -> None Stops monitoring the devices. .. versionadded:: 1.4 Properties ---------- .. rst-class:: interim-class .. class:: DeviceMonitor :no-index: .. attribute:: props.show_all :type: bool Fields ------ .. rst-class:: interim-class .. class:: DeviceMonitor :no-index: .. attribute:: parent The parent :obj:`~gi.repository.Gst.Object` structure .. attribute:: priv