From 06575db0aeb84f7b23cc38a9aad3cf31364b2525 Mon Sep 17 00:00:00 2001 From: Johan Pascal Date: Thu, 20 Aug 2015 23:50:41 +0200 Subject: [PATCH] Add codec2 capabilities (when mscodec2 plugin is present) - update oRTP and ms2 --- build/android/Android.mk | 5 +++++ coreapi/linphonecore.c | 2 ++ coreapi/linphonecore_jni.cc | 6 ++++++ mediastreamer2 | 2 +- oRTP | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build/android/Android.mk b/build/android/Android.mk index 9fe43d362..9dfd049fa 100755 --- a/build/android/Android.mk +++ b/build/android/Android.mk @@ -173,6 +173,11 @@ LOCAL_CFLAGS += -DHAVE_SILK LOCAL_STATIC_LIBRARIES += libmssilk endif +ifeq ($(BUILD_CODEC2),1) +LOCAL_CFLAGS += -DHAVE_CODEC2 +LOCAL_STATIC_LIBRARIES += libcodec2 libmscodec2 +endif + ifneq ($(BUILD_WEBRTC_AECM)$(BUILD_WEBRTC_ISAC),00) LOCAL_CFLAGS += -DHAVE_WEBRTC LOCAL_STATIC_LIBRARIES += libmswebrtc diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 2dfe46e8c..618322a2b 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1565,6 +1565,8 @@ static void linphone_core_register_default_codecs(LinphoneCore *lc){ linphone_core_register_payload_type(lc,&payload_type_aal2_g726_24,NULL,FALSE); linphone_core_register_payload_type(lc,&payload_type_aal2_g726_32,NULL,FALSE); linphone_core_register_payload_type(lc,&payload_type_aal2_g726_40,NULL,FALSE); + linphone_core_register_payload_type(lc,&payload_type_codec2,NULL,FALSE); + diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 3f43bb41d..ab34a3604 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -58,6 +58,9 @@ extern "C" void libmsbcg729_init(); #ifdef HAVE_WEBRTC extern "C" void libmswebrtc_init(); #endif +#ifdef HAVE_CODEC2 +extern "C" void libmscodec2_init(); +#endif #include #endif /*ANDROID*/ @@ -1142,6 +1145,9 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_newLinphoneCore(JNIEnv* #ifdef HAVE_WEBRTC libmswebrtc_init(); #endif +#ifdef HAVE_CODEC2 + libmscodec2_init(); +#endif jobject core = env->NewGlobalRef(thiz); jlong nativePtr = (jlong)linphone_core_new(vTable, userConfig, factoryConfig, core); diff --git a/mediastreamer2 b/mediastreamer2 index 07eeb876c..588b22dba 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 07eeb876c23402422d23efa6880420fa0c90d35a +Subproject commit 588b22dba73d04fa523f14623fd9f38cb08cc86a diff --git a/oRTP b/oRTP index 714ae3311..8409812bd 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 714ae33119397055bc0509ea78a3651a3d1b58d5 +Subproject commit 8409812bdf023e5f0b10a2d0644d7bf96603d8d2