add g729 integration
This commit is contained in:
parent
a6d0acc1e0
commit
97d8312fdf
12 changed files with 36 additions and 4 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -52,3 +52,6 @@
|
||||||
[submodule "submodules/externals/vo-amrwbenc"]
|
[submodule "submodules/externals/vo-amrwbenc"]
|
||||||
path = submodules/externals/vo-amrwbenc
|
path = submodules/externals/vo-amrwbenc
|
||||||
url = git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/vo-amrwbenc
|
url = git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/vo-amrwbenc
|
||||||
|
[submodule "submodules/bcg729"]
|
||||||
|
path = submodules/bcg729
|
||||||
|
url = git://git.linphone.org/bcg729.git
|
||||||
|
|
1
README
1
README
|
@ -20,6 +20,7 @@ BUILD_AMRNB 0 (don't build amrnb codec), light (try to use amrnb codec
|
||||||
BUILD_AMRWB 0 (don't build amrwb codec), 1 (build your own amrwb codec) | 1
|
BUILD_AMRWB 0 (don't build amrwb codec), 1 (build your own amrwb codec) | 1
|
||||||
BUILD_GPLV3_ZRTP 0 (don't support ZRTP), 1 (support ZRTP and make the whole program GPLv3)
|
BUILD_GPLV3_ZRTP 0 (don't support ZRTP), 1 (support ZRTP and make the whole program GPLv3)
|
||||||
BUILD_SILK 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec]
|
BUILD_SILK 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec]
|
||||||
|
BUILD_G720 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details]
|
||||||
BUILD_TUNNEL 0 (don't build tunnel), 1 (build tunnel) [requires a tunnel implementation in submodules/linphone/tunnel]
|
BUILD_TUNNEL 0 (don't build tunnel), 1 (build tunnel) [requires a tunnel implementation in submodules/linphone/tunnel]
|
||||||
|
|
||||||
In order to use ZRTP you also need to define the media_encryption property to
|
In order to use ZRTP you also need to define the media_encryption property to
|
||||||
|
|
|
@ -8,7 +8,10 @@ ifeq ($(BUILD_AMRWB),)
|
||||||
BUILD_AMRWB=0
|
BUILD_AMRWB=0
|
||||||
endif
|
endif
|
||||||
ifeq ($(BUILD_AMRWB),)
|
ifeq ($(BUILD_AMRWB),)
|
||||||
BUILD_SRTP=1
|
BUILD_AMRWB=0
|
||||||
|
endif
|
||||||
|
ifeq ($(BUILD_G729),)
|
||||||
|
BUILD_G729=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
|
@ -135,3 +138,8 @@ endif
|
||||||
ifneq ($(BUILD_AMRWB), 0)
|
ifneq ($(BUILD_AMRWB), 0)
|
||||||
include $(linphone-root-dir)/submodules/externals/build/vo-amrwbenc/Android.mk
|
include $(linphone-root-dir)/submodules/externals/build/vo-amrwbenc/Android.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(BUILD_G729), 0)
|
||||||
|
include $(linphone-root-dir)/submodules/bcg729/Android.mk
|
||||||
|
include $(linphone-root-dir)/submodules/bcg729/msbcg729/Android.mk
|
||||||
|
endif
|
||||||
|
|
|
@ -42,6 +42,10 @@ ifeq ($(BUILD_SILK),1)
|
||||||
APP_MODULES +=libmssilk
|
APP_MODULES +=libmssilk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BUILD_G729),1)
|
||||||
|
APP_MODULES +=libbcg729 libmsbcg729
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(RING),yes)
|
ifeq ($(RING),yes)
|
||||||
APP_MODULES += libring
|
APP_MODULES += libring
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
<string name="pref_codec_pcmu_key">pref_codec_pcmu_key</string>
|
<string name="pref_codec_pcmu_key">pref_codec_pcmu_key</string>
|
||||||
<string name="pref_codec_gsm_key">pref_codec_gsm_key</string>
|
<string name="pref_codec_gsm_key">pref_codec_gsm_key</string>
|
||||||
<string name="pref_codec_g722_key">pref_codec_g722_key</string>
|
<string name="pref_codec_g722_key">pref_codec_g722_key</string>
|
||||||
|
<string name="pref_codec_g729_key">pref_codec_g729_key</string>
|
||||||
<string name="pref_codec_amr_key">pref_codec_amr_key</string>
|
<string name="pref_codec_amr_key">pref_codec_amr_key</string>
|
||||||
<string name="pref_codec_amrwb_key">pref_codec_amrwb_key</string>
|
<string name="pref_codec_amrwb_key">pref_codec_amrwb_key</string>
|
||||||
<string name="pref_codec_ilbc_key">pref_codec_ilbc_key</string>
|
<string name="pref_codec_ilbc_key">pref_codec_ilbc_key</string>
|
||||||
|
|
|
@ -158,6 +158,7 @@
|
||||||
<string name="pref_codec_silk12">silk 12 Khz</string>
|
<string name="pref_codec_silk12">silk 12 Khz</string>
|
||||||
<string name="pref_codec_silk16">silk 16 Khz</string>
|
<string name="pref_codec_silk16">silk 16 Khz</string>
|
||||||
<string name="pref_codec_silk24">silk 24 Khz</string>
|
<string name="pref_codec_silk24">silk 24 Khz</string>
|
||||||
|
<string name="pref_codec_g729">g729</string>
|
||||||
<string name="pref_codecs">Codecs</string>
|
<string name="pref_codecs">Codecs</string>
|
||||||
<string name="place_call_chooser">Place a call</string>
|
<string name="place_call_chooser">Place a call</string>
|
||||||
<string name="pref_debug">Debug</string>
|
<string name="pref_debug">Debug</string>
|
||||||
|
|
|
@ -78,6 +78,10 @@
|
||||||
android:title="@string/pref_codec_amr"
|
android:title="@string/pref_codec_amr"
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:shouldDisableView="true" />
|
android:shouldDisableView="true" />
|
||||||
|
<CheckBoxPreference android:key="@string/pref_codec_g729_key"
|
||||||
|
android:title="@string/pref_codec_g729"
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:shouldDisableView="true" />
|
||||||
<CheckBoxPreference android:key="@string/pref_codec_amrwb_key"
|
<CheckBoxPreference android:key="@string/pref_codec_amrwb_key"
|
||||||
android:title="@string/pref_codec_amrwb"
|
android:title="@string/pref_codec_amrwb"
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
|
|
@ -570,6 +570,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
enableDisableAudioCodec("iLBC", 8000, R.string.pref_codec_ilbc_key);
|
enableDisableAudioCodec("iLBC", 8000, R.string.pref_codec_ilbc_key);
|
||||||
enableDisableAudioCodec("GSM", 8000, R.string.pref_codec_gsm_key);
|
enableDisableAudioCodec("GSM", 8000, R.string.pref_codec_gsm_key);
|
||||||
enableDisableAudioCodec("G722", 8000, R.string.pref_codec_g722_key);
|
enableDisableAudioCodec("G722", 8000, R.string.pref_codec_g722_key);
|
||||||
|
enableDisableAudioCodec("G729", 8000, R.string.pref_codec_g729_key);
|
||||||
enableDisableAudioCodec("PCMU", 8000, R.string.pref_codec_pcmu_key);
|
enableDisableAudioCodec("PCMU", 8000, R.string.pref_codec_pcmu_key);
|
||||||
enableDisableAudioCodec("PCMA", 8000, R.string.pref_codec_pcma_key);
|
enableDisableAudioCodec("PCMA", 8000, R.string.pref_codec_pcma_key);
|
||||||
enableDisableAudioCodec("AMR", 8000, R.string.pref_codec_amr_key);
|
enableDisableAudioCodec("AMR", 8000, R.string.pref_codec_amr_key);
|
||||||
|
@ -1126,6 +1127,10 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
boolean amrwb = LinphoneService.isReady() && LinphoneManager.getLc()
|
boolean amrwb = LinphoneService.isReady() && LinphoneManager.getLc()
|
||||||
.findPayloadType("AMR-WB", 16000)!=null;
|
.findPayloadType("AMR-WB", 16000)!=null;
|
||||||
e.putBoolean(getString(pref_codec_amrwb_key), amrwb);
|
e.putBoolean(getString(pref_codec_amrwb_key), amrwb);
|
||||||
|
|
||||||
|
boolean g729 = LinphoneService.isReady() && LinphoneManager.getLc()
|
||||||
|
.findPayloadType("G729", 8000)!=null;
|
||||||
|
e.putBoolean(getString(R.string.pref_codec_g729_key), g729);
|
||||||
|
|
||||||
if (Version.sdkStrictlyBelow(5) || !Version.hasNeon() || !Hacks.hasCamera()) {
|
if (Version.sdkStrictlyBelow(5) || !Version.hasNeon() || !Hacks.hasCamera()) {
|
||||||
e.putBoolean(getString(pref_video_enable_key), false);
|
e.putBoolean(getString(pref_video_enable_key), false);
|
||||||
|
|
|
@ -598,7 +598,8 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
||||||
//detectAudioCodec(R.string.pref_codec_silk12_key,"SILK",12000, true);
|
//detectAudioCodec(R.string.pref_codec_silk12_key,"SILK",12000, true);
|
||||||
detectAudioCodec(R.string.pref_codec_silk16_key,"SILK",16000, true);
|
detectAudioCodec(R.string.pref_codec_silk16_key,"SILK",16000, true);
|
||||||
detectAudioCodec(R.string.pref_codec_silk24_key,"SILK",24000, true);
|
detectAudioCodec(R.string.pref_codec_silk24_key,"SILK",24000, true);
|
||||||
|
detectAudioCodec(R.string.pref_codec_g729_key,"G729",8000, true);
|
||||||
|
|
||||||
// No video
|
// No video
|
||||||
if (!Version.isVideoCapable()) {
|
if (!Version.isVideoCapable()) {
|
||||||
uncheckAndDisableCheckbox(pref_video_enable_key);
|
uncheckAndDisableCheckbox(pref_video_enable_key);
|
||||||
|
|
|
@ -51,9 +51,12 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
||||||
|
|
||||||
// Tunnel
|
// Tunnel
|
||||||
loadOptionalLibrary("tunnelclient");
|
loadOptionalLibrary("tunnelclient");
|
||||||
|
|
||||||
|
// g729 A implementation
|
||||||
|
loadOptionalLibrary("bcg729");
|
||||||
|
|
||||||
//Main library
|
//Main library
|
||||||
System.loadLibrary("linphone");
|
System.loadLibrary("linphone");
|
||||||
|
|
||||||
Version.dumpCapabilities();
|
Version.dumpCapabilities();
|
||||||
}
|
}
|
||||||
|
|
1
submodules/bcg729
Submodule
1
submodules/bcg729
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d5bc18eb9929f658481d67d55b4a106679b68b13
|
|
@ -1 +1 @@
|
||||||
Subproject commit 43f97a44b5a571d8597b73c8c9061754d466dac9
|
Subproject commit 5732fcea54f21b781470b34e0a63c2d5ebd31470
|
Loading…
Reference in a new issue