From 0e2446c0b68d1143011921246b1505e17956fdc5 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 18 Mar 2014 16:15:32 +0100 Subject: [PATCH] Indicate what RTCP packet has been updated in the LinphoneCallStats structure. --- coreapi/linphonecall.c | 4 ++++ coreapi/linphonecore.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 8568910f7..d5c0bdf3c 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2691,6 +2691,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp); call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp = evd->packet; evd->packet = NULL; + call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LinphoneCallStatsReceivedRTCPUpdate; update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]); @@ -2700,6 +2701,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp); call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp = evd->packet; evd->packet = NULL; + call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LinphoneCallStatsSentRTCPUpdate; update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]); @@ -2734,6 +2736,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp); call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp = evd->packet; evd->packet = NULL; + call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LinphoneCallStatsReceivedRTCPUpdate; update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]); @@ -2743,6 +2746,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp); call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp = evd->packet; evd->packet = NULL; + call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LinphoneCallStatsSentRTCPUpdate; update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 9d3ecb455..5a303bb19 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -564,6 +564,19 @@ enum _LinphoneUpnpState{ typedef enum _LinphoneUpnpState LinphoneUpnpState; +/** + * Enum describing what has been updated in a LinphoneCallStats object. +**/ +typedef enum _LinphoneCallStatsRTCPUpdate LinphoneCallStatsRTCPUpdate; + +/** + * Enum describing what has been updated in a LinphoneCallStats object. +**/ +enum _LinphoneCallStatsRTCPUpdate { + LinphoneCallStatsReceivedRTCPUpdate, /**< received_rtcp field of LinphoneCallStats object has been updated */ + LinphoneCallStatsSentRTCPUpdate /**< sent_rtcp field of LinphoneCallStats object has been updated */ +}; + /** * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams. * @@ -594,6 +607,7 @@ struct _LinphoneCallStats { float upload_bandwidth; /**