Package org.jitsi.impl.neomedia.device
Class Devices
- java.lang.Object
-
- org.jitsi.impl.neomedia.device.Devices
-
- Direct Known Subclasses:
CaptureDevices,PlaybackDevices
public abstract class Devices extends Object
Manages the list of active (currently plugged-in) capture/notify/playback devices and manages user preferences between all known devices (previously and actually plugged-in).- Author:
- Vincent Lucas, Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description Devices(AudioSystem audioSystem)Initializes the device list management.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CaptureDeviceInfo2getDevice(javax.media.MediaLocator locator)Gets a CapatureDeviceInfo2 which is known to this instance and is identified by a specific MediaLocator.List<CaptureDeviceInfo2>getDevices()Returns the list of the CaptureDeviceInfo2s which are active/plugged-in.protected abstract StringgetPropDevice()Returns the property of the capture devices.CaptureDeviceInfo2getSelectedDevice(List<CaptureDeviceInfo2> activeDevices)Gets the selected active device.voidsetDevice(CaptureDeviceInfo2 device, boolean save)Selects the active device.voidsetDevices(List<CaptureDeviceInfo2> devices)Sets the list of CaptureDeviceInfo2s which are active/plugged-in.
-
-
-
Constructor Detail
-
Devices
public Devices(AudioSystem audioSystem)
Initializes the device list management.- Parameters:
audioSystem- The audio system managing this device list.
-
-
Method Detail
-
getDevice
public CaptureDeviceInfo2 getDevice(javax.media.MediaLocator locator)
Gets a CapatureDeviceInfo2 which is known to this instance and is identified by a specific MediaLocator.- Parameters:
locator- the MediaLocator of the CaptureDeviceInfo2 to be returned- Returns:
- a CaptureDeviceInfo2 which is known to this instance and is identified by the specified locator
-
getDevices
public List<CaptureDeviceInfo2> getDevices()
Returns the list of the CaptureDeviceInfo2s which are active/plugged-in.- Returns:
- the list of the CaptureDeviceInfo2s which are active/plugged-in
-
getPropDevice
protected abstract String getPropDevice()
Returns the property of the capture devices.- Returns:
- The property of the capture devices.
-
getSelectedDevice
public CaptureDeviceInfo2 getSelectedDevice(List<CaptureDeviceInfo2> activeDevices)
Gets the selected active device.- Parameters:
activeDevices- the list of the active devices- Returns:
- the selected active device
-
setDevice
public void setDevice(CaptureDeviceInfo2 device, boolean save)
Selects the active device.- Parameters:
device- the selected active devicesave- true to save the choice in the configuration; false, otherwise
-
setDevices
public void setDevices(List<CaptureDeviceInfo2> devices)
Sets the list of CaptureDeviceInfo2s which are active/plugged-in.- Parameters:
devices- the list of CaptureDeviceInfo2s which are active/plugged-in
-
-