From b285ff17c8f3f9d40c01cbb3f05c6c882d6e3ea3 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 26 Mar 2012 11:54:33 +0200 Subject: [PATCH] implement property to set video max recv buf size --- coreapi/linphonecall.c | 25 ++++++++++++++----------- mediastreamer2 | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 82d4e5098..4872a4cdc 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -898,18 +898,21 @@ void linphone_call_init_media_streams(LinphoneCall *call){ #ifdef VIDEO_ENABLED if ((lc->video_conf.display || lc->video_conf.capture) && md->streams[1].port>0){ + int video_recv_buf_size=lp_config_get_int(lc->config,"video","recv_buf_size",0); call->videostream=video_stream_new(md->streams[1].port,linphone_core_ipv6_enabled(lc)); - video_stream_enable_display_filter_auto_rotate(call->videostream, lp_config_get_int(lc->config,"video","display_filter_auto_rotate",0)); - 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->rtptf){ - RtpTransport *vrtp=lc->rtptf->video_rtp_func(lc->rtptf->video_rtp_func_data, call->video_port); - RtpTransport *vrtcp=lc->rtptf->video_rtcp_func(lc->rtptf->video_rtcp_func_data, call->video_port+1); - rtp_session_set_transports(call->videostream->session,vrtp,vrtcp); - } - call->videostream_app_evq = ortp_ev_queue_new(); - rtp_session_register_event_queue(call->videostream->session,call->videostream_app_evq); + video_stream_enable_display_filter_auto_rotate(call->videostream, lp_config_get_int(lc->config,"video","display_filter_auto_rotate",0)); + if (video_recv_buf_size>0) rtp_session_set_recv_buf_size(call->videostream->session,video_recv_buf_size); + + 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->rtptf){ + RtpTransport *vrtp=lc->rtptf->video_rtp_func(lc->rtptf->video_rtp_func_data, call->video_port); + RtpTransport *vrtcp=lc->rtptf->video_rtcp_func(lc->rtptf->video_rtcp_func_data, call->video_port+1); + rtp_session_set_transports(call->videostream->session,vrtp,vrtcp); + } + call->videostream_app_evq = ortp_ev_queue_new(); + rtp_session_register_event_queue(call->videostream->session,call->videostream_app_evq); #ifdef TEST_EXT_RENDERER video_stream_set_render_callback(call->videostream,rendercb,NULL); #endif diff --git a/mediastreamer2 b/mediastreamer2 index d1e350535..b2893aabe 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit d1e3505352c469f91333f65e43cda48560b26a91 +Subproject commit b2893aabe7f2ea65a084f60bdfde0962b680ab53