|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.PropertyChangeNotifier
net.java.sip.communicator.impl.neomedia.device.DeviceConfiguration
public class DeviceConfiguration
This class aims to provide a simple configuration interface for JMF. It retrieves stored configuration when started or listens to ConfigurationEvent for property changes and configures the JMF accordingly.
| Field Summary | |
|---|---|
static String |
AUDIO_CAPTURE_DEVICE
The name of the DeviceConfiguration property which
represents the device used by DeviceConfiguration for audio
capture. |
static String |
AUDIO_NONE
When audio is disabled the selected audio system is with name None. |
static String |
AUDIO_NOTIFY_DEVICE
The name of the DeviceConfiguration property which
represents the device used by DeviceConfiguration for audio
notify. |
static String |
AUDIO_PLAYBACK_DEVICE
The name of the DeviceConfiguration property which
represents the device used by DeviceConfiguration for audio
playback. |
static String |
AUDIO_SYSTEM_JAVASOUND
JavaSound sound system. |
static String |
AUDIO_SYSTEM_PORTAUDIO
PortAudio sound system. |
static int |
DEFAULT_FRAME_RATE
The default frame rate, -1 unlimited. |
static int |
DEFAULT_VIDEO_HEIGHT
The default video height. |
static int |
DEFAULT_VIDEO_MAX_BANDWIDTH
The default value for video maximum bandwidth. |
static int |
DEFAULT_VIDEO_WIDTH
The default video width. |
(package private) static String |
PROP_AUDIO_DENOISE
The name of the boolean property which determines whether noise suppression is to be performed for captured audio. |
(package private) static String |
PROP_AUDIO_ECHOCANCEL
The name of the boolean property which determines whether echo cancellation is to be performed for captured audio. |
(package private) static 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 Dimension[] |
SUPPORTED_RESOLUTIONS
The currently supported resolutions we will show as option and user can select. |
static String |
VIDEO_CAPTURE_DEVICE
The name of the DeviceConfiguration property which
represents the device used by DeviceConfiguration for video
capture. |
| Constructor Summary | |
|---|---|
DeviceConfiguration()
|
|
| Method Summary | |
|---|---|
static void |
addAudioSystem(String audioSystemName)
Adds audio system. |
void |
deviceChanged()
Callback when PortAudio device changed. |
javax.media.CaptureDeviceInfo |
getAudioCaptureDevice()
Returns a device that we could use for audio capture. |
javax.media.CaptureDeviceInfo |
getAudioNotifyDevice()
|
javax.media.CaptureDeviceInfo |
getAudioPlaybackDevice()
|
String |
getAudioSystem()
The current selected audio system. |
javax.media.CaptureDeviceInfo[] |
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) |
javax.media.CaptureDeviceInfo[] |
getAvailableAudioCaptureDevices(String soundSystem)
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) |
javax.media.CaptureDeviceInfo[] |
getAvailableAudioPlaybackDevices()
Lists all the playback devices. |
String[] |
getAvailableAudioSystems()
Return the installed Audio Systems. |
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. |
javax.media.CaptureDeviceInfo |
getVideoCaptureDevice(MediaUseCase useCase)
Returns a device that we could use for video capture. |
int |
getVideoMaxBandwidth()
Gets the maximum allowed video bandwidth. |
Dimension |
getVideoSize()
Gets the video size set on this DeviceConfiguration. |
void |
initialize()
Initializes capture devices. |
boolean |
isAudioCaptureSupported()
Enable or disable Audio stream transmission. |
boolean |
isDenoise()
Gets the indicator which determines whether noise suppression is to be performed for captured audio |
boolean |
isEchoCancel()
Gets the indicator which determines whether echo cancellation is to be performed for captured audio. |
boolean |
isVideoCaptureSupported()
Enable or disable Video stream transmission. |
void |
propertyChange(PropertyChangeEvent evt)
Listens for changes in the configuration and if such happen we reset local values so next time we will update from the configuration. |
void |
reinitializeVideo()
Reinitialize video capture devices. |
void |
setAudioCaptureDevice(javax.media.CaptureDeviceInfo device,
boolean save)
Sets the device which is to be used by this DeviceConfiguration for audio capture. |
void |
setAudioNotifyDevice(javax.media.CaptureDeviceInfo audioNotifyDevice,
boolean save)
Sets the notify device. |
void |
setAudioPlaybackDevice(javax.media.CaptureDeviceInfo audioPlaybackDevice,
boolean save)
Set audio playback device. |
void |
setAudioSystem(String name,
javax.media.CaptureDeviceInfo captureDevice,
boolean save)
Changes the current audio system. |
void |
setDenoise(boolean denoise)
Sets the indicator which determines whether noise suppression is to be performed for captured audio. |
void |
setEchoCancel(boolean echoCancel)
Sets the indicator which determines whether echo cancellation is to be performed for captured audio. |
void |
setFrameRate(int frameRate)
Sets and stores the frame rate. |
void |
setVideoCaptureDevice(javax.media.CaptureDeviceInfo device,
boolean save)
Sets the device which is to be used by this DeviceConfiguration for video capture. |
void |
setVideoMaxBandwidth(int videoMaxBandwidth)
Sets and stores the maximum allowed video bandwidth. |
void |
setVideoSize(Dimension videoSize)
Sets and stores the video size. |
| Methods inherited from class net.java.sip.communicator.util.PropertyChangeNotifier |
|---|
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String AUDIO_CAPTURE_DEVICE
DeviceConfiguration property which
represents the device used by DeviceConfiguration for audio
capture.
public static final String AUDIO_PLAYBACK_DEVICE
DeviceConfiguration property which
represents the device used by DeviceConfiguration for audio
playback.
public static final String AUDIO_NOTIFY_DEVICE
DeviceConfiguration property which
represents the device used by DeviceConfiguration for audio
notify.
public static final String VIDEO_CAPTURE_DEVICE
DeviceConfiguration property which
represents the device used by DeviceConfiguration for video
capture.
public static final String AUDIO_NONE
public static final String AUDIO_SYSTEM_JAVASOUND
public static final String AUDIO_SYSTEM_PORTAUDIO
static final String PROP_AUDIO_ECHOCANCEL
static final String PROP_AUDIO_ECHOCANCEL_FILTER_LENGTH_IN_MILLIS
static final String PROP_AUDIO_DENOISE
public static final int DEFAULT_FRAME_RATE
public static final int DEFAULT_VIDEO_MAX_BANDWIDTH
public static final int DEFAULT_VIDEO_WIDTH
public static final int DEFAULT_VIDEO_HEIGHT
public static final Dimension[] SUPPORTED_RESOLUTIONS
| Constructor Detail |
|---|
public DeviceConfiguration()
| Method Detail |
|---|
public void initialize()
public void reinitializeVideo()
public javax.media.CaptureDeviceInfo getAudioCaptureDevice()
public javax.media.CaptureDeviceInfo[] getAvailableAudioCaptureDevices()
DeviceConfiguration, amongst which is
getAudioCaptureDevice() and represent acceptable values
for setAudioCaptureDevice(CaptureDeviceInfo, boolean)
CaptureDeviceInfo describing the audio
capture devices available through this
DeviceConfigurationpublic javax.media.CaptureDeviceInfo[] getAvailableAudioCaptureDevices(String soundSystem)
DeviceConfiguration, amongst which is
getAudioCaptureDevice() and represent acceptable values
for setAudioCaptureDevice(CaptureDeviceInfo, boolean)
soundSystem - filter capture devices only from the supplied audio system.
CaptureDeviceInfo describing the audio
capture devices available through this
DeviceConfigurationpublic javax.media.CaptureDeviceInfo[] getAvailableAudioPlaybackDevices()
public javax.media.CaptureDeviceInfo[] getAvailableVideoCaptureDevices(MediaUseCase useCase)
DeviceConfiguration, amongst which is
getVideoCaptureDevice(MediaUseCase) and represent acceptable
values for setVideoCaptureDevice(CaptureDeviceInfo, boolean)
useCase - extract video capture devices that correspond to this
MediaUseCase
CaptureDeviceInfo describing the video
capture devices available through this
DeviceConfigurationpublic javax.media.CaptureDeviceInfo getVideoCaptureDevice(MediaUseCase useCase)
useCase - MediaUseCase that will determined device
we will use
public void setVideoCaptureDevice(javax.media.CaptureDeviceInfo device,
boolean save)
DeviceConfiguration for video capture.
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 setAudioCaptureDevice(javax.media.CaptureDeviceInfo device,
boolean save)
DeviceConfiguration for audio capture.
device - a CaptureDeviceInfo describing the device to
be used by this DeviceConfiguration for audio
capturesave - whether we will save this option or not.public boolean isAudioCaptureSupported()
public boolean isVideoCaptureSupported()
public String[] getAvailableAudioSystems()
public static void addAudioSystem(String audioSystemName)
audioSystemName - the name of the audio system.public String getAudioSystem()
public void setAudioSystem(String name,
javax.media.CaptureDeviceInfo captureDevice,
boolean save)
name - the name of the audio system.captureDevice - the selected capture device, if is null we will
choose a default one. Param used when first time initing and
extracting config.save - whether we will save this new option or not.public javax.media.CaptureDeviceInfo getAudioPlaybackDevice()
public javax.media.CaptureDeviceInfo getAudioNotifyDevice()
public void setAudioPlaybackDevice(javax.media.CaptureDeviceInfo audioPlaybackDevice,
boolean save)
audioPlaybackDevice - the audioPlaybackDevice to set.save - whether we will save this option or not.
public void setAudioNotifyDevice(javax.media.CaptureDeviceInfo audioNotifyDevice,
boolean save)
audioNotifyDevice - the audioNotifyDevice to setsave - whether we will save this option or not.public void setEchoCancel(boolean echoCancel)
echoCancel - true if echo cancellation is to be performed
for captured audio; otherwise, falsepublic void setDenoise(boolean denoise)
denoise - true if noise suppression is to be performed for
captured audio; otherwise, falsepublic boolean isEchoCancel()
public long getEchoCancelFilterLengthInMillis()
public boolean isDenoise()
public int getVideoMaxBandwidth()
DEFAULT_VIDEO_MAX_BANDWIDTH.public void setVideoMaxBandwidth(int videoMaxBandwidth)
videoMaxBandwidth - the maximum allowed video bandwidthpublic int getFrameRate()
DEFAULT_FRAME_RATEpublic void setFrameRate(int frameRate)
frameRate - the frame rate to be set on this
DeviceConfigurationpublic Dimension getVideoSize()
public void setVideoSize(Dimension videoSize)
videoSize - the video size to be set on this
DeviceConfigurationpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerevt - the property change eventpublic void deviceChanged()
deviceChanged in interface PortAudioDeviceChangedCallback
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||