From 7813b8bce4b70bc48abeb5326929c899f7e7c385 Mon Sep 17 00:00:00 2001 From: Boris Grozev <boris@jitsi.org> Date: Fri, 5 Oct 2012 19:09:46 +0000 Subject: [PATCH] Renames SILK-related properties. --- src/org/jitsi/impl/neomedia/MediaUtils.java | 8 +------- .../neomedia/codec/audio/silk/JavaEncoder.java | 15 ++++++--------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/org/jitsi/impl/neomedia/MediaUtils.java b/src/org/jitsi/impl/neomedia/MediaUtils.java index a9510e91..1bd431b0 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 e7d4f496..d9f99968 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); -- GitLab