forked from mirrors/linphone-iphone
implement and active adaptive rate control for audio & video.
This commit is contained in:
parent
f04f19adde
commit
7b3398d2ec
6 changed files with 59 additions and 34 deletions
|
|
@ -1092,7 +1092,9 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
|
|||
bool_t is_inactive=FALSE;
|
||||
|
||||
call->current_params.has_video=TRUE;
|
||||
|
||||
|
||||
video_stream_enable_adaptive_bitrate_control(call->videostream,
|
||||
linphone_core_adaptive_rate_control_enabled(lc));
|
||||
video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc));
|
||||
video_stream_enable_self_view(call->videostream,lc->video_conf.selfview);
|
||||
if (lc->video_window_id!=0)
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@ void linphone_core_enable_adaptive_rate_control(LinphoneCore *lc, bool_t enabled
|
|||
* See linphone_core_enable_adaptive_rate_control().
|
||||
**/
|
||||
bool_t linphone_core_adaptive_rate_control_enabled(const LinphoneCore *lc){
|
||||
return lp_config_get_int(lc->config,"net","adaptive_rate_control",FALSE);
|
||||
return lp_config_get_int(lc->config,"net","adaptive_rate_control",TRUE);
|
||||
}
|
||||
|
||||
bool_t linphone_core_rtcp_enabled(const LinphoneCore *lc){
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.16"/>
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="lower">500</property>
|
||||
<property name="upper">3001</property>
|
||||
|
|
@ -214,8 +213,6 @@
|
|||
<property name="can_focus">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<signal name="value-changed" handler="linphone_gtk_mtu_changed" swapped="no"/>
|
||||
</object>
|
||||
|
|
@ -334,8 +331,6 @@
|
|||
<property name="invisible_char_set">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">adjustment7</property>
|
||||
<signal name="value-changed" handler="linphone_gtk_update_my_port" swapped="no"/>
|
||||
</object>
|
||||
|
|
@ -353,8 +348,6 @@
|
|||
<property name="invisible_char_set">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
<signal name="value-changed" handler="linphone_gtk_video_port_changed" swapped="no"/>
|
||||
</object>
|
||||
|
|
@ -374,8 +367,6 @@
|
|||
<property name="invisible_char_set">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">adjustment3</property>
|
||||
<signal name="value-changed" handler="linphone_gtk_audio_port_changed" swapped="no"/>
|
||||
</object>
|
||||
|
|
@ -515,8 +506,6 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<signal name="changed" handler="linphone_gtk_nat_address_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -587,8 +576,6 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<signal name="changed" handler="linphone_gtk_stun_server_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -756,8 +743,6 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<signal name="editing-done" handler="linphone_gtk_alsa_special_device_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -1108,8 +1093,6 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<signal name="changed" handler="linphone_gtk_update_my_contact" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -1148,8 +1131,6 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<signal name="changed" handler="linphone_gtk_update_my_contact" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
@ -1167,8 +1148,6 @@
|
|||
<property name="editable">False</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
|
@ -1220,13 +1199,14 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="hscrollbar_policy">automatic</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="proxy_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
@ -1638,8 +1618,6 @@ virtual network !</property>
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="hscrollbar_policy">automatic</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<property name="shadow_type">out</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="codec_list">
|
||||
|
|
@ -1647,6 +1625,9 @@ virtual network !</property>
|
|||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection2"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
@ -1843,7 +1824,7 @@ virtual network !</property>
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="upload_bw">
|
||||
|
|
@ -1853,8 +1834,6 @@ virtual network !</property>
|
|||
<property name="tooltip_text" translatable="yes">0 stands for "unlimited"</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">adjustment5</property>
|
||||
<signal name="value-changed" handler="linphone_gtk_upload_bw_changed" swapped="no"/>
|
||||
</object>
|
||||
|
|
@ -1863,6 +1842,8 @@ virtual network !</property>
|
|||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
|
@ -1873,14 +1854,14 @@ virtual network !</property>
|
|||
<property name="tooltip_text" translatable="yes">0 stands for "unlimited"</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">adjustment6</property>
|
||||
<signal name="value-changed" handler="linphone_gtk_download_bw_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_EXPAND</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
|
@ -1905,6 +1886,41 @@ virtual network !</property>
|
|||
<property name="justify">right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="adaptive_rate_control">
|
||||
<property name="label" translatable="yes">Enable adaptive rate control</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="linphone_gtk_adaptive_rate_control_toggled" swapped="no"/>
|
||||
</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="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></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"><i>Adaptive rate control is a technique to dynamically guess the available bandwidth during a call.</i></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
|||
|
|
@ -453,6 +453,11 @@ void linphone_gtk_upload_bw_changed(GtkWidget *w){
|
|||
linphone_gtk_check_codec_bandwidth(v);
|
||||
}
|
||||
|
||||
void linphone_gtk_adaptive_rate_control_toggled(GtkToggleButton *button){
|
||||
gboolean active=gtk_toggle_button_get_active(button);
|
||||
linphone_core_enable_adaptive_rate_control(linphone_gtk_get_core(),active);
|
||||
}
|
||||
|
||||
static void linphone_gtk_codec_move(GtkWidget *button, int dir){
|
||||
GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
|
||||
GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
|
||||
|
|
@ -899,6 +904,8 @@ void linphone_gtk_show_parameters(void){
|
|||
linphone_core_get_download_bandwidth(lc));
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"upload_bw")),
|
||||
linphone_core_get_upload_bandwidth(lc));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"adaptive_rate_control")),
|
||||
linphone_core_adaptive_rate_control_enabled(lc));
|
||||
|
||||
|
||||
/* UI CONFIG */
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 3e62df330823c9efefaf314e894a6a7867f9ff76
|
||||
Subproject commit 954911c0dbdf7351cd82df70d0999a84d163db7f
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 0a878baa150133e35acdfb7082ccc99a54be41fe
|
||||
Subproject commit 3256179b911975ce7d3556f8e2c00b21881a84d2
|
||||
Loading…
Add table
Reference in a new issue