diff options
3 files changed, 44 insertions, 26 deletions
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties index 0e41386..2dc82fe 100644 --- a/resources/languages/resources.properties +++ b/resources/languages/resources.properties @@ -1100,7 +1100,7 @@ impl.packetlogging.PACKET_LOGGING_CONFIG=Packet Logging impl.packetlogging.ENABLE_DISABLE=Enable packet logging
impl.packetlogging.PACKET_LOGGING_RTP=RTP
impl.packetlogging.PACKET_LOGGING_RTP_DESCRIPTION=(stores 1 packet out of every 5000)
-impl.packetlogging.PACKET_LOGGING_ICE4J=Ice4J
+impl.packetlogging.PACKET_LOGGING_ICE4J=ice4j.org
impl.packetlogging.PACKET_LOGGING_DESCRIPTION=<html>Logs debug packets of various protocols in the <br>log folder using pcap format (tcpdump/wireshark).</html>
impl.packetlogging.PACKET_LOGGING_FILE_COUNT=Number of log files
impl.packetlogging.PACKET_LOGGING_FILE_SIZE=Maximum file size (in KB)
diff --git a/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java b/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java index fbfdb02..9ad4356 100644 --- a/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java +++ b/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java @@ -63,8 +63,10 @@ public class DeviceConfiguration /** * When audio is disabled the selected audio system is with name None. + * Used and for audio devices, when disabled are set in configuration to + * None. */ - public static final String AUDIO_SYSTEM_NONE = "None"; + public static final String AUDIO_NONE = "None"; /** * JavaSound sound system. @@ -247,13 +249,13 @@ public class DeviceConfiguration if (config.getBoolean(PROP_AUDIO_DEVICE_IS_DISABLED, false)) { audioCaptureDevice = null; - audioSystem = AUDIO_SYSTEM_NONE; + audioSystem = AUDIO_NONE; } else if (audioCaptureDevices.length < 1) { logger.warn("No Audio Device was found."); audioCaptureDevice = null; - audioSystem = AUDIO_SYSTEM_NONE; + audioSystem = AUDIO_NONE; } else { @@ -263,13 +265,16 @@ public class DeviceConfiguration String audioDevName = config.getString(PROP_AUDIO_DEVICE); - if(audioDevName == null) + if(audioDevName == null || audioDevName.equals(AUDIO_NONE)) { // the default behaviour if nothing set is to use PortAudio // this will also choose the capture device if(PortAudioAuto.isSupported()) { setAudioSystem(AUDIO_SYSTEM_PORTAUDIO, null, false); + if(audioDevName != null + && audioDevName.equals(AUDIO_NONE)) + setAudioCaptureDevice(null, false); } else { @@ -606,7 +611,7 @@ public class DeviceConfiguration .setProperty( PROP_AUDIO_DEVICE, (audioCaptureDevice == null) - ? null + ? AUDIO_NONE : audioCaptureDevice.getName()); } @@ -692,7 +697,7 @@ public class DeviceConfiguration res = asName; } } - return (res == null) ? AUDIO_SYSTEM_NONE : res; + return (res == null) ? AUDIO_NONE : res; } /** @@ -713,7 +718,7 @@ public class DeviceConfiguration audioSystem = name; - if(name.equals(AUDIO_SYSTEM_NONE)) + if(name.equals(AUDIO_NONE)) { setAudioCaptureDevice(null, save); setAudioNotifyDevice(null, save); @@ -721,9 +726,6 @@ public class DeviceConfiguration } else if(name.equals(AUDIO_SYSTEM_JAVASOUND)) { - setAudioNotifyDevice(null, save); - setAudioPlaybackDevice(null, save); - // as there is only one device for javasound // lets search for it if(captureDevice != null) @@ -783,28 +785,42 @@ public class DeviceConfiguration if(audioNotifyDevName != null) { - for (CaptureDeviceInfo captureDeviceInfo : - PortAudioAuto.playbackDevices) + if(audioNotifyDevName.equals(AUDIO_NONE)) + { + setAudioNotifyDevice(null, save); + } + else { - if (audioNotifyDevName.equals( - captureDeviceInfo.getName())) + for (CaptureDeviceInfo captureDeviceInfo : + PortAudioAuto.playbackDevices) { - setAudioNotifyDevice(captureDeviceInfo, save); - break; + if (audioNotifyDevName.equals( + captureDeviceInfo.getName())) + { + setAudioNotifyDevice(captureDeviceInfo, save); + break; + } } } } if(audioPlaybackDevName != null) { - for (CaptureDeviceInfo captureDeviceInfo : - PortAudioAuto.playbackDevices) + if(audioPlaybackDevName.equals(AUDIO_NONE)) { - if (audioPlaybackDevName.equals( - captureDeviceInfo.getName())) + setAudioPlaybackDevice(null, save); + } + else + { + for (CaptureDeviceInfo captureDeviceInfo : + PortAudioAuto.playbackDevices) { - setAudioPlaybackDevice(captureDeviceInfo, save); - break; + if (audioPlaybackDevName.equals( + captureDeviceInfo.getName())) + { + setAudioPlaybackDevice(captureDeviceInfo, save); + break; + } } } } @@ -924,7 +940,8 @@ public class DeviceConfiguration config.setProperty(PROP_AUDIO_DEVICE_IS_DISABLED, false); } else - config.setProperty(PROP_AUDIO_PLAYBACK_DEVICE, null); + config.setProperty(PROP_AUDIO_PLAYBACK_DEVICE, + AUDIO_NONE); } firePropertyChange(AUDIO_PLAYBACK_DEVICE, @@ -960,7 +977,8 @@ public class DeviceConfiguration config.setProperty(PROP_AUDIO_DEVICE_IS_DISABLED, false); } else - config.setProperty(PROP_AUDIO_NOTIFY_DEVICE, null); + config.setProperty(PROP_AUDIO_NOTIFY_DEVICE, + AUDIO_NONE); } firePropertyChange(AUDIO_NOTIFY_DEVICE, diff --git a/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java b/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java index 33b1704..f36e771 100644 --- a/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java +++ b/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java @@ -161,7 +161,7 @@ public class JmfDeviceDetector // audio systems, lets add option None, in order to be able to // disable audio DeviceConfiguration.addAudioSystem( - DeviceConfiguration.AUDIO_SYSTEM_NONE); + DeviceConfiguration.AUDIO_NONE); // video is enabled by default // if video is disabled skip device detection |