diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index afe792887..d57ee984c 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -4149,6 +4149,10 @@ bool_t linphone_call_media_in_progress(LinphoneCall *call){ return ret; } +LinphoneStreamType linphone_call_stats_get_type(const LinphoneCallStats *stats) { + return stats->type; +} + float linphone_call_stats_get_sender_loss_rate(const LinphoneCallStats *stats) { const report_block_t *srb = NULL; @@ -4255,6 +4259,14 @@ LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *st return stats->upnp_state; } +LinphoneAddressFamily linphone_call_stats_get_ip_family_of_remote(const LinphoneCallStats *stats) { + return (LinphoneAddressFamily)stats->rtp_remote_family; +} + +float linphone_call_stats_get_jitter_buffer_size_ms(const LinphoneCallStats *stats) { + return stats->jitter_stats.jitter_buffer_size_ms; +} + void linphone_call_start_recording(LinphoneCall *call){ if (!call->params->record_file){ ms_error("linphone_call_start_recording(): no output file specified. Use linphone_call_params_set_record_file()."); diff --git a/include/linphone/call_stats.h b/include/linphone/call_stats.h index a56a71548..11044c1c6 100644 --- a/include/linphone/call_stats.h +++ b/include/linphone/call_stats.h @@ -68,6 +68,13 @@ struct _LinphoneCallStats { bool_t rtcp_received_via_mux; /*private flag, for non-regression test only*/ }; +/** + * Get the type of the stream the stats refer to. + * @param[in] stats LinphoneCallStats object + * @return The type of the stream the stats refer to + */ +LINPHONE_PUBLIC LinphoneStreamType linphone_call_stats_get_type(const LinphoneCallStats *stats); + /** * Get the local loss rate since last report * @return The sender loss rate @@ -131,6 +138,20 @@ LINPHONE_PUBLIC LinphoneIceState linphone_call_stats_get_ice_state(const Linphon */ LINPHONE_PUBLIC LinphoneUpnpState linphone_call_stats_get_upnp_state(const LinphoneCallStats *stats); +/** + * Get the IP address family of the remote peer. + * @param[in] stats LinphoneCallStats object + * @return The IP address family of the remote peer. + */ +LINPHONE_PUBLIC LinphoneAddressFamily linphone_call_stats_get_ip_family_of_remote(const LinphoneCallStats *stats); + +/** + * Get the jitter buffer size in ms. + * @param[in] stats LinphoneCallStats object + * @return The jitter buffer size in ms. + */ +LINPHONE_PUBLIC float linphone_call_stats_get_jitter_buffer_size_ms(const LinphoneCallStats *stats); + /** * @} */