- Added Internet Low Bitrate Codec (iLBC).
- Improved account's codec selection.
This commit is contained in:
@ -20,9 +20,10 @@ jitter_buffer_delay 5-10
|
||||
rtp_stats no
|
||||
dyn_dns yes
|
||||
prefer_ipv6 no
|
||||
module opus.so
|
||||
module g711.so
|
||||
module ilbc.so
|
||||
module g7221.so
|
||||
module g711.so
|
||||
module opus.so
|
||||
module webrtc_aec.so
|
||||
module opensles.so
|
||||
module stun.so
|
||||
|
||||
@ -27,6 +27,10 @@ add_library(lib_g722_1 STATIC IMPORTED)
|
||||
set_target_properties(lib_g722_1 PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/g7221/lib/${ANDROID_ABI}/libg722_1.a)
|
||||
|
||||
add_library(lib_ilbc STATIC IMPORTED)
|
||||
set_target_properties(lib_ilbc PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/ilbc/lib/${ANDROID_ABI}/libilbc.a)
|
||||
|
||||
add_library(lib_webrtc STATIC IMPORTED)
|
||||
set_target_properties(lib_webrtc PROPERTIES IMPORTED_LOCATION
|
||||
${distribution_DIR}/webrtc/lib/${ANDROID_ABI}/libwebrtc.a)
|
||||
@ -61,6 +65,7 @@ target_link_libraries(baresip
|
||||
lib_crypto
|
||||
lib_opus
|
||||
lib_g722_1
|
||||
lib_ilbc
|
||||
lib_webrtc
|
||||
lib_zrtp
|
||||
lib_bn
|
||||
|
||||
@ -76,10 +76,10 @@ class AccountActivity : AppCompatActivity() {
|
||||
val codec = acc.audioCodec[i]
|
||||
spinnerList[i].add(codec)
|
||||
for (c in audioCodecs) if (c != codec) spinnerList[i].add(c)
|
||||
spinnerList[i].add("")
|
||||
spinnerList[i].add("-")
|
||||
} else {
|
||||
spinnerList[i] = audioCodecs
|
||||
spinnerList[i].add(0, "")
|
||||
spinnerList[i].addAll(audioCodecs)
|
||||
spinnerList[i].add(0, "-")
|
||||
}
|
||||
val codecSpinner = findViewById(spinner.id) as Spinner
|
||||
val adapter = ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,
|
||||
@ -309,16 +309,16 @@ class AccountActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
val ac = ArrayList(LinkedHashSet<String>(newCodecs.filter { it != "" } as ArrayList<String>))
|
||||
val ac = ArrayList(LinkedHashSet<String>(newCodecs.filter { it != "-" } as ArrayList<String>))
|
||||
if (ac != acc.audioCodec) {
|
||||
Log.d("Baresip", "New codecs ${newCodecs.filter { it != "" }}")
|
||||
Log.d("Baresip", "New codecs ${newCodecs.filter { it != "-" }}")
|
||||
val acParam = ";audio_codecs=" + Utils.implode(ac, ",")
|
||||
if (account_set_audio_codecs(acc.accp, acParam) == 0) {
|
||||
var i = 0
|
||||
while (true) {
|
||||
val codec = account_audio_codec(acc.accp, i)
|
||||
if (codec != "") {
|
||||
Log.d("Baresip", "Found audio codec $codec")
|
||||
Log.d("Baresip", "Found audio codec '$codec'")
|
||||
i++
|
||||
} else {
|
||||
break
|
||||
@ -327,7 +327,7 @@ class AccountActivity : AppCompatActivity() {
|
||||
acc.audioCodec = ac
|
||||
save = true
|
||||
} else {
|
||||
Log.e("Baresip", "Setting of audio codecs $acParam failed")
|
||||
Log.e("Baresip", "Setting of audio codecs '$acParam' failed")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,6 +24,10 @@ object Config {
|
||||
config = "${config}module g7221.so\n"
|
||||
write = true
|
||||
}
|
||||
if (!config.contains(Regex("module[ ]+ilbc.so"))) {
|
||||
config = "${config}module ilbc.so\n"
|
||||
write = true
|
||||
}
|
||||
if (config.contains(Regex("#module_app[ ]+mwi.so"))) {
|
||||
config = config.replace(Regex("#module_app[ ]+mwi.so"),
|
||||
"module_app mwi.so")
|
||||
|
||||
Reference in New Issue
Block a user