diff --git a/src/org/jitsi/impl/neomedia/MediaUtils.java b/src/org/jitsi/impl/neomedia/MediaUtils.java index a9510e91369cefa38718cb1a51f884b8ab76b80a..1bd431b04c7210577bdb61dc466126e9c0fc1d1b 100644 --- a/src/org/jitsi/impl/neomedia/MediaUtils.java +++ b/src/org/jitsi/impl/neomedia/MediaUtils.java @@ -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", diff --git a/src/org/jitsi/impl/neomedia/codec/audio/silk/JavaEncoder.java b/src/org/jitsi/impl/neomedia/codec/audio/silk/JavaEncoder.java index e7d4f496f53a2d0926bbbd51bf3bf819f1b0b227..d9f9996890bc5497dca102b443cba8002a9aeb55 100644 --- a/src/org/jitsi/impl/neomedia/codec/audio/silk/JavaEncoder.java +++ b/src/org/jitsi/impl/neomedia/codec/audio/silk/JavaEncoder.java @@ -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);