Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
52d8d8c5
Commit
52d8d8c5
authored
Jun 04, 2014
by
Ghislain MARY
Browse files
Show RTP profile in call statistics dialog.
parent
1946ccaa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
107 additions
and
98 deletions
+107
-98
coreapi/linphonecall.c
coreapi/linphonecall.c
+5
-1
coreapi/linphonecore.h
coreapi/linphonecore.h
+7
-0
gtk/call_statistics.ui
gtk/call_statistics.ui
+90
-95
gtk/incall_view.c
gtk/incall_view.c
+5
-2
No files found.
coreapi/linphonecall.c
View file @
52d8d8c5
...
...
@@ -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.
...
...
coreapi/linphonecore.h
View file @
52d8d8c5
...
...
@@ -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
...
...
gtk/call_statistics.ui
View file @
52d8d8c5
<?xml version="1.0"
encoding="UTF-8"
?>
<?xml version="1.0"?>
<interface>
<requires
lib=
"gtk+"
version=
"2.16"
/>
<!-- interface-naming-policy project-wide -->
<object
class=
"GtkDialog"
id=
"call_statistics"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
5
</property>
<property
name=
"title"
translatable=
"yes"
>
Call statistics
</property>
<property
name=
"type_hint"
>
dialog
</property>
<signal
name=
"response"
handler=
"linphone_gtk_call_statistics_closed"
swapped=
"no"
/>
<signal
name=
"response"
handler=
"linphone_gtk_call_statistics_closed"
/>
<child
internal-child=
"vbox"
>
<object
class=
"GtkVBox"
id=
"dialog-vbox1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
2
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkHButtonBox"
id=
"dialog-action_area1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
<child>
<placeholder/>
</child>
<child>
<object
class=
"GtkButton"
id=
"button1"
>
<property
name=
"label"
>
gtk-close
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkFrame"
id=
"frame1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkTable"
id=
"table1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"n_rows"
>
9
</property>
<property
name=
"n_rows"
>
10
</property>
<property
name=
"n_columns"
>
2
</property>
<property
name=
"homogeneous"
>
True
</property>
<child>
<object
class=
"GtkLabel"
id=
"audio_codec_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Audio codec
</property>
</object>
<packing>
<property
name=
"x_options"
></property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"bottom_attach"
>
2
</property>
<property
name=
"x_options"
/>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_codec_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Video codec
</property>
</object>
<packing>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"bottom_attach"
>
2
</property>
<property
name=
"x_options"
></property
>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"bottom_attach"
>
3
</property>
<property
name=
"x_options"
/
>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label3"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Audio IP bandwidth usage
</property>
</object>
<packing>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"bottom_attach"
>
3
</property>
<property
name=
"x_options"
></property
>
<property
name=
"top_attach"
>
3
</property>
<property
name=
"bottom_attach"
>
4
</property>
<property
name=
"x_options"
/
>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"audio_codec"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"bottom_attach"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_codec"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"bottom_attach"
>
2
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"bottom_attach"
>
3
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"audio_bandwidth_usage"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"bottom_attach"
>
3
</property>
<property
name=
"top_attach"
>
3
</property>
<property
name=
"bottom_attach"
>
4
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label4"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Audio Media connectivity
</property>
</object>
<packing>
<property
name=
"top_attach"
>
4
</property>
<property
name=
"bottom_attach"
>
5
</property>
<property
name=
"x_options"
></property
>
<property
name=
"top_attach"
>
5
</property>
<property
name=
"bottom_attach"
>
6
</property>
<property
name=
"x_options"
/
>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"audio_media_connectivity"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
4
</property>
<property
name=
"bottom_attach"
>
5
</property>
<property
name=
"top_attach"
>
5
</property>
<property
name=
"bottom_attach"
>
6
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Video IP bandwidth usage
</property>
</object>
<packing>
<property
name=
"top_attach"
>
3
</property>
<property
name=
"bottom_attach"
>
4
</property>
<property
name=
"x_options"
></property
>
<property
name=
"top_attach"
>
4
</property>
<property
name=
"bottom_attach"
>
5
</property>
<property
name=
"x_options"
/
>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_bandwidth_usage"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
3
</property>
<property
name=
"bottom_attach"
>
4
</property>
<property
name=
"top_attach"
>
4
</property>
<property
name=
"bottom_attach"
>
5
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Video Media connectivity
</property>
</object>
<packing>
<property
name=
"top_attach"
>
5
</property>
<property
name=
"bottom_attach"
>
6
</property>
<property
name=
"top_attach"
>
6
</property>
<property
name=
"bottom_attach"
>
7
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_media_connectivity"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
5
</property>
<property
name=
"bottom_attach"
>
6
</property>
<property
name=
"top_attach"
>
6
</property>
<property
name=
"bottom_attach"
>
7
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label5"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Round trip time
</property>
</object>
<packing>
<property
name=
"top_attach"
>
6
</property>
<property
name=
"bottom_attach"
>
7
</property>
<property
name=
"top_attach"
>
7
</property>
<property
name=
"bottom_attach"
>
8
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"round_trip_time"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
6
</property>
<property
name=
"bottom_attach"
>
7
</property>
<property
name=
"top_attach"
>
7
</property>
<property
name=
"bottom_attach"
>
8
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_size_recv_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Video resolution received
</property>
</object>
<packing>
<property
name=
"top_attach"
>
7
</property>
<property
name=
"bottom_attach"
>
8
</property>
<property
name=
"top_attach"
>
8
</property>
<property
name=
"bottom_attach"
>
9
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_size_recv"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
7
</property>
<property
name=
"bottom_attach"
>
8
</property>
<property
name=
"top_attach"
>
8
</property>
<property
name=
"bottom_attach"
>
9
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_size_sent_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Video resolution sent
</property>
</object>
<packing>
<property
name=
"top_attach"
>
8
</property>
<property
name=
"bottom_attach"
>
9
</property>
<property
name=
"top_attach"
>
9
</property>
<property
name=
"bottom_attach"
>
10
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"video_size_sent"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
<property
name=
"top_attach"
>
8
</property>
<property
name=
"bottom_attach"
>
9
</property>
<property
name=
"top_attach"
>
9
</property>
<property
name=
"bottom_attach"
>
10
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"rtp_profile_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"label"
translatable=
"yes"
>
RTP profile
</property>
</object>
<packing>
<property
name=
"x_options"
/>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"rtp_profile"
>
<property
name=
"visible"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"right_attach"
>
2
</property>
</packing>
</child>
</object>
...
...
@@ -277,7 +245,6 @@
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"call_statistics_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
<
b
>
Call statistics and information
<
/b
>
</property>
<property
name=
"use_markup"
>
True
</property>
</object>
...
...
@@ -289,6 +256,34 @@
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child
internal-child=
"action_area"
>
<object
class=
"GtkHButtonBox"
id=
"dialog-action_area1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"layout_style"
>
end
</property>
<child>
<placeholder/>
</child>
<child>
<object
class=
"GtkButton"
id=
"button1"
>
<property
name=
"label"
>
gtk-close
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
</object>
</child>
<action-widgets>
...
...
gtk/incall_view.c
View file @
52d8d8c5
...
...
@@ -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
\n
upload: %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
\n
upload: %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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment