public class DeviceConfiguration extends PropertyChangeNotifier implements java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUDIO_CAPTURE_DEVICE
The name of the DeviceConfiguration property which represents
the device used by DeviceConfiguration for audio capture.
|
static java.lang.String |
AUDIO_NOTIFY_DEVICE
The name of the DeviceConfiguration property which represents
the device used by DeviceConfiguration for audio notify.
|
static java.lang.String |
AUDIO_PLAYBACK_DEVICE
The name of the DeviceConfiguration property which represents
the device used by DeviceConfiguration for audio playback.
|
static boolean |
DEFAULT_AUDIO_DENOISE
The default value to be used for the
#PROP_AUDIO_DENOISE property
when it does not have a value. |
static boolean |
DEFAULT_AUDIO_ECHOCANCEL
The default value to be used for the
#PROP_AUDIO_ECHOCANCEL
property when it does not have a value. |
static long |
DEFAULT_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS
The default value to be used for the
PROP_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS property when it
does not have a value. |
static int |
DEFAULT_VIDEO_BITRATE
The default value for video codec bitrate.
|
static int |
DEFAULT_VIDEO_FRAMERATE
The default frame rate, -1 unlimited.
|
static int |
DEFAULT_VIDEO_HEIGHT
The default video height.
|
static int |
DEFAULT_VIDEO_RTP_PACING_THRESHOLD
The default value for video maximum bandwidth.
|
static int |
DEFAULT_VIDEO_WIDTH
The default video width.
|
(package private) static java.lang.String |
PROP_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS
The name of the long property which determines the filter length
in milliseconds to be used by the echo cancellation implementation.
|
static java.lang.String |
PROP_AUDIO_SYSTEM |
static java.lang.String |
PROP_AUDIO_SYSTEM_DEVICES |
static java.lang.String |
PROP_VIDEO_RTP_PACING_THRESHOLD
The property we use to store the settings for maximum allowed video
bandwidth (used to normalize RTP traffic, and not in codec configuration)
|
static java.awt.Dimension[] |
SUPPORTED_RESOLUTIONS
The currently supported resolutions we will show as option
and user can select.
|
static java.lang.String |
VIDEO_CAPTURE_DEVICE
The name of the DeviceConfiguration property which
represents the device used by DeviceConfiguration for video
capture.
|
Constructor and Description |
---|
DeviceConfiguration()
Initializes a new DeviceConfiguration instance.
|
Modifier and Type | Method and Description |
---|---|
CaptureDeviceInfo2 |
getAudioCaptureDevice()
Returns a device that we could use for audio capture.
|
javax.media.CaptureDeviceInfo |
getAudioNotifyDevice() |
AudioSystem |
getAudioSystem() |
java.util.List<CaptureDeviceInfo2> |
getAvailableAudioCaptureDevices()
Gets the list of audio capture devices which are available through this
DeviceConfiguration, amongst which is
getAudioCaptureDevice() and represent acceptable values
for #setAudioCaptureDevice(CaptureDeviceInfo, boolean) |
AudioSystem[] |
getAvailableAudioSystems()
Returns a list of available AudioSystems.
|
java.util.List<javax.media.CaptureDeviceInfo> |
getAvailableVideoCaptureDevices(MediaUseCase useCase)
Gets the list of video capture devices which are available through this
DeviceConfiguration, amongst which is
getVideoCaptureDevice(MediaUseCase) and represent acceptable
values for setVideoCaptureDevice(CaptureDeviceInfo, boolean) |
long |
getEchoCancelFilterLengthInMillis()
Get the echo cancellation filter length (in milliseconds).
|
int |
getFrameRate()
Gets the frame rate set on this DeviceConfiguration.
|
int |
getVideoBitrate()
Gets the video bitrate.
|
javax.media.CaptureDeviceInfo |
getVideoCaptureDevice(MediaUseCase useCase)
Returns a device that we could use for video capture.
|
int |
getVideoRTPPacingThreshold()
Gets the maximum allowed video bandwidth.
|
java.awt.Dimension |
getVideoSize()
Gets the video size set on this DeviceConfiguration.
|
void |
propertyChange(java.beans.PropertyChangeEvent ev)
Notifies this PropertyChangeListener about
PropertyChangeEvents fired by, for example, the
ConfigurationService and the DeviceSystems which
support reinitialization/reloading.
|
void |
setAudioSystem(AudioSystem audioSystem,
boolean save) |
void |
setFrameRate(int frameRate)
Sets and stores the frame rate.
|
void |
setVideoBitrate(int videoBitrate)
Sets and stores the video bitrate.
|
void |
setVideoCaptureDevice(javax.media.CaptureDeviceInfo device,
boolean save)
Sets the device which is to be used by this
DeviceConfiguration for video capture.
|
void |
setVideoRTPPacingThreshold(int videoMaxBandwidth)
Sets and stores the maximum allowed video bandwidth.
|
void |
setVideoSize(java.awt.Dimension videoSize)
Sets and stores the video size.
|
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener
public static final java.lang.String AUDIO_CAPTURE_DEVICE
public static final java.lang.String AUDIO_NOTIFY_DEVICE
public static final java.lang.String AUDIO_PLAYBACK_DEVICE
public static final boolean DEFAULT_AUDIO_DENOISE
#PROP_AUDIO_DENOISE
property
when it does not have a value.public static final boolean DEFAULT_AUDIO_ECHOCANCEL
#PROP_AUDIO_ECHOCANCEL
property when it does not have a value.public static final long DEFAULT_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS
PROP_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS
property when it
does not have a value. The recommended filter length is approximately the
third of the room reverberation time. For example, in a small room,
reverberation time is in the order of 300 ms, so a filter length of 100
ms is a good choice (800 samples at 8000 Hz sampling rate).public static final int DEFAULT_VIDEO_BITRATE
public static final int DEFAULT_VIDEO_FRAMERATE
public static final int DEFAULT_VIDEO_HEIGHT
public static final int DEFAULT_VIDEO_RTP_PACING_THRESHOLD
public static final int DEFAULT_VIDEO_WIDTH
static final java.lang.String PROP_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS
public static final java.lang.String PROP_AUDIO_SYSTEM
public static final java.lang.String PROP_AUDIO_SYSTEM_DEVICES
public static final java.lang.String PROP_VIDEO_RTP_PACING_THRESHOLD
public static final java.awt.Dimension[] SUPPORTED_RESOLUTIONS
public static final java.lang.String VIDEO_CAPTURE_DEVICE
public DeviceConfiguration()
public CaptureDeviceInfo2 getAudioCaptureDevice()
public javax.media.CaptureDeviceInfo getAudioNotifyDevice()
public AudioSystem getAudioSystem()
public java.util.List<CaptureDeviceInfo2> getAvailableAudioCaptureDevices()
getAudioCaptureDevice()
and represent acceptable values
for #setAudioCaptureDevice(CaptureDeviceInfo, boolean)
public AudioSystem[] getAvailableAudioSystems()
public java.util.List<javax.media.CaptureDeviceInfo> getAvailableVideoCaptureDevices(MediaUseCase useCase)
getVideoCaptureDevice(MediaUseCase)
and represent acceptable
values for setVideoCaptureDevice(CaptureDeviceInfo, boolean)
useCase
- extract video capture devices that correspond to this
MediaUseCasepublic long getEchoCancelFilterLengthInMillis()
public int getFrameRate()
DEFAULT_VIDEO_FRAMERATE
public int getVideoBitrate()
DEFAULT_VIDEO_BITRATE
.public javax.media.CaptureDeviceInfo getVideoCaptureDevice(MediaUseCase useCase)
useCase
- MediaUseCase that will determined device
we will usepublic int getVideoRTPPacingThreshold()
DEFAULT_VIDEO_RTP_PACING_THRESHOLD
.public java.awt.Dimension getVideoSize()
public void propertyChange(java.beans.PropertyChangeEvent ev)
propertyChange
in interface java.beans.PropertyChangeListener
ev
- the PropertyChangeEvent to notify this
PropertyChangeListener about and which describes the source and
other specifics of the notificationpublic void setAudioSystem(AudioSystem audioSystem, boolean save)
public void setFrameRate(int frameRate)
frameRate
- the frame rate to be set on this
DeviceConfigurationpublic void setVideoBitrate(int videoBitrate)
videoBitrate
- the video codec bitratepublic void setVideoCaptureDevice(javax.media.CaptureDeviceInfo device, boolean save)
device
- a CaptureDeviceInfo describing device to be
used by this DeviceConfiguration for video
capture.save
- whether we will save this option or not.public void setVideoRTPPacingThreshold(int videoMaxBandwidth)
videoMaxBandwidth
- the maximum allowed video bandwidthpublic void setVideoSize(java.awt.Dimension videoSize)
videoSize
- the video size to be set on this
DeviceConfiguration
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.