On this page:
create-element
get-caps
get-device-class
get-display-name
has-classes?
3.7.1 device-monitor%
device-monitor%
get-bus
add-filter
remove-filter
get-devices
device-monitor%-new
6.12

class

device% : class?

  superclass: gobject%

A GStreamer Device represents a hardware device that can serve as a source or a sink. Each device contains metadata on the device, such as the caps it handles as well as its class: a string representation that states what the device does. It can also create elements that can be used in a GStreamer pipeline.

method

(send a-device create-element [name])  (is-a?/c element%)

  name : (or/c string? #f) = #f
Create an element with all of the required parameters to use a-device. The element will be named name or, if #f, a unique name will be generated.

method

(send a-device get-caps)  caps?

Get the caps supported by a-device.

method

(send a-device get-device-class)  string?

Gets the class of a-device; A "/" separated list.

method

(send a-device get-display-name)  string?

Get the user-friendly name of this a-device.

method

(send a-device has-classes? classes)  boolean?

  classes : string?
Returns #t if a-device matches all of the given classes, #f otherwise.

class

device-monitor% : class?

  superclass: gobject%

A device monitor monitors hardware devices. They post messages on their bus when new devices are available and have been removed, and can get a list of devices.

method

(send a-device-monitor get-bus)  (is-a?/c bus%)

Gets the bus for a-device-monitor where messages about device states are posted.

method

(send a-device-monitor add-filter classes    
  caps)  exact-integer?
  classes : (or/c string? #f)
  caps : (or/c caps? #f)
Adds a filter for a device to be monitored. Devices that match classes and caps will be probed by a-device-monitor. If classes is #f any device class will be matched. Similarly, if caps is #f, any media type will be matched. This will return the id of the filter, or 0 if no device is available to match this filter.

method

(send a-device-monitor remove-filter filter-id)  boolean?

  filter-id : exact-integer?
Removes a filter from a-device-monitor using a filter-id that was returned by add-filter. Returns #t if the filter-id was valid, #f otherwise.

method

(send a-device-monitor get-devices)

  (listof (is-a?/c device%))
Gets a list of devices from a-device-monitor that match any of its filters.

Create a new device monitor.