Commit 4da992ba authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Merge branch 'master' of git.linphone.org:mediastreamer2 into dev_avpf

parents 87d793b2 ea6872e6
......@@ -137,7 +137,6 @@ struct _MediaStream {
time_t start_time;
time_t last_iterate_time;
bool_t use_rc;
bool_t is_beginning;
bool_t owns_sessions;
bool_t pad[1];
/**
......
......@@ -192,6 +192,7 @@ void audio_stream_prepare_sound(AudioStream *stream, MSSndCard *playcard, MSSndC
audio_stream_unprepare_sound(stream);
stream->dummy=ms_filter_new(MS_RTP_RECV_ID);
rtp_session_set_payload_type(stream->ms.sessions.rtp_session,0);
rtp_session_enable_rtcp(stream->ms.sessions.rtp_session, FALSE);
ms_filter_call_method(stream->dummy,MS_RTP_RECV_SET_SESSION,stream->ms.sessions.rtp_session);
if (captcard && playcard){
......@@ -337,8 +338,10 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
rtp_session_set_profile(rtps,profile);
if (rem_rtp_port>0) rtp_session_set_remote_addr_full(rtps,rem_rtp_ip,rem_rtp_port,rem_rtcp_ip,rem_rtcp_port);
if (rem_rtcp_port<=0){
rtp_session_enable_rtcp(rtps,FALSE);
if (rem_rtcp_port > 0) {
rtp_session_enable_rtcp(rtps, TRUE);
} else {
rtp_session_enable_rtcp(rtps, FALSE);
}
rtp_session_set_payload_type(rtps,payload);
rtp_session_set_jitter_compensation(rtps,jitt_comp);
......@@ -521,7 +524,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
ms_message("Setting audio encoder network bitrate to [%i] on stream [%p]",stream->ms.target_bitrate,stream);
ms_filter_call_method(stream->ms.encoder,MS_FILTER_SET_BITRATE,&stream->ms.target_bitrate);
}
rtp_session_set_target_upload_bandwidth(stream->ms.sessions.rtp_session, stream->ms.target_bitrate);
rtp_session_set_target_upload_bandwidth(rtps, stream->ms.target_bitrate);
ms_filter_call_method(stream->ms.encoder,MS_FILTER_SET_NCHANNELS,&nchannels);
ms_filter_call_method(stream->ms.decoder,MS_FILTER_SET_SAMPLE_RATE,&sample_rate);
ms_filter_call_method(stream->ms.decoder,MS_FILTER_SET_NCHANNELS,&nchannels);
......@@ -652,7 +655,6 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
,NULL);
stream->ms.start_time=stream->last_packet_time=ms_time(NULL);
stream->ms.is_beginning=TRUE;
stream->ms.state=MSStreamStarted;
return 0;
......
......@@ -158,7 +158,6 @@ RtpSession * create_duplex_rtpsession(int loc_rtp_port, int loc_rtcp_port, bool_
rtp_session_signal_connect(rtpr, "timestamp_jump", (RtpCallback)rtp_session_resync, (long)NULL);
rtp_session_signal_connect(rtpr, "ssrc_changed", (RtpCallback)rtp_session_resync, (long)NULL);
rtp_session_set_ssrc_changed_threshold(rtpr, 0);
rtp_session_set_rtcp_report_interval(rtpr, 2500); /* At the beginning of the session send more reports. */
disable_checksums(rtp_session_get_rtp_socket(rtpr));
return rtpr;
}
......@@ -472,10 +471,6 @@ void media_stream_iterate(MediaStream *stream){
if (stream->ice_check_list) ice_check_list_process(stream->ice_check_list,stream->sessions.rtp_session);
/*we choose to update the quality indicator as much as possible, since local statistics can be computed realtime. */
if (stream->state==MSStreamStarted){
if (stream->is_beginning && (curtime-stream->start_time>15)){
rtp_session_set_rtcp_report_interval(stream->sessions.rtp_session,5000);
stream->is_beginning=FALSE;
}
if (stream->qi && curtime>stream->last_iterate_time) ms_quality_indicator_update_local(stream->qi);
}
stream->last_iterate_time=curtime;
......
......@@ -411,6 +411,11 @@ int video_stream_start (VideoStream *stream, RtpProfile *profile, const char *re
rtp_session_set_profile(rtps,profile);
if (rem_rtp_port>0)
rtp_session_set_remote_addr_full(rtps,rem_rtp_ip,rem_rtp_port,rem_rtcp_ip,rem_rtcp_port);
if (rem_rtcp_port > 0) {
rtp_session_enable_rtcp(rtps, TRUE);
} else {
rtp_session_enable_rtcp(rtps, FALSE);
}
rtp_session_set_payload_type(rtps,payload);
rtp_session_set_jitter_compensation(rtps,jitt_comp);
......@@ -595,7 +600,6 @@ int video_stream_start (VideoStream *stream, RtpProfile *profile, const char *re
if (stream->ms.sessions.ticker==NULL) media_stream_start_ticker(&stream->ms);
stream->ms.start_time=ms_time(NULL);
stream->ms.is_beginning=TRUE;
/* attach the graphs */
if (stream->source)
......@@ -611,6 +615,7 @@ void video_stream_prepare_video(VideoStream *stream){
video_stream_unprepare_video(stream);
stream->ms.rtprecv=ms_filter_new(MS_RTP_RECV_ID);
rtp_session_set_payload_type(stream->ms.sessions.rtp_session,0);
rtp_session_enable_rtcp(stream->ms.sessions.rtp_session, FALSE);
ms_filter_call_method(stream->ms.rtprecv,MS_RTP_RECV_SET_SESSION,stream->ms.sessions.rtp_session);
stream->ms.voidsink=ms_filter_new(MS_VOID_SINK_ID);
ms_filter_link(stream->ms.rtprecv,0,stream->ms.voidsink,0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment