void linphone_call_init_audio_stream(LinphoneCall *call){
LinphoneCore *lc=call->core;
AudioStream *audiostream;
- int dscp=lp_config_get_int(lc->config,"rtp","audio_dscp",-1);
+ int dscp=linphone_core_get_audio_dscp(lc);
call->audiostream=audiostream=audio_stream_new(call->audio_port,call->audio_port+1,linphone_core_ipv6_enabled(lc));
if (dscp!=-1)
if ((lc->video_conf.display || lc->video_conf.capture) && call->params.has_video){
int video_recv_buf_size=lp_config_get_int(lc->config,"video","recv_buf_size",0);
- int dscp=lp_config_get_int(lc->config,"rtp","video_dscp",-1);
+ int dscp=linphone_core_get_video_dscp(lc);
call->videostream=video_stream_new(call->video_port,call->video_port+1,linphone_core_ipv6_enabled(lc));
if (dscp!=-1)
sal_set_keepalive_period(lc->sal,lc->sip_conf.keepalive_period);
sal_use_one_matching_codec_policy(lc->sal,lp_config_get_int(lc->config,"sip","only_one_codec",0));
sal_use_double_registrations(lc->sal,lp_config_get_int(lc->config,"sip","use_double_registrations",1));
+ sal_set_dscp(lc->sal,linphone_core_get_sip_dscp(lc));
}
static void rtp_config_read(LinphoneCore *lc)
const char* linphone_core_get_device_identifier(const LinphoneCore *lc) {
return lc->device_id;
}
+
+/**
+ * Set the DSCP field for SIP signaling channel.
+ *
+ * @ingroup network_parameters
+ * * The DSCP defines the quality of service in IP packets.
+ *
+**/
+void linphone_core_set_sip_dscp(LinphoneCore *lc, int dscp){
+ sal_set_dscp(lc->sal,dscp);
+ if (linphone_core_ready(lc))
+ lp_config_set_int_hex(lc->config,"sip","dscp",dscp);
+}
+
+/**
+ * Get the DSCP field for SIP signaling channel.
+ *
+ * @ingroup network_parameters
+ * * The DSCP defines the quality of service in IP packets.
+ *
+**/
+int linphone_core_get_sip_dscp(const LinphoneCore *lc){
+ return lp_config_get_int(lc->config,"sip","dscp",0x1a);
+}
+
+/**
+ * Set the DSCP field for outgoing audio streams.
+ *
+ * @ingroup network_parameters
+ * The DSCP defines the quality of service in IP packets.
+ *
+**/
+void linphone_core_set_audio_dscp(LinphoneCore *lc, int dscp){
+ if (linphone_core_ready(lc))
+ lp_config_set_int_hex(lc->config,"rtp","audio_dscp",dscp);
+}
+
+/**
+ * Get the DSCP field for outgoing audio streams.
+ *
+ * @ingroup network_parameters
+ * The DSCP defines the quality of service in IP packets.
+ *
+**/
+int linphone_core_get_audio_dscp(const LinphoneCore *lc){
+ return lp_config_get_int(lc->config,"rtp","audio_dscp",0x2e);
+}
+
+/**
+ * Set the DSCP field for outgoing video streams.
+ *
+ * @ingroup network_parameters
+ * The DSCP defines the quality of service in IP packets.
+ *
+**/
+void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp){
+ if (linphone_core_ready(lc))
+ lp_config_set_int_hex(lc->config,"rtp","video_dscp",dscp);
+
+}
+
+/**
+ * Get the DSCP field for outgoing video streams.
+ *
+ * @ingroup network_parameters
+ * The DSCP defines the quality of service in IP packets.
+ *
+**/
+int linphone_core_get_video_dscp(const LinphoneCore *lc){
+ return lp_config_get_int(lc->config,"rtp","video_dscp",0x2e);
+}
void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
+void linphone_core_set_sip_dscp(LinphoneCore *lc, int dscp);
+int linphone_core_get_sip_dscp(const LinphoneCore *lc);
+
+void linphone_core_set_audio_dscp(LinphoneCore *lc, int dscp);
+int linphone_core_get_audio_dscp(const LinphoneCore *lc);
+
+void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp);
+int linphone_core_get_video_dscp(const LinphoneCore *lc);
+
#ifdef __cplusplus
}
#endif
int lp_config_get_int(LpConfig *lpconfig,const char *section, const char *key, int default_value){
const char *str=lp_config_get_string(lpconfig,section,key,NULL);
- if (str!=NULL) return atoi(str);
+ if (str!=NULL) {
+ int ret=0;
+ if (strstr(str,"0x")==str){
+ sscanf(str,"%x",&ret);
+ }else ret=atoi(str);
+ return ret;
+ }
else return default_value;
}
lp_config_set_string(lpconfig,section,key,tmp);
}
+void lp_config_set_int_hex(LpConfig *lpconfig,const char *section, const char *key, int value){
+ char tmp[30];
+ snprintf(tmp,sizeof(tmp),"0x%x",value);
+ lp_config_set_string(lpconfig,section,key,tmp);
+}
+
void lp_config_set_int64(LpConfig *lpconfig,const char *section, const char *key, int64_t value){
char tmp[30];
snprintf(tmp,sizeof(tmp),"%lli",(long long)value);
* @ingroup misc
**/
void lp_config_set_int(LpConfig *lpconfig,const char *section, const char *key, int value);
+
+/**
+ * Sets an integer config item, but store it as hexadecimal
+ *
+ * @ingroup misc
+**/
+void lp_config_set_int_hex(LpConfig *lpconfig,const char *section, const char *key, int value);
+
/**
* Sets a 64 bits integer config item
*
void sal_set_callbacks(Sal *ctx, const SalCallbacks *cbs);
int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int is_secure);
int sal_unlisten_ports(Sal *ctx);
+void sal_set_dscp(Sal *ctx, int dscp);
int sal_reset_transports(Sal *ctx);
ortp_socket_t sal_get_socket(Sal *ctx);
void sal_set_user_agent(Sal *ctx, const char *user_agent);
sal->rootCa = 0;
sal->verify_server_certs=TRUE;
sal->expire_old_contact=FALSE;
+ sal->dscp=-1;
return sal;
}
#endif
}
+void sal_set_dscp(Sal *ctx, int dscp){
+ ctx->dscp=dscp;
+ if (dscp!=-1)
+ eXosip_set_option(EXOSIP_OPT_SET_DSCP,&ctx->dscp);
+}
+
int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int is_secure){
int err;
bool_t ipv6;
eXosip_set_option(EXOSIP_OPT_USE_RPORT,&use_rports);
int dont_use_101 = !ctx->use_101; // Copy char to int to avoid bad alignment
eXosip_set_option(EXOSIP_OPT_DONT_SEND_101,&dont_use_101);
+ sal_set_dscp(ctx,ctx->dscp);
ipv6=strchr(addr,':')!=NULL;
eXosip_enable_ipv6(ipv6);
int keepalive_period;
void *up; /*user pointer*/
char* rootCa; /* File _or_ folder containing root CA */
+ int dscp;
bool_t one_matching_codec;
bool_t double_reg;
bool_t use_rports;
log.ui \
buddylookup.ui \
tunnel_config.ui \
- waiting.ui
+ waiting.ui \
+ dscp_settings.ui
PIXMAPS= \
stock_people.png
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkDialog" id="dscp_settings">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Dscp settings</property>
+ <property name="modal">True</property>
+ <property name="type_hint">dialog</property>
+ <signal name="response" handler="linphone_gtk_dscp_edit_response" swapped="no"/>
+ <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>
+ <object class="GtkButton" id="button2">
+ <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">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label">gtk-ok</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="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkEntry" id="sip_dscp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <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>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="audio_dscp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <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>
+ </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="GtkEntry" id="video_dscp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">•</property>
+ <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>
+ </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>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">SIP</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Audio RTP stream</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</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">Video RTP stream</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Set DSCP values (in hexadecimal)</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">button2</action-widget>
+ <action-widget response="-5">button1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
<child>
<object class="GtkCheckButton" id="mtu_set">
<property name="label" translatable="yes">Set Maximum Transmission Unit:</property>
- <property name="use_action_appearance">False</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="draw_indicator">True</property>
<signal name="toggled" handler="linphone_gtk_mtu_set" swapped="no"/>
</object>
<child>
<object class="GtkCheckButton" id="dtmf_sipinfo">
<property name="label" translatable="yes">Send DTMFs as SIP info</property>
- <property name="use_action_appearance">False</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="draw_indicator">True</property>
<signal name="toggled" handler="linphone_gtk_use_sip_info_dtmf_toggled" swapped="no"/>
</object>
<child>
<object class="GtkCheckButton" id="ipv6_enabled">
<property name="label" translatable="yes">Use IPv6 instead of IPv4</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="linphone_gtk_ipv6_toggled" swapped="no"/>
</object>
<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">5</property>
+ <property name="n_rows">6</property>
<property name="n_columns">2</property>
<child>
<object class="GtkComboBox" id="proto_combo">
<property name="label" translatable="yes">Tunnel</property>
</object>
<packing>
- <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="GtkButton" id="tunnel_edit_button">
- <property name="label" translatable="yes">edit</property>
- <property name="use_action_appearance">False</property>
+ <property name="label">gtk-edit</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>
<signal name="clicked" handler="linphone_gtk_edit_tunnel" swapped="no"/>
</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>
<property name="bottom_attach">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">DSCP fields</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="dscp_edit_button">
+ <property name="label">gtk-edit</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>
+ <signal name="clicked" handler="linphone_gtk_dscp_edit" swapped="no"/>
+ </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>
+ </packing>
+ </child>
</object>
</child>
</object>
<child>
<object class="GtkRadioButton" id="no_nat">
<property name="label" translatable="yes">Direct connection to the Internet</property>
- <property name="use_action_appearance">False</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="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="linphone_gtk_no_firewall_toggled" swapped="no"/>
<child>
<object class="GtkRadioButton" id="use_nat_address">
<property name="label" translatable="yes">Behind NAT / Firewall (specify gateway IP below)</property>
- <property name="use_action_appearance">False</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="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">no_nat</property>
<child>
<object class="GtkRadioButton" id="use_stun">
<property name="label" translatable="yes">Behind NAT / Firewall (use STUN to resolve)</property>
- <property name="use_action_appearance">False</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="draw_indicator">True</property>
<property name="group">no_nat</property>
<signal name="toggled" handler="linphone_gtk_use_stun_toggled" swapped="no"/>
<child>
<object class="GtkRadioButton" id="use_ice">
<property name="label" translatable="yes">Behind NAT / Firewall (use ICE)</property>
- <property name="use_action_appearance">False</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="draw_indicator">True</property>
<property name="group">no_nat</property>
<signal name="toggled" handler="linphone_gtk_use_ice_toggled" swapped="no"/>
<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">6</property>
<property name="n_columns">2</property>
- <child>
- <placeholder/>
- </child>
<child>
<object class="GtkHBox" id="ring_sound_box">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="play_ring">
<property name="label">gtk-media-play</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="linphone_gtk_play_ring_file" swapped="no"/>
</object>
<child>
<object class="GtkCheckButton" id="echo_cancelation">
<property name="label" translatable="yes">Enable echo cancellation</property>
- <property name="use_action_appearance">False</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="draw_indicator">True</property>
<signal name="toggled" handler="linphone_gtk_echo_cancelation_toggled" swapped="no"/>
</object>
<property name="bottom_attach">6</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkButton" id="wizard">
- <property name="use_action_appearance">False</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>
<signal name="clicked" handler="linphone_gtk_display_wizard" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox5">
</child>
<child>
<object class="GtkButton" id="add_proxy">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_add_proxy" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox14">
</child>
<child>
<object class="GtkButton" id="edit_proxy">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_edit_proxy" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox16">
</child>
<child>
<object class="GtkButton" id="remove_proxy">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_remove_proxy" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox7">
</child>
<child>
<object class="GtkButton" id="create_phonics">
- <property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_create_fonics_account" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox1">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkButton" id="erase_passwords">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_clear_passwords" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox18">
<child>
<object class="GtkButton" id="button4">
<property name="label">gtk-go-up</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="linphone_gtk_codec_up" swapped="no"/>
</object>
<child>
<object class="GtkButton" id="up_codec">
<property name="label">gtk-go-down</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="linphone_gtk_codec_down" swapped="no"/>
</object>
</child>
<child>
<object class="GtkButton" id="enable_codec">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_codec_enable" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox8">
</child>
<child>
<object class="GtkButton" id="disable_codec">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_codec_disable" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox9">
<child>
<object class="GtkCheckButton" id="adaptive_rate_control">
<property name="label" translatable="yes">Enable adaptive rate control</property>
- <property name="use_action_appearance">False</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"/>
<child>
<object class="GtkCheckButton" id="ui_level">
<property name="label" translatable="yes">Show advanced settings</property>
- <property name="use_action_appearance">False</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="draw_indicator">True</property>
<signal name="toggled" handler="linphone_gtk_ui_level_toggled" swapped="no"/>
</object>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button5">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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="use_action_appearance">False</property>
<signal name="clicked" handler="linphone_gtk_parameters_closed" swapped="no"/>
<child>
<object class="GtkHBox" id="hbox3">
void linphone_gtk_tunnel_cancel(GtkButton *button){
}
+
+static void show_dscp(GtkWidget *entry, int val){
+ char tmp[20];
+ snprintf(tmp,sizeof(tmp),"0x%x",val);
+ gtk_entry_set_text(GTK_ENTRY(entry),tmp);
+
+}
+
+static int read_dscp(GtkWidget *entry){
+ const char *val=gtk_entry_get_text(GTK_ENTRY(entry));
+ const char *begin;
+ int ret=0;
+ if (val==NULL || val[0]=='\0') return 0;
+ /*skip potential 0x*/
+ begin=strstr(val,"0x");
+ if (begin) begin+=2;
+ else begin=val;
+ if (sscanf(begin,"%x",&ret)==1)
+ return ret;
+ return -1;
+}
+
+void linphone_gtk_dscp_edit(){
+ LinphoneCore *lc=linphone_gtk_get_core();
+ GtkWidget *widget=linphone_gtk_create_window("dscp_settings");
+ show_dscp(linphone_gtk_get_widget(widget,"sip_dscp"),
+ linphone_core_get_sip_dscp(lc));
+ show_dscp(linphone_gtk_get_widget(widget,"audio_dscp"),
+ linphone_core_get_audio_dscp(lc));
+ show_dscp(linphone_gtk_get_widget(widget,"video_dscp"),
+ linphone_core_get_video_dscp(lc));
+ gtk_widget_show(widget);
+}
+
+void linphone_gtk_dscp_edit_response(GtkWidget *dialog, guint response_id){
+ LinphoneCore *lc=linphone_gtk_get_core();
+ switch(response_id){
+ case GTK_RESPONSE_OK:
+ linphone_core_set_sip_dscp(lc,
+ read_dscp(linphone_gtk_get_widget(dialog,"sip_dscp")));
+ linphone_core_set_audio_dscp(lc,
+ read_dscp(linphone_gtk_get_widget(dialog,"audio_dscp")));
+ linphone_core_set_video_dscp(lc,
+ read_dscp(linphone_gtk_get_widget(dialog,"video_dscp")));
+
+ break;
+ default:
+ break;
+ }
+ gtk_widget_destroy(dialog);
+}
+