Commit 52d8d8c5 authored by Ghislain MARY's avatar Ghislain MARY

Show RTP profile in call statistics dialog.

parent 1946ccaa
......@@ -337,7 +337,7 @@ void linphone_call_increment_local_media_description(LinphoneCall *call){
md->session_ver++;
}
static SalMediaProto get_proto_from_call_params(LinphoneCallParams *params) {
static SalMediaProto get_proto_from_call_params(const LinphoneCallParams *params) {
if ((params->media_encryption == LinphoneMediaEncryptionSRTP) && params->avpf_enabled) return SalProtoRtpSavpf;
if (params->media_encryption == LinphoneMediaEncryptionSRTP) return SalProtoRtpSavp;
if (params->avpf_enabled) return SalProtoRtpAvpf;
......@@ -1280,6 +1280,10 @@ MSVideoSize linphone_call_params_get_received_video_size(const LinphoneCallParam
return cp->recv_vsize;
}
const char * linphone_call_params_get_rtp_profile(const LinphoneCallParams *cp) {
return sal_media_proto_to_string(get_proto_from_call_params(cp));
}
/**
* @ingroup call_control
* Use to know if this call has been configured in low bandwidth mode.
......
......@@ -429,6 +429,13 @@ LINPHONE_PUBLIC MSVideoSize linphone_call_params_get_sent_video_size(const Linph
*/
LINPHONE_PUBLIC MSVideoSize linphone_call_params_get_received_video_size(const LinphoneCallParams *cp);
/**
* Gets the RTP profile being used.
* @param[in] cp #LinphoneCallParams object
* @returns The RTP profile.
*/
LINPHONE_PUBLIC const char * linphone_call_params_get_rtp_profile(const LinphoneCallParams *cp);
/*
* Note for developers: this enum must be kept synchronized with the SalPrivacy enum declared in sal.h
......
This diff is collapsed.
......@@ -258,9 +258,12 @@ static void _refresh_call_stats(GtkWidget *callstats, LinphoneCall *call){
gboolean has_video=linphone_call_params_video_enabled(linphone_call_get_current_params(call));
MSVideoSize size_received = linphone_call_params_get_received_video_size(linphone_call_get_current_params(call));
MSVideoSize size_sent = linphone_call_params_get_sent_video_size(linphone_call_get_current_params(call));
gchar *tmp=g_strdup_printf(_("download: %f\nupload: %f (kbit/s)"),
const char *rtp_profile = linphone_call_params_get_rtp_profile(linphone_call_get_current_params(call));
gchar *tmp = g_strdup_printf("%s", rtp_profile);
gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(callstats,"rtp_profile")),tmp);
g_free(tmp);
tmp=g_strdup_printf(_("download: %f\nupload: %f (kbit/s)"),
as->download_bandwidth,as->upload_bandwidth);
gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(callstats,"audio_bandwidth_usage")),tmp);
g_free(tmp);
if (has_video){
......
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