Add SILK plugin support.
This commit is contained in:
parent
0842571c36
commit
134a98fdc2
12 changed files with 56 additions and 8 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -46,3 +46,6 @@
|
|||
[submodule "submodules/externals/srtp"]
|
||||
path = submodules/externals/srtp
|
||||
url = git://git.linphone.org/srtp.git
|
||||
[submodule "submodules/mssilk"]
|
||||
path = submodules/mssilk
|
||||
url = git://git.linphone.org/mssilk.git
|
||||
|
|
1
README
1
README
|
@ -18,6 +18,7 @@ Option Name | Possible values
|
|||
BUILD_X264 0 (don't build x264) or 1 (build x264)
|
||||
BUILD_AMR 0 (don't build amr codec), light (try to use amr codec from android), full (build your own amr codec)
|
||||
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]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -61,11 +61,17 @@ include $(linphone-root-dir)/submodules/linphone/mediastreamer2/build/android/An
|
|||
include $(linphone-root-dir)/submodules/linphone/mediastreamer2/tests/Android.mk
|
||||
|
||||
|
||||
ifeq ($(BUILD_SILK), 1)
|
||||
$(info Build proprietary SILK plugin for mediastreamer2)
|
||||
include $(linphone-root-dir)/submodules/mssilk/Android.mk
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||
include $(linphone-root-dir)/submodules/msilbc/Android.mk
|
||||
|
||||
ifeq ($(BUILD_X264), 1)
|
||||
$(info Build X264 plugin for mediastreamer2)
|
||||
include $(linphone-root-dir)/submodules/msx264/Android.mk
|
||||
ifeq ($(wildcard $(linphone-root-dir)/submodules/externals/prebuilts/x264.mk),)
|
||||
include $(linphone-root-dir)/submodules/externals/build/x264/Android.mk
|
||||
|
@ -74,7 +80,6 @@ include $(linphone-root-dir)/submodules/externals/prebuilts/x264.mk
|
|||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(wildcard $(linphone-root-dir)/submodules/externals/prebuilts/ffmpeg.mk),)
|
||||
include $(linphone-root-dir)/submodules/externals/build/ffmpeg/Android.mk
|
||||
else
|
||||
|
@ -86,6 +91,7 @@ endif #armeabi-v7a
|
|||
|
||||
|
||||
ifeq ($(BUILD_GPLV3_ZRTP), 1)
|
||||
$(info Build ZRTP support - makes application GPLv3)
|
||||
ifeq ($(wildcard $(linphone-root-dir)/submodules/externals/prebuilts/zrtpcpp.mk),)
|
||||
include $(linphone-root-dir)/submodules/externals/build/libzrtpcpp/Android.mk
|
||||
else
|
||||
|
|
|
@ -22,6 +22,10 @@ ifeq ($(BUILD_X264),1)
|
|||
APP_MODULES +=libx264 libmsx264
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_SILK),1)
|
||||
APP_MODULES +=libmssilk
|
||||
endif
|
||||
|
||||
ifeq ($(RING),yes)
|
||||
APP_MODULES += libring
|
||||
endif
|
||||
|
@ -40,5 +44,6 @@ linphone-root-dir:=$(APP_PROJECT_PATH)
|
|||
|
||||
APP_BUILD_SCRIPT:=$(call my-dir)/Android.mk
|
||||
APP_PLATFORM := android-8
|
||||
#APP_ABI := armeabi-v7a
|
||||
APP_ABI := armeabi-v7a armeabi
|
||||
APP_CFLAGS:=-DDISABLE_NEON
|
||||
|
|
|
@ -8,11 +8,13 @@ if test -z "`git status | grep neon`" ; then
|
|||
cd $topdir
|
||||
patch -p0 < ${topdir}/patches/ffmpeg_scalar_product_remove_alignment_hints.patch
|
||||
fi
|
||||
cd $topdir
|
||||
|
||||
cd submodules/libilbc-rfc3951 && ./autogen.sh && ./configure && make || ( echo "iLBC prepare stage failed" ; exit 1 )
|
||||
cd $topdir/submodules/libilbc-rfc3951 && ./autogen.sh && ./configure && make || ( echo "iLBC prepare stage failed" ; exit 1 )
|
||||
|
||||
cd $topdir/submodules/externals/build/libvpx && ./asm_conversion.sh && cp *.asm *.h ../../libvpx/ || ( echo "VP8 prepare stage failed." ; exit 1 )
|
||||
|
||||
cd $topdir/submodules/mssilk && ./autogen.sh && ./configure && cd downloads && make || ( echo "SILK audio plugin prepare state failed." ; exit 1 )
|
||||
|
||||
|
||||
# As a memo, the config.h for zrtpcpp is generated using the command
|
||||
# cmake -Denable-ccrtp=false submodules/externals/libzrtpcpp
|
||||
|
|
|
@ -42,6 +42,10 @@
|
|||
<string name="pref_codec_speex8_key">pref_codec_speex8_key</string>
|
||||
<string name="pref_codec_speex16_key">pref_codec_speex16_key</string>
|
||||
<string name="pref_codec_speex32_key">pref_codec_speex32_key</string>
|
||||
<string name="pref_codec_silk8_key">pref_codec_silk8_key</string>
|
||||
<string name="pref_codec_silk12_key">pref_codec_silk12_key</string>
|
||||
<string name="pref_codec_silk16_key">pref_codec_silk16_key</string>
|
||||
<string name="pref_codec_silk24_key">pref_codec_silk24_key</string>
|
||||
<string name="pref_codecs_key">pref_codecs_key</string>
|
||||
<string name="pref_stun_server_key">pref_stun_server_key</string>
|
||||
<string name="pref_video_codec_vp8_key">pref_video_codec_vp8_key</string>
|
||||
|
|
|
@ -130,6 +130,10 @@
|
|||
<string name="pref_codec_ilbc">ilbc</string>
|
||||
<string name="pref_codec_speex8">speex 8 Khz</string>
|
||||
<string name="pref_codec_speex16">speex 16 Khz</string>
|
||||
<string name="pref_codec_silk8">silk 8 Khz</string>
|
||||
<string name="pref_codec_silk12">silk 12 Khz</string>
|
||||
<string name="pref_codec_silk16">silk 16 Khz</string>
|
||||
<string name="pref_codec_silk24">silk 24 Khz</string>
|
||||
<string name="pref_codecs">Codecs</string>
|
||||
<string name="place_call_chooser">Place a call</string>
|
||||
<string name="pref_debug">Debug</string>
|
||||
|
|
|
@ -66,6 +66,14 @@
|
|||
<CheckBoxPreference android:key="@string/pref_codec_g722_key"
|
||||
android:defaultValue="false"
|
||||
android:title="@string/pref_codec_g722"/>
|
||||
<CheckBoxPreference android:key="@string/pref_codec_silk24_key"
|
||||
android:title="@string/pref_codec_silk24"/>
|
||||
<CheckBoxPreference android:key="@string/pref_codec_silk16_key"
|
||||
android:title="@string/pref_codec_silk16"/>
|
||||
<CheckBoxPreference android:key="@string/pref_codec_silk12_key"
|
||||
android:title="@string/pref_codec_silk12"/>
|
||||
<CheckBoxPreference android:key="@string/pref_codec_silk8_key"
|
||||
android:title="@string/pref_codec_silk8"/>
|
||||
<CheckBoxPreference android:key="@string/pref_codec_pcmu_key"
|
||||
android:title="@string/pref_codec_pcmu"/>
|
||||
<CheckBoxPreference android:key="@string/pref_codec_pcma_key"
|
||||
|
|
|
@ -504,6 +504,11 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
enableDisableAudioCodec("PCMU", 8000, R.string.pref_codec_pcmu_key);
|
||||
enableDisableAudioCodec("PCMA", 8000, R.string.pref_codec_pcma_key);
|
||||
enableDisableAudioCodec("AMR", 8000, R.string.pref_codec_amr_key);
|
||||
enableDisableAudioCodec("SILK", 24000, R.string.pref_codec_silk24_key);
|
||||
enableDisableAudioCodec("SILK", 16000, R.string.pref_codec_silk16_key);
|
||||
enableDisableAudioCodec("SILK", 12000, R.string.pref_codec_silk12_key);
|
||||
enableDisableAudioCodec("SILK", 8000, R.string.pref_codec_silk8_key);
|
||||
|
||||
|
||||
// Configure video codecs
|
||||
for (PayloadType videoCodec : mLc.getVideoCodecs()) {
|
||||
|
|
|
@ -62,10 +62,15 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
|||
return (CheckBoxPreference) findPreference(getString(key));
|
||||
}
|
||||
|
||||
private void detectAudioCodec(int id, String mime, int rate) {
|
||||
private void detectAudioCodec(int id, String mime, int rate, boolean hide) {
|
||||
boolean enable = LinphoneService.isReady() && LinphoneManager.getLc().findPayloadType(mime, rate)!=null;
|
||||
findPreference(id).setEnabled(enable);
|
||||
Preference cb = findPreference(id);
|
||||
cb.setEnabled(enable);
|
||||
if (hide && !enable) {
|
||||
cb.setLayoutResource(R.layout.hidden);
|
||||
}
|
||||
}
|
||||
|
||||
private void detectVideoCodec(int id, String mime) {
|
||||
findPreference(id).setEnabled(LinphoneManager.getInstance().detectVideoCodec(mime));
|
||||
}
|
||||
|
@ -89,12 +94,16 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements E
|
|||
|
||||
boolean fastCpu = Version.isArmv7();
|
||||
if (fastCpu) {
|
||||
detectAudioCodec(pref_codec_ilbc_key, "iLBC", 8000);
|
||||
detectAudioCodec(pref_codec_ilbc_key, "iLBC", 8000, false);
|
||||
findPreference(pref_codec_speex16_key).setEnabled(true);
|
||||
//findPreference(pref_codec_speex32_key)).setEnabled(enableIlbc);
|
||||
}
|
||||
|
||||
detectAudioCodec(pref_codec_amr_key,"AMR",8000);
|
||||
detectAudioCodec(pref_codec_amr_key,"AMR",8000, false);
|
||||
detectAudioCodec(R.string.pref_codec_silk8_key,"SILK",8000, 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_silk24_key,"SILK",24000, true);
|
||||
|
||||
// No video
|
||||
if (!Version.isVideoCapable()) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0fb206da3a4602e23d48579674a8210dccef2c4b
|
||||
Subproject commit 65dc7621f45449893de50c28b94653c9af0ecb22
|
1
submodules/mssilk
Submodule
1
submodules/mssilk
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4735f6fe0a5a8e466c06cab6cb5cbaa37e94dab7
|
Loading…
Reference in a new issue