public class DeviceMonitor extends GstObject
See upstream documentation at https://gstreamer.freedesktop.org/data/doc/gstreamer/stable/gstreamer/html/gstreamer-GstDeviceMonitor.html
Applications should create a DeviceMonitor when they want to probe, list and
monitor devices of a specific type. The DeviceMonitor will create the
appropriate DeviceProvider objects and manage them. It will then post
messages on its Bus for devices that have been added and removed.
The device monitor will monitor all devices matching the filters that the application has set.
GstObject.HandleGObject.GCallback, GObject.GInterfaceNativeObject.Initializer, NativeObject.TypeProvider, NativeObject.TypeRegistration<T extends NativeObject>| Modifier and Type | Field and Description |
|---|---|
static String |
GTYPE_NAME |
| Constructor and Description |
|---|
DeviceMonitor() |
| Modifier and Type | Method and Description |
|---|---|
int |
addFilter(String classes,
Caps caps)
Adds a filter for which devices will be monitored, any device that
matches all these classes and the
Caps will be returned. |
Bus |
getBus()
Get the
Bus for this DeviceMonitor |
List<Device> |
getDevices()
Gets a list of devices from all of the relevant monitors.
|
boolean |
removeFilter(int filterId)
Remove a filter from the DeviceMonitor using the id that was returned
from
addFilter(java.lang.String, org.freedesktop.gstreamer.Caps) |
boolean |
start()
Starts monitoring the devices, once 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.
|
void |
stop()
Stop monitoring devices.
|
addControlBinding, getAsString, getControlBinding, getName, getParent, hasActiveControlBindings, removeControlBinding, setAsString, setControlBindingDisabled, setControlBindingsDisabled, setName, suggestNextSync, syncValues, toStringaddCallback, connect, connect, disconnect, dispose, emit, emit, get, getPropertyDefaultValue, getPropertyMaximumValue, getPropertyMinimumValue, getRefCount, getTypeName, invalidate, listPropertyNames, removeCallback, setclose, disown, equals, getPointer, getRawPointer, hashCodepublic static final String GTYPE_NAME
public int addFilter(String classes, Caps caps)
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 GstCaps 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 GstDeviceMonitor is started.
classes - device classes to use as filter or NULL for any class.caps - the GstCaps to filter or NULL for ANY.public boolean removeFilter(int filterId)
addFilter(java.lang.String, org.freedesktop.gstreamer.Caps)filterId - of filter to removepublic boolean start()
public void stop()
Copyright © 2021 gstreamer-java. All rights reserved.