Commit 574f4924 authored by Simon Morlat's avatar Simon Morlat
Browse files

add support for retrieving RTP statistics.

parent f159efb8
......@@ -379,6 +379,23 @@ char * linphone_call_log_to_str(LinphoneCallLog *cl){
return tmp;
* Returns RTP statistics computed locally regarding the call.
const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog *cl){
return &cl->local_stats;
* Returns RTP statistics computed by remote end and sent back via RTCP.
* @note Not implemented yet.
const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl){
return &cl->remote_stats;
void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up){
......@@ -3354,6 +3371,28 @@ void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, Rtp
* Retrieve RTP statistics regarding current call.
* @param local RTP statistics computed locally.
* @param remote RTP statistics computed by far end (obtained via RTCP feedback).
* @note Remote RTP statistics is not implemented yet.
* @returns 0 or -1 if no call is running.
int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, rtp_stats_t *remote){
LinphoneCall *call=linphone_core_get_current_call (lc);
if (call!=NULL){
if (lc->audiostream!=NULL){
audio_stream_get_local_rtp_stats (lc->audiostream,local);
return 0;
return -1;
void net_config_uninit(LinphoneCore *lc)
net_config_t *config=&lc->net_conf;
......@@ -127,6 +127,8 @@ typedef struct _LinphoneCallLog{
int duration; /**<Duration of the call in seconds*/
char *refkey;
void *user_pointer;
rtp_stats_t local_stats;
rtp_stats_t remote_stats;
struct _LinphoneCore *lc;
} LinphoneCallLog;
......@@ -137,6 +139,8 @@ void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up);
void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl);
void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey);
const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl);
const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog *cl);
const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl);
char * linphone_call_log_to_str(LinphoneCallLog *cl);
typedef enum{
......@@ -785,6 +789,8 @@ void linphone_core_destroy(LinphoneCore *lc);
/*for advanced users:*/
void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp);
int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, rtp_stats_t *remote);
#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