Store reporting struct in linphone call

parent e6524c1d
......@@ -1849,6 +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);
if (used_pt!=-1){
call->current_params.audio_codec = rtp_profile_get_payload(call->audio_profile, used_pt);
......@@ -1978,6 +1979,8 @@ 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);
if (used_pt!=-1){
VideoStreamDir dir=VideoStreamSendRecv;
MSWebCam *cam=lc->video_conf.device;
......
......@@ -34,6 +34,7 @@ extern "C" {
#include "linphonecore_utils.h"
#include "sal/sal.h"
#include "sipsetup.h"
#include "quality_reporting.h"
#include <belle-sip/object.h>
#include <belle-sip/dict.h>
......@@ -191,6 +192,10 @@ struct _LinphoneCall
StunCandidate ac,vc; /*audio video ip/port discovered by STUN*/
struct _AudioStream *audiostream; /**/
struct _VideoStream *videostream;
reporting_session_report_t *audio_reporting;
reporting_session_report_t *video_reporting;
MSAudioEndpoint *endpoint; /*used for conferencing*/
char *refer_to;
LinphoneCallParams params;
......
This diff is collapsed.
......@@ -25,6 +25,118 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef __cplusplus
extern "C"{
#endif
typedef struct reporting_addr {
char * ip;
int port;
uint32_t ssrc;
} reporting_addr_t;
typedef struct reporting_content_metrics {
// timestamps - mandatory
struct {
time_t start;
time_t stop;
} timestamps;
// session description - optional
struct {
int payload_type;
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 packet_loss_concealment; // in voip metrics - audio only
char * silence_suppression_state; // no
} session_description;
// jitter buffet - optional
struct {
int adaptive; // 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
} jitter_buffer;
// packet loss - optional
struct {
float network_packet_loss_rate; // voip metrics (loss rate) + conversion
float jitter_buffer_discard_rate; //idem
} packet_loss;
// burst gap loss - optional
// (no) currently not implemented
struct {
int burst_loss_density;
int burst_duration;
float gap_loss_density;
int gap_Duration;
int min_gap_threshold;
} burst_gap_loss;
// delay - optional
struct {
int round_trip_delay; // no - vary
int end_system_delay; // no - not implemented yet
int one_way_delay; // no
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
} delay;
// signal - optional
struct {
int level; // no - vary
int noise_level; // no - vary
int residual_echo_return_loss; // no
} signal;
// quality estimates - optional
struct {
int rlq; // linked to moslq - in [0..120]
int rcq; //voip metrics R factor - no - vary or avg in [0..120]
float moslq; // no - vary or avg - voip metrics - in [0..4.9]
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;
} quality_estimates;
} reporting_content_metrics_t;
typedef struct reporting_session_report {
struct {
char * call_id;
char * local_id;
char * remote_id;
char * orig_id;
reporting_addr_t local_addr;
reporting_addr_t remote_addr;
char * local_group;
char * remote_group;
char * local_mac_addr; // optional
char * remote_mac_addr; // optional
} info;
reporting_content_metrics_t local_metrics;
reporting_content_metrics_t remote_metrics; // optional
char * dialog_id; // optional
} reporting_session_report_t;
void linphone_quality_reporting_submit(LinphoneCall* call);
#ifdef __cplusplus
......
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