diff --git a/build/android/Android.mk b/build/android/Android.mk index 48a4c75be..4a2add8f6 100755 --- a/build/android/Android.mk +++ b/build/android/Android.mk @@ -83,11 +83,12 @@ LOCAL_STATIC_LIBRARIES := \ libgsm ifeq ($(LINPHONE_VIDEO),1) -LOCAL_STATIC_LIBRARIES += \ +LOCAL_SHARED_LIBRARIES += \ libavcodec \ libswscale \ libavcore \ - libavutil \ + libavutil +LOCAL_STATIC_LIBRARIES += \ libmsx264 \ libx264 endif diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 8959c01b9..c3264d99b 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -663,11 +663,14 @@ void linphone_call_init_media_streams(LinphoneCall *call){ rtp_session_set_transports(audiostream->session,lc->a_rtp,lc->a_rtcp); #ifdef VIDEO_ENABLED + if ((lc->video_conf.display || lc->video_conf.capture) && md->streams[1].port>0){ call->videostream=video_stream_new(md->streams[1].port,linphone_core_ipv6_enabled(lc)); if( lc->video_conf.displaytype != NULL) video_stream_set_display_filter_name(call->videostream,lc->video_conf.displaytype); video_stream_set_event_callback(call->videostream,video_stream_event_cb, call); + if (lc->v_rtp) + rtp_session_set_transports(call->videostream->session,lc->v_rtp,lc->v_rtcp); #ifdef TEST_EXT_RENDERER video_stream_set_render_callback(call->videostream,rendercb,NULL); #endif diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index a59597b30..c1139e88c 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -54,7 +54,6 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val); extern SalCallbacks linphone_sal_callbacks; - void lc_callback_obj_init(LCCallbackObj *obj,LinphoneCoreCbFunc func,void* ud) { obj->_func=func; @@ -3673,6 +3672,11 @@ void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, Rtp lc->a_rtcp=rtcp; } +void linphone_core_set_video_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp){ + lc->v_rtp=rtp; + lc->v_rtcp=rtcp; +} + /** * Retrieve RTP statistics regarding current call. * @param local RTP statistics computed locally. diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 6f3b48c01..dc6737566 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -981,6 +981,8 @@ void linphone_core_destroy(LinphoneCore *lc); /*for advanced users:*/ void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp); +void linphone_core_set_video_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp); + int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, rtp_stats_t *remote); diff --git a/coreapi/private.h b/coreapi/private.h index 2c3966a3b..08c9b6aac 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -411,6 +411,7 @@ struct _LinphoneCore VideoPreview *previewstream; struct _MSEventQueue *msevq; RtpTransport *a_rtp,*a_rtcp; + RtpTransport *v_rtp,*v_rtcp; MSList *bl_reqs; MSList *subscribers; /* unknown subscribers */ int minutes_away; diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index 1c04eb190..4504dcbea 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -24,6 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "private.h" #include "offeranswer.h" +// Necessary to make it linked +static void for_linker() { eXosip_transport_hook_register(NULL); } + static bool_t call_failure(Sal *sal, eXosip_event_t *ev); static void text_received(Sal *sal, eXosip_event_t *ev);