Adds an option to explicitly advertise FEC support for SILK in SDP.

cusax-fix
Boris Grozev 13 years ago
parent 22ffe0448b
commit bdf1793fd2

@ -897,6 +897,7 @@ plugin.generalconfig.SILK_CONFIG=Silk
plugin.generalconfig.SILK_USE_FEC=Use inband FEC: plugin.generalconfig.SILK_USE_FEC=Use inband FEC:
plugin.generalconfig.SILK_FORCE_FEC_PACKET_LOSS=Force the encoder to expect packet loss: plugin.generalconfig.SILK_FORCE_FEC_PACKET_LOSS=Force the encoder to expect packet loss:
plugin.generalconfig.SILK_SAT=Speech activity threshold (0-1): plugin.generalconfig.SILK_SAT=Speech activity threshold (0-1):
plugin.generalconfig.SILK_ADVERTISE_FEC=Advertise FEC support in SDP:
plugin.generalconfig.RESTORE=Restore defaults plugin.generalconfig.RESTORE=Restore defaults
# gibberish accregwizz # gibberish accregwizz

@ -47,6 +47,13 @@ public class SilkConfigForm
= "net.java.sip.communicator.impl.neomedia.codec.audio.silk." + = "net.java.sip.communicator.impl.neomedia.codec.audio.silk." +
"encoder.sat"; "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 * The default value for the SAT setting
*/ */
@ -62,6 +69,11 @@ public class SilkConfigForm
*/ */
private static final boolean FEC_FORCE_PL_DEFAULT = true; 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 * The "restore defaults" button
*/ */
@ -78,6 +90,11 @@ public class SilkConfigForm
*/ */
private final JCheckBox fecForcePLCheckbox = new JCheckBox(); private final JCheckBox fecForcePLCheckbox = new JCheckBox();
/**
* The " advertise FEC" checkbox
*/
private final JCheckBox advertiseFECCheckbox = new JCheckBox();
/** /**
* The "speech activity threshold" field * The "speech activity threshold" field
*/ */
@ -121,6 +138,8 @@ public SilkConfigForm()
"plugin.generalconfig.SILK_FORCE_FEC_PACKET_LOSS"))); "plugin.generalconfig.SILK_FORCE_FEC_PACKET_LOSS")));
labelPanel.add(new JLabel(Resources.getString( labelPanel.add(new JLabel(Resources.getString(
"plugin.generalconfig.SILK_SAT"))); "plugin.generalconfig.SILK_SAT")));
labelPanel.add(new JLabel(Resources.getString(
"plugin.generalconfig.SILK_ADVERTISE_FEC")));
fecCheckbox.addActionListener(new ActionListener() { fecCheckbox.addActionListener(new ActionListener() {
@ -137,7 +156,7 @@ public void actionPerformed(ActionEvent actionEvent) {
fecForcePLCheckbox.addActionListener(new ActionListener() { fecForcePLCheckbox.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent actionEvent) { public void actionPerformed(ActionEvent actionEvent) {
configurationService.setProperty(FEC_PROP, configurationService.setProperty(FEC_FORCE_PL_PROP,
fecForcePLCheckbox.isSelected()); fecForcePLCheckbox.isSelected());
} }
}); });
@ -160,6 +179,17 @@ public void focusLost(FocusEvent focusEvent)
FEC_SAT_PROP, FEC_SAT_DEFAULT)); FEC_SAT_PROP, FEC_SAT_DEFAULT));
valuePanel.add(SATField); 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); southPanel.add(restoreButton);
restoreButton.addActionListener(new ActionListener(){ restoreButton.addActionListener(new ActionListener(){
@ -168,7 +198,8 @@ public void actionPerformed(ActionEvent e)
restoreDefaults(); restoreDefaults();
} }
}); });
southPanel.add(new JLabel(Resources.getString(
"plugin.generalconfig.DEFAULT_LANGUAGE_RESTART_WARN")));
} }
/** /**
@ -185,5 +216,9 @@ private void restoreDefaults()
SATField.setText(FEC_SAT_DEFAULT); SATField.setText(FEC_SAT_DEFAULT);
configurationService.setProperty(FEC_SAT_PROP, FEC_SAT_DEFAULT); configurationService.setProperty(FEC_SAT_PROP, FEC_SAT_DEFAULT);
advertiseFECCheckbox.setSelected(FEC_ADVERTISE_DEFAULT);
configurationService.setProperty(
FEC_ADVERTISE_PROP, FEC_ADVERTISE_DEFAULT);
} }
} }
Loading…
Cancel
Save