forked from mirrors/linphone-iphone
add amr support on android
This commit is contained in:
parent
c7d35c8113
commit
bed44649e2
3 changed files with 45 additions and 3 deletions
|
|
@ -61,7 +61,8 @@ LOCAL_CFLAGS += \
|
|||
-DENABLE_TRACE \
|
||||
-DLINPHONE_VERSION=\"3.4.0\" \
|
||||
-DLINPHONE_PLUGINS_DIR=\"\\tmp\" \
|
||||
-DLOG_DOMAIN=$(MY_LOG_DOMAIN)
|
||||
-DLOG_DOMAIN=$(MY_LOG_DOMAIN) \
|
||||
-UNE_BONNE_PIPE_CA_FAIT_DU_BIEN
|
||||
|
||||
LOCAL_CFLAGS += -DIN_LINPHONE
|
||||
|
||||
|
|
@ -89,9 +90,17 @@ LOCAL_STATIC_LIBRARIES := \
|
|||
libortp \
|
||||
libeXosip2 \
|
||||
libosip2 \
|
||||
libgsm
|
||||
libgsm
|
||||
|
||||
|
||||
ifneq ($(BUILD_AMR),0)
|
||||
LOCAL_CFLAGS += -DHAVE_AMR
|
||||
|
||||
LOCAL_STATIC_LIBRARIES += \
|
||||
libmsamr \
|
||||
libopencoreamr
|
||||
endif
|
||||
|
||||
ifeq ($(LINPHONE_VIDEO),1)
|
||||
ifeq ($(BUILD_X264),1)
|
||||
LOCAL_STATIC_LIBRARIES += \
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ extern "C" void libmsilbc_init();
|
|||
#ifdef HAVE_X264
|
||||
extern "C" void libmsx264_init();
|
||||
#endif
|
||||
#ifdef HAVE_AMR
|
||||
extern "C" void libmsamr_init();
|
||||
#endif
|
||||
#endif /*ANDROID*/
|
||||
|
||||
static JavaVM *jvm=0;
|
||||
|
|
@ -339,6 +342,9 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_newLinphoneCore(JNIEnv*
|
|||
#endif
|
||||
#ifdef HAVE_X264
|
||||
libmsx264_init();
|
||||
#endif
|
||||
#ifdef HAVE_AMR
|
||||
libmsamr_init();
|
||||
#endif
|
||||
jlong nativePtr = (jlong)linphone_core_new( &ldata->vTable
|
||||
,userConfig
|
||||
|
|
@ -557,6 +563,24 @@ extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_listVideoPayloadTy
|
|||
return jCodecs;
|
||||
}
|
||||
|
||||
extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_listAudioPayloadTypes(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc) {
|
||||
const MSList* codecs = linphone_core_get_audio_codecs((LinphoneCore*)lc);
|
||||
int codecsCount = ms_list_size(codecs);
|
||||
jlongArray jCodecs = env->NewLongArray(codecsCount);
|
||||
jlong *jInternalArray = env->GetLongArrayElements(jCodecs, NULL);
|
||||
|
||||
for (int i = 0; i < codecsCount; i++ ) {
|
||||
jInternalArray[i] = (unsigned long) (codecs->data);
|
||||
codecs = codecs->next;
|
||||
}
|
||||
|
||||
env->ReleaseLongArrayElements(jCodecs, jInternalArray, 0);
|
||||
|
||||
return jCodecs;
|
||||
}
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_enablePayloadType(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
|
|||
|
|
@ -536,7 +536,16 @@ public interface LinphoneCore {
|
|||
|
||||
VideoSize getPreferredVideoSize();
|
||||
|
||||
PayloadType[] listVideoCodecs();
|
||||
/**
|
||||
* Returns the currently supported audio codecs, as PayloadType elements
|
||||
* @return
|
||||
*/
|
||||
PayloadType[] getAudioCodecs();
|
||||
/**
|
||||
* Returns the currently supported video codecs, as PayloadType elements
|
||||
* @return
|
||||
*/
|
||||
PayloadType[] getVideoCodecs();
|
||||
/**
|
||||
* enable signaling keep alive. small udp packet sent periodically to keep udp NAT association
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue