diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index b96efab44..88f8c221c 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2812,6 +2812,42 @@ uint64_t linphone_call_stats_get_late_packets_cumulative_number(const LinphoneCa return rtp_stats.outoftime; } +/** + * Get the bandwidth measurement of the received stream, expressed in kbit/s, including IP/UDP/RTP headers. + * @param[in] stats LinphoneCallStats object + * @return The bandwidth measurement of the received stream in kbit/s. + */ +float linphone_call_stats_get_download_bandwidth(const LinphoneCallStats *stats) { + return stats->download_bandwidth; +} + +/** + * Get the bandwidth measurement of the sent stream, expressed in kbit/s, including IP/UDP/RTP headers. + * @param[in] stats LinphoneCallStats object + * @return The bandwidth measurement of the sent stream in kbit/s. + */ +float linphone_call_stats_get_upload_bandwidth(const LinphoneCallStats *stats) { + return stats->upload_bandwidth; +} + +/** + * Get the state of ICE processing. + * @param[in] stats LinphoneCallStats object + * @return The state of ICE processing. + */ +LinphoneIceState linphone_call_stats_get_ice_state(const LinphoneCallStats *stats) { + return stats->ice_state; +} + +/** + * Get the state of uPnP processing. + * @param[in] stats LinphoneCallStats object + * @return The state of uPnP processing. + */ +LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *stats) { + return stats->upnp_state; +} + /** * Enable recording of the call (voice-only). * This function must be used before the call parameters are assigned to the call. diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index c37b87aec..5c1a971e6 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -641,6 +641,10 @@ LINPHONE_PUBLIC float linphone_call_stats_get_receiver_loss_rate(const LinphoneC LINPHONE_PUBLIC float linphone_call_stats_get_sender_interarrival_jitter(const LinphoneCallStats *stats, LinphoneCall *call); LINPHONE_PUBLIC float linphone_call_stats_get_receiver_interarrival_jitter(const LinphoneCallStats *stats, LinphoneCall *call); LINPHONE_PUBLIC uint64_t linphone_call_stats_get_late_packets_cumulative_number(const LinphoneCallStats *stats, LinphoneCall *call); +LINPHONE_PUBLIC float linphone_call_stats_get_download_bandwidth(const LinphoneCallStats *stats); +LINPHONE_PUBLIC float linphone_call_stats_get_upload_bandwidth(const LinphoneCallStats *stats); +LINPHONE_PUBLIC LinphoneIceState linphone_call_stats_get_ice_state(const LinphoneCallStats *stats); +LINPHONE_PUBLIC LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *stats); /** Callback prototype */ typedef void (*LinphoneCallCbFunc)(LinphoneCall *call,void * user_data);