Skip to content
Snippets Groups Projects
Commit 7813b8bc authored by Boris Grozev's avatar Boris Grozev
Browse files

Renames SILK-related properties.

parent c0d82224
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,7 @@ public class MediaUtils
boolean advertiseFEC
= cfg.getBoolean("net.java.sip.communicator.impl.neomedia" +
".codec.audio.silk.encoder.advertisefec", false);
".codec.audio.silk.ADVERTISE_FEC", false);
Map<String,String> silkFormatParams = new HashMap<String, String>();
if(advertiseFEC)
silkFormatParams.put("useinbandfec", "1");
......@@ -181,12 +181,6 @@ public class MediaUtils
silkFormatParams,
null,
8000, 12000, 16000, 24000);
addMediaFormats(
MediaFormat.RTP_PAYLOAD_TYPE_UNKNOWN,
"SILK",
MediaType.AUDIO,
Constants.SILK_RTP,
8000, 12000, 16000, 24000);
addMediaFormats(
MediaFormat.RTP_PAYLOAD_TYPE_UNKNOWN,
"opus",
......
......@@ -144,15 +144,15 @@ protected void doOpen()
//TODO: we should have a default value dependent on the SDP parameters
//here.
boolean useFEC = cfg.getBoolean("net.java.sip.communicator.impl."
+"neomedia.codec.audio.silk.encoder.usefec", true);
boolean forcePacketLoss = cfg.getBoolean("net.java.sip.communicator." +
+"neomedia.codec.audio.silk.encoder.USE_FEC", true);
boolean assumePacketLoss = cfg.getBoolean("net.java.sip.communicator." +
"impl.neomedia.codec.audio.silk.encoder." +
"forcepacketloss", true);
"ALWAYS_ASSUME_PACKET_LOSS", true);
//Update the statically defined value for "speech activity threshold"
//according to our configuration
String satStr = cfg.getString("net.java.sip." +
"communicator.impl.neomedia.codec.audio.silk.encoder.sat", "0.5");
String satStr = cfg.getString("net.java.sip.communicator.impl.neomedia"
+ ".codec.audio.silk.encoder.SPEECH_ACTIVITY_THRESHOLD", "0.5");
float sat = Silk_define_FLP.LBRR_SPEECH_ACTIVITY_THRES;
try
{
......@@ -165,10 +165,7 @@ protected void doOpen()
encControl.bitRate = BITRATE;
encControl.complexity = COMPLEXITY;
encControl.maxInternalSampleRate = encControl.API_sampleRate;
//At the moment we do not support dynamically setting the expected
//packet loss. Therefore to force the encoder to always expect packet
//loss we set this higher than all thresholds.
encControl.packetLossPercentage = forcePacketLoss ? 100 : 0;
encControl.packetLossPercentage = assumePacketLoss ? 2 : 0;
encControl.packetSize
= (int)
((JavaDecoder.FRAME_DURATION * sampleRate * channels) / 1000);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment