Quality reporting: store struct in LinphoneLog instead of LinphoneCall, and...

Quality reporting: store struct in LinphoneLog instead of LinphoneCall, and added new/destroy methods
parent a1c1f301
......@@ -483,9 +483,6 @@ static void linphone_call_init_common(LinphoneCall *call, LinphoneAddress *from,
call->owns_call_log=TRUE;
call->camera_enabled=TRUE;
call->log->reports[LINPHONE_CALL_STATS_AUDIO]=linphone_reporting_new();
call->log->reports[LINPHONE_CALL_STATS_VIDEO]=linphone_reporting_new();
linphone_core_get_audio_port_range(call->core, &min_port, &max_port);
port_config_set(call,0,min_port,max_port);
......
......@@ -128,6 +128,9 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *fro
cl->to=to;
cl->status=LinphoneCallAborted; /*default status*/
cl->quality=-1;
cl->reports[LINPHONE_CALL_STATS_AUDIO]=linphone_reporting_new();
cl->reports[LINPHONE_CALL_STATS_VIDEO]=linphone_reporting_new();
return cl;
}
......@@ -391,6 +394,9 @@ void linphone_call_log_destroy(LinphoneCallLog *cl){
if (cl->to!=NULL) linphone_address_destroy(cl->to);
if (cl->refkey!=NULL) ms_free(cl->refkey);
if (cl->call_id) ms_free(cl->call_id);
if (cl->reports[LINPHONE_CALL_STATS_AUDIO]!=NULL) linphone_reporting_destroy(cl->reports[LINPHONE_CALL_STATS_AUDIO]);
if (cl->reports[LINPHONE_CALL_STATS_VIDEO]!=NULL) linphone_reporting_destroy(cl->reports[LINPHONE_CALL_STATS_VIDEO]);
ms_free(cl);
}
......
This diff is collapsed.
......@@ -56,7 +56,7 @@ typedef struct reporting_content_metrics {
// jitter buffet - optional
struct {
int adaptive; // constant
int rate; // constant
// int rate; // constant
int nominal; // no may vary during the call <- average? worst score?
int max; // no may vary during the call <- average?
int abs_max; // constant
......@@ -137,6 +137,7 @@ typedef struct reporting_session_report {
} reporting_session_report_t;
reporting_session_report_t * linphone_reporting_new();
void linphone_reporting_destroy(reporting_session_report_t * report);
reporting_session_report_t * linphone_reporting_update(LinphoneCall * call, int stats_type);
void linphone_reporting_publish(LinphoneCall* call);
void linphone_reporting_call_stats_updated(LinphoneCall *call, int stats_type);
......
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