<settings>
<param name="use-vbr" value="1"/>
<param name="complexity" value="10"/>
+ <!-- Packet Loss Percent, Default 0 -->
+ <!--<param name="packet-loss-percent" value="20"/>-->
<!--
maxaveragebitrate: the maximum average codec bitrate (values: 6000 to 510000 in bps) 0 is not considered
int complexity;
int maxaveragebitrate;
int maxplaybackrate;
+ int plpct;
switch_mutex_t *mutex;
} opus_prefs;
int bitrate_bps = OPUS_AUTO;
int use_vbr = opus_prefs.use_vbr;
int complexity = opus_prefs.complexity;
+ int plpct = opus_prefs.plpct;
int err;
int samplerate = opus_codec_settings.samplerate ? opus_codec_settings.samplerate : codec->implementation->actual_samples_per_second;
opus_encoder_ctl(context->encoder_object, OPUS_SET_COMPLEXITY(complexity));
}
+ if (plpct) {
+ opus_encoder_ctl(context->encoder_object, OPUS_SET_PACKET_LOSS_PERC(plpct));
+ }
+
if (opus_codec_settings.useinbandfec) {
opus_encoder_ctl(context->encoder_object, OPUS_SET_INBAND_FEC(opus_codec_settings.useinbandfec));
}
opus_prefs.use_vbr = atoi(val);
} else if (!strcasecmp(key, "complexity")) {
opus_prefs.complexity = atoi(val);
+ } else if (!strcasecmp(key, "packet-loss-percent")) {
+ opus_prefs.plpct = atoi(val);
} else if (!strcasecmp(key, "maxaveragebitrate")) {
opus_prefs.maxaveragebitrate = atoi(val);
if ( opus_prefs.maxaveragebitrate < 6000 || opus_prefs.maxaveragebitrate > 510000 ) {