Commit cdc17ca0 authored by Ghislain MARY's avatar Ghislain MARY

Restore the smaller RTCP send interval at the beginning of a call.

parent 974f7ae2
......@@ -140,6 +140,7 @@ struct _MediaStream {
uint64_t last_packet_count;
time_t last_packet_time;
bool_t use_rc;
bool_t is_beginning;
bool_t owns_sessions;
bool_t pad;
/**
......
......@@ -716,6 +716,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
,NULL);
stream->ms.start_time=stream->ms.last_packet_time=ms_time(NULL);
stream->ms.is_beginning=TRUE;
stream->ms.state=MSStreamStarted;
return 0;
......
......@@ -159,6 +159,7 @@ 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;
}
......@@ -477,6 +478,10 @@ 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;
......
......@@ -732,6 +732,7 @@ 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)
......
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