Add some API to get information from a LinphoneCallStats object.

This commit is contained in:
Ghislain MARY 2014-09-01 11:33:44 +02:00
parent 6639e57535
commit 6fab974ad7
2 changed files with 40 additions and 0 deletions

View file

@ -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.

View file

@ -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);