From d5bd254c30282c1a0d38044013484028ef979c9d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 7 Oct 2010 22:38:01 +0200 Subject: [PATCH 1/4] update ms2 --- coreapi/linphonecore.c | 2 +- mediastreamer2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 77e79b1a2..7befb6453 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3201,7 +3201,7 @@ int linphone_core_set_static_picture(LinphoneCore *lc, const char *path) { force the filter to use that picture. */ if (vs && vs->source) { if (ms_filter_get_id(vs->source) == MS_STATIC_IMAGE_ID) { - ms_filter_call_method(vs->source, MS_FILTER_SET_IMAGE, + ms_filter_call_method(vs->source, MS_STATIC_IMAGE_SET_IMAGE, (void *)path); } } diff --git a/mediastreamer2 b/mediastreamer2 index e13dd4167..6701e0744 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit e13dd416782fe85f25610471b9db117c0eecaf80 +Subproject commit 6701e074484fd6725b789b2854a2be5bd2784ef5 From 2a25598f8688b1b2053ed39f950aac8d1eebb38d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 7 Oct 2010 22:44:05 +0200 Subject: [PATCH 2/4] remove unused option --- configure.ac | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac index 13377bad6..34485363c 100644 --- a/configure.ac +++ b/configure.ac @@ -293,10 +293,6 @@ AC_ARG_WITH( ffmpeg, [ --with-ffmpeg Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ], [ ffmpegdir=${withval}],[ ffmpegdir=/usr ]) -AC_ARG_WITH( sdl, - [ --with-sdl Sets the installation prefix of libSDL, needed for video support. [default=/usr] ], - [ libsdldir=${withval}],[ libsdldir=/usr ]) - AC_ARG_ENABLE(x11, [ --disable-x11 Disable X11 support], [case "${enableval}" in From f3db122cd03bf836afbdbb3cecf17e648a0ceb13 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Oct 2010 09:05:23 +0200 Subject: [PATCH 3/4] apply linphonec patches --- console/commands.c | 2 +- console/linphonec.c | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/console/commands.c b/console/commands.c index 554b3c63a..51314ccb1 100644 --- a/console/commands.c +++ b/console/commands.c @@ -2225,7 +2225,7 @@ static int lpc_cmd_video_window(LinphoneCore *lc, char *args){ lpc_video_params.show=FALSE; lpc_video_params.refresh=TRUE; }else if (strcmp(subcommand,"id")==0){ - char envbuf[128]; + static char envbuf[128]; if (err == 1){ linphonec_out("vwindow id: 0x%x / SDL_WINDOWID='%s'\n",(unsigned int)lpc_video_params.wid, getenv("SDL_WINDOWID")); return 1; diff --git a/console/linphonec.c b/console/linphonec.c index 3fe95e6fd..fa169466c 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -193,7 +193,7 @@ LinphoneCall *linphonec_get_call(long id){ return call; } } - linphonec_out("Sorry, no call with id %i exists at this time.",id); + linphonec_out("Sorry, no call with id %i exists at this time.\n",id); return NULL; } @@ -209,7 +209,7 @@ LinphoneCall *linphonec_get_call(long id){ static void linphonec_display_refer (LinphoneCore * lc, const char *refer_to) { - linphonec_out("Receiving out of call refer to %s", refer_to); + linphonec_out("Receiving out of call refer to %s\n", refer_to); } /* @@ -319,7 +319,7 @@ linphonec_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, static void linphonec_call_updated(LinphoneCall *call){ const LinphoneCallParams *cp=linphone_call_get_current_params(call); if (!linphone_call_camera_enabled (call) && linphone_call_params_video_enabled (cp)){ - linphonec_out("Far end requests to share video.\nType 'camera on' if you agree."); + linphonec_out("Far end requests to share video.\nType 'camera on' if you agree.\n"); } } @@ -353,7 +353,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L if ( auto_answer) { answer_call=TRUE; } - linphonec_out("Receiving new incoming call from %s, assigned id %i", from,id); + linphonec_out("Receiving new incoming call from %s, assigned id %i\n", from,id); break; case LinphoneCallOutgoingInit: linphonec_call_identify(call); @@ -729,6 +729,10 @@ void linphonec_main_loop_exit(void){ void linphonec_finish(int exit_status) { + // Do not allow concurrent destroying to prevent glibc errors + static bool_t terminating=FALSE; + if (terminating) return; + terminating=TRUE; linphonec_out("Terminating...\n"); /* Terminate any pending call */ @@ -916,7 +920,9 @@ static void lpc_apply_video_params(){ if (wid!=0 && (lpc_video_params.refresh || prev_wid!=wid)){ lpc_video_params.refresh=FALSE; #ifdef HAVE_X11_XLIB_H - sdl_x11_apply_video_params(); + if (lpc_video_params.wid==0){ // do not manage window if embedded + sdl_x11_apply_video_params(); + } #endif } prev_wid=wid; From dea7a7661cbf7e95e476a7ddd9bf5449e3093c40 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Oct 2010 15:31:52 +0200 Subject: [PATCH 4/4] update ms2 and Android compilation --- build/android/Android.mk | 14 +++++++++++++- mediastreamer2 | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build/android/Android.mk b/build/android/Android.mk index 9ffa43192..c0e8df8a2 100755 --- a/build/android/Android.mk +++ b/build/android/Android.mk @@ -57,7 +57,10 @@ LOCAL_CFLAGS += \ -DLOG_DOMAIN=\"Linphone\" LOCAL_CFLAGS += -DIN_LINPHONE -#LOCAL_CFLAGS += -DVIDEO_ENABLED -DIN_LINPHONE + +ifeq ($(LINPHONE_VIDEO),1) +LOCAL_CFLAGS += -DVIDEO_ENABLED +endif LOCAL_C_INCLUDES += \ $(LOCAL_PATH) \ @@ -76,6 +79,15 @@ LOCAL_STATIC_LIBRARIES := \ libeXosip2 \ libosip2 \ libgsm + +ifeq ($(LINPHONE_VIDEO),1) +LOCAL_STATIC_LIBRARIES += \ + libavcodec \ + libswscale \ + libavcore \ + libavutil +endif + ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) LOCAL_CFLAGS += -DHAVE_ILBC=1 LOCAL_STATIC_LIBRARIES += libmsilbc diff --git a/mediastreamer2 b/mediastreamer2 index 6701e0744..20da8f413 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 6701e074484fd6725b789b2854a2be5bd2784ef5 +Subproject commit 20da8f413994f0959ab81b391894defa70eaa1f6