diff options
author | Boris Grozev <boris@jitsi.org> | 2012-10-05 17:50:19 +0000 |
---|---|---|
committer | Boris Grozev <boris@jitsi.org> | 2012-10-05 17:50:19 +0000 |
commit | bdf1793fd25bc08624e9b914c3b5ebe764219f27 (patch) | |
tree | 2c970c813d512c3bc2ba76c8f7c73b7ae1c5b308 /src/net | |
parent | 22ffe0448b2721cdb6c0040174c7821f25fb3afb (diff) | |
download | jitsi-bdf1793fd25bc08624e9b914c3b5ebe764219f27.zip jitsi-bdf1793fd25bc08624e9b914c3b5ebe764219f27.tar.gz jitsi-bdf1793fd25bc08624e9b914c3b5ebe764219f27.tar.bz2 |
Adds an option to explicitly advertise FEC support for SILK in SDP.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/java/sip/communicator/plugin/generalconfig/SilkConfigForm.java | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/plugin/generalconfig/SilkConfigForm.java b/src/net/java/sip/communicator/plugin/generalconfig/SilkConfigForm.java index 5ebac66..087d310 100644 --- a/src/net/java/sip/communicator/plugin/generalconfig/SilkConfigForm.java +++ b/src/net/java/sip/communicator/plugin/generalconfig/SilkConfigForm.java @@ -48,6 +48,13 @@ public class SilkConfigForm "encoder.sat"; /** + * The property name associated with the 'advertise fec' setting + */ + private static final String FEC_ADVERTISE_PROP + = "net.java.sip.communicator.impl.neomedia.codec.audio.silk." + + "encoder.advertisefec"; + + /** * The default value for the SAT setting */ private static final String FEC_SAT_DEFAULT = "0.5"; @@ -63,6 +70,11 @@ public class SilkConfigForm private static final boolean FEC_FORCE_PL_DEFAULT = true; /** + * The default value for the 'advertise FEC' setting + */ + private static final boolean FEC_ADVERTISE_DEFAULT = false; + + /** * The "restore defaults" button */ private final JButton restoreButton = new JButton(Resources.getString( @@ -79,6 +91,11 @@ public class SilkConfigForm private final JCheckBox fecForcePLCheckbox = new JCheckBox(); /** + * The " advertise FEC" checkbox + */ + private final JCheckBox advertiseFECCheckbox = new JCheckBox(); + + /** * The "speech activity threshold" field */ private final JTextField SATField = new JTextField(6); @@ -121,6 +138,8 @@ public class SilkConfigForm "plugin.generalconfig.SILK_FORCE_FEC_PACKET_LOSS"))); labelPanel.add(new JLabel(Resources.getString( "plugin.generalconfig.SILK_SAT"))); + labelPanel.add(new JLabel(Resources.getString( + "plugin.generalconfig.SILK_ADVERTISE_FEC"))); fecCheckbox.addActionListener(new ActionListener() { @@ -137,7 +156,7 @@ public class SilkConfigForm fecForcePLCheckbox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { - configurationService.setProperty(FEC_PROP, + configurationService.setProperty(FEC_FORCE_PL_PROP, fecForcePLCheckbox.isSelected()); } }); @@ -160,6 +179,17 @@ public class SilkConfigForm FEC_SAT_PROP, FEC_SAT_DEFAULT)); valuePanel.add(SATField); + advertiseFECCheckbox.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent actionEvent) { + configurationService.setProperty(FEC_ADVERTISE_PROP, + advertiseFECCheckbox.isSelected()); + } + }); + advertiseFECCheckbox.setSelected(configurationService.getBoolean( + FEC_ADVERTISE_PROP, FEC_ADVERTISE_DEFAULT)); + valuePanel.add(advertiseFECCheckbox); + southPanel.add(restoreButton); restoreButton.addActionListener(new ActionListener(){ @@ -168,7 +198,8 @@ public class SilkConfigForm restoreDefaults(); } }); - + southPanel.add(new JLabel(Resources.getString( + "plugin.generalconfig.DEFAULT_LANGUAGE_RESTART_WARN"))); } /** @@ -185,5 +216,9 @@ public class SilkConfigForm SATField.setText(FEC_SAT_DEFAULT); configurationService.setProperty(FEC_SAT_PROP, FEC_SAT_DEFAULT); + + advertiseFECCheckbox.setSelected(FEC_ADVERTISE_DEFAULT); + configurationService.setProperty( + FEC_ADVERTISE_PROP, FEC_ADVERTISE_DEFAULT); } }
\ No newline at end of file |