mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 06:38:08 +00:00
implement modifying of codecs fmtp within property box
This commit is contained in:
parent
64ef359675
commit
e1fb3d59ad
3 changed files with 39 additions and 6 deletions
|
|
@ -716,13 +716,21 @@ static PayloadType * find_payload(RtpProfile *prof, const char *mime_type, int c
|
|||
it=rtp_profile_get_payload(prof,i);
|
||||
if (it!=NULL && strcasecmp(mime_type,it->mime_type)==0
|
||||
&& (clock_rate==it->clock_rate || clock_rate<=0) ){
|
||||
if ( (recv_fmtp && it->recv_fmtp && strcasecmp(recv_fmtp,it->recv_fmtp)==0) ||
|
||||
if ( (recv_fmtp && it->recv_fmtp && strstr(recv_fmtp,it->recv_fmtp)!=NULL) ||
|
||||
(recv_fmtp==NULL && it->recv_fmtp==NULL) ){
|
||||
/*exact match*/
|
||||
if (recv_fmtp) payload_type_set_recv_fmtp(it,recv_fmtp);
|
||||
return it;
|
||||
}else candidate=it;
|
||||
}else {
|
||||
if (candidate){
|
||||
if (it->recv_fmtp==NULL) candidate=it;
|
||||
}else candidate=it;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (candidate && recv_fmtp){
|
||||
payload_type_set_recv_fmtp(candidate,recv_fmtp);
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook1">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -19,6 +20,7 @@
|
|||
<widget class="GtkVBox" id="network_tab">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkFrame" id="transport_frame">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -32,6 +34,7 @@
|
|||
<child>
|
||||
<widget class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -232,6 +235,7 @@
|
|||
<child>
|
||||
<widget class="GtkVButtonBox" id="vbuttonbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="no_nat">
|
||||
<property name="label" translatable="yes">Direct connection to the Internet</property>
|
||||
|
|
@ -251,6 +255,7 @@
|
|||
<child>
|
||||
<widget class="GtkVBox" id="vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="use_nat_address">
|
||||
<property name="label" translatable="yes">Behind NAT / Firewall (specify gateway IP below)</property>
|
||||
|
|
@ -307,6 +312,7 @@
|
|||
<child>
|
||||
<widget class="GtkVBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="use_stun">
|
||||
<property name="label" translatable="yes">Behind NAT / Firewall (use STUN to resolve)</property>
|
||||
|
|
@ -415,6 +421,7 @@
|
|||
<widget class="GtkVBox" id="multimedia_tab">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame14">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -447,7 +454,7 @@
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="play_ring">
|
||||
<property name="label" translatable="yes">gtk-media-play</property>
|
||||
<property name="label">gtk-media-play</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
|
|
@ -749,6 +756,7 @@
|
|||
<widget class="GtkVBox" id="sip_tab">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame11">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -892,6 +900,7 @@
|
|||
<widget class="GtkVButtonBox" id="vbuttonbox2">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="add_proxy">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -1189,6 +1198,7 @@ virtual network !</property>
|
|||
<widget class="GtkVBox" id="codec_tab">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame9">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -1203,6 +1213,7 @@ virtual network !</property>
|
|||
<widget class="GtkVBox" id="vbox8">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="codec_view">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -1246,9 +1257,10 @@ Video codecs</property>
|
|||
<widget class="GtkVButtonBox" id="vbuttonbox1">
|
||||
<property name="visible">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="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="button4">
|
||||
<property name="label" translatable="yes">gtk-go-up</property>
|
||||
<property name="label">gtk-go-up</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
|
|
@ -1264,7 +1276,7 @@ Video codecs</property>
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="up_codec">
|
||||
<property name="label" translatable="yes">gtk-go-down</property>
|
||||
<property name="label">gtk-go-down</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
|
|
@ -1642,7 +1654,6 @@ Video codecs</property>
|
|||
<widget class="GtkImage" id="image12">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-apply</property>
|
||||
<property name="icon-size">4</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
|
|
|
|||
|
|
@ -227,6 +227,17 @@ enum {
|
|||
CODEC_NCOLUMNS
|
||||
};
|
||||
|
||||
static void fmtp_edited(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer userdata){
|
||||
GtkListStore *store=(GtkListStore*)userdata;
|
||||
GtkTreeIter iter;
|
||||
if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(store),&iter,path)){
|
||||
PayloadType *pt;
|
||||
gtk_list_store_set(store,&iter,CODEC_PARAMS,new_text,-1);
|
||||
gtk_tree_model_get(GTK_TREE_MODEL(store),&iter,CODEC_PRIVDATA,&pt,-1);
|
||||
payload_type_set_recv_fmtp(pt,new_text);
|
||||
}
|
||||
}
|
||||
|
||||
static void linphone_gtk_init_codec_list(GtkTreeView *listview){
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
|
|
@ -268,11 +279,14 @@ static void linphone_gtk_init_codec_list(GtkTreeView *listview){
|
|||
"foreground",CODEC_COLOR,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (listview, column);
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Parameters"),
|
||||
renderer,
|
||||
"text", CODEC_PARAMS,
|
||||
"foreground",CODEC_COLOR,
|
||||
"editable",TRUE,
|
||||
NULL);
|
||||
g_signal_connect(G_OBJECT(renderer),"edited",G_CALLBACK(fmtp_edited),store);
|
||||
gtk_tree_view_append_column (listview, column);
|
||||
/* Setup the selection handler */
|
||||
select = gtk_tree_view_get_selection (listview);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue