Class: Gst::DeviceMonitor

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

Opaque device monitor class structure.

Instance Method Summary collapse

Methods inherited from Object

#add_control_binding, check_uniqueness, #control_bindings_disabled=, #control_rate, #control_rate=, default_deep_notify, #default_error, #get_control_binding, #get_g_value_array, #get_value, #get_value_array, #has_active_control_bindings, #has_ancestor, #has_as_ancestor, #has_as_parent, #name, #name=, #parent, #parent=, #path_string, #ref, ref_sink, #remove_control_binding, replace, #set_control_binding_disabled, #suggest_next_sync, #sync_values, #unparent, #unref

Constructor Details

#initializeGst::DeviceMonitor

Create a new Gst::DeviceMonitor

Instance Method Details

#add_filter(classes, caps) ⇒ Integer

Adds a filter for which Gst::Device will be monitored, any device that matches all these classes and the 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 Gst::Caps supported by the device as returned by gst_device_get_caps() are not intersected with caps filters added using this function.

Filters must be added before the Gst::DeviceMonitor is started.

Parameters:

  • classes (String)

    device classes to use as filter or nil for any class

  • caps (Gst::Caps)

    the Gst::Caps to filter or nil for ANY

Returns:

  • (Integer)

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

#busGst::Bus

Gets the Gst::Bus of this #GstDeviceMonitor

Returns:

#devicesGLib::List<Gst::Device>

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

Returns:

  • (GLib::List<Gst::Device>)

    a #GList of Gst::Device

#providersArray<String>

Get a list of the currently selected device provider factories.

This

Returns:

  • (Array<String>)

    A list of device provider factory names that are currently being monitored by monitor or nil when nothing is being monitored.

#remove_filter(filter_id) ⇒ Boolean

Removes a filter from the Gst::DeviceMonitor using the id that was returned by gst_device_monitor_add_filter().

Parameters:

  • filter_id (Integer)

    the id of the filter

Returns:

  • (Boolean)

    true of the filter id was valid, false otherwise

#show_all=(show_all) ⇒ Boolean

Parameters:

  • show_all (Boolean)

Returns:

  • (Boolean)

    show-all

  • (Boolean)

    show-all

#show_all?Boolean

Returns show-all.

Returns:

  • (Boolean)

    show-all

#show_all_devicesBoolean

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

Returns:

  • (Boolean)

    true when all devices will be shown.

#show_all_devices=(show_all) ⇒ nil

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

Parameters:

  • show_all (Boolean)

    show all devices

Returns:

  • (nil)

#startBoolean

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

Returns:

  • (Boolean)

    true if the device monitoring could be started, i.e. at least a single device provider was started successfully.

#stopnil

Stops monitoring the devices.

Returns:

  • (nil)