Quality reporting: remove unimplemented fields and split content filling to an...

Quality reporting: remove unimplemented fields and split content filling to an one-field-at-a-time process
parent 3c71544b
......@@ -1849,7 +1849,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
playfile=lc->play_file;
recfile=lc->rec_file;
call->audio_profile=make_profile(call,call->resultdesc,stream,&used_pt);
call->audio_reporting=ms_new0(reporting_session_report_t,1);
call->reports[LINPHONE_CALL_STATS_AUDIO]=ms_new0(reporting_session_report_t,1);
if (used_pt!=-1){
call->current_params.audio_codec = rtp_profile_get_payload(call->audio_profile, used_pt);
......@@ -1979,7 +1979,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
const SalStreamDescription *local_st_desc=sal_media_description_find_stream(call->localdesc,vstream->proto,SalVideo);
call->video_profile=make_profile(call,call->resultdesc,vstream,&used_pt);
call->video_reporting=ms_new0(reporting_session_report_t,1);
call->reports[LINPHONE_CALL_STATS_VIDEO]=ms_new0(reporting_session_report_t,1);
if (used_pt!=-1){
VideoStreamDir dir=VideoStreamSendRecv;
......@@ -2752,6 +2752,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream);
linphone_reporting_call_stats_updated(call, LINPHONE_CALL_STATS_VIDEO);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);
} else if (evt == ORTP_EVENT_RTCP_PACKET_EMITTED) {
......@@ -2762,6 +2763,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LINPHONE_CALL_STATS_SENT_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream);
linphone_reporting_call_stats_updated(call, LINPHONE_CALL_STATS_VIDEO);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);
} else if ((evt == ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED) || (evt == ORTP_EVENT_ICE_GATHERING_FINISHED)
......@@ -2797,6 +2799,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream);
linphone_reporting_call_stats_updated(call, LINPHONE_CALL_STATS_AUDIO);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]);
} else if (evt == ORTP_EVENT_RTCP_PACKET_EMITTED) {
......@@ -2807,6 +2810,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LINPHONE_CALL_STATS_SENT_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream);
linphone_reporting_call_stats_updated(call, LINPHONE_CALL_STATS_AUDIO);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]);
} else if ((evt == ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED) || (evt == ORTP_EVENT_ICE_GATHERING_FINISHED)
......
......@@ -3470,7 +3470,7 @@ static void terminate_call(LinphoneCore *lc, LinphoneCall *call){
/*stop ringing*/
linphone_core_stop_ringing(lc);
linphone_quality_reporting_submit(call);
linphone_reporting_publish(call, LINPHONE_CALL_STATS_AUDIO);
linphone_call_stop_media_streams(call);
......
......@@ -193,8 +193,7 @@ struct _LinphoneCall
struct _AudioStream *audiostream; /**/
struct _VideoStream *videostream;
reporting_session_report_t *audio_reporting;
reporting_session_report_t *video_reporting;
reporting_session_report_t * reports[2];
MSAudioEndpoint *endpoint; /*used for conferencing*/
char *refer_to;
......
This diff is collapsed.
......@@ -45,12 +45,12 @@ typedef struct reporting_content_metrics {
char * payload_desc; // mime type
int sample_rate; // clock rate
int frame_duration; // to check (ptime?) - audio only
int frame_ocets; // no
int frames_per_sec; // no
int packets_per_sec; // no
char * fmtp; // pt.recv_fmtp
// int frame_ocets;
// int frames_per_sec;
// int packets_per_sec;
char * fmtp;
int packet_loss_concealment; // in voip metrics - audio only
char * silence_suppression_state; // no
// char * silence_suppression_state;
} session_description;
// jitter buffet - optional
......@@ -82,17 +82,17 @@ typedef struct reporting_content_metrics {
struct {
int round_trip_delay; // no - vary
int end_system_delay; // no - not implemented yet
int one_way_delay; // no
// int one_way_delay;
int symm_one_way_delay; // no - vary (depends on round_trip_delay) + not implemented (depends on end_system_delay)
int interarrival_jitter; // no - not implemented yet
int mean_abs_jitter; // (no)? - to check
int mean_abs_jitter; // to check
} delay;
// signal - optional
struct {
int level; // no - vary
int noise_level; // no - vary
int residual_echo_return_loss; // no
// int residual_echo_return_loss;
} signal;
// quality estimates - optional
......@@ -103,15 +103,15 @@ typedef struct reporting_content_metrics {
float moscq; // no - vary or avg - voip metrics - in [0..4.9]
int extri; // no
int extro; // no
char * rlqestalg; // no to all alg
char * rcqestalg;
char * moslqestalg;
char * moscqestalg;
char * extriestalg;
char * extroutestalg;
char * qoestalg;
// int extri;
// int extro;
// char * rlqestalg;
// char * rcqestalg;
// char * moslqestalg;
// char * moscqestalg;
// char * extriestalg;
// char * extroutestalg;
// char * qoestalg;
} quality_estimates;
} reporting_content_metrics_t;
......@@ -137,8 +137,8 @@ typedef struct reporting_session_report {
} reporting_session_report_t;
void linphone_quality_reporting_submit(LinphoneCall* call);
void linphone_reporting_publish(LinphoneCall* call, int stats_type);
void linphone_reporting_call_stats_updated(LinphoneCall *call, int stats_type);
#ifdef __cplusplus
}
#endif
......
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