mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
add new test for ICE.
add possibility to change bitrate
This commit is contained in:
parent
0df1b49ec5
commit
cc5244f222
2 changed files with 63 additions and 0 deletions
|
|
@ -532,6 +532,23 @@ static void fmtp_edited(GtkCellRendererText *renderer, gchar *path, gchar *new_t
|
|||
}
|
||||
}
|
||||
|
||||
static void bitrate_edited(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer userdata){
|
||||
GtkListStore *store=(GtkListStore*)userdata;
|
||||
GtkTreeIter iter;
|
||||
float newbitrate=0;
|
||||
|
||||
if (!new_text) return;
|
||||
|
||||
if (sscanf(new_text, "%f", &newbitrate)!=1) return;
|
||||
|
||||
if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(store),&iter,path)){
|
||||
PayloadType *pt;
|
||||
gtk_list_store_set(store,&iter,CODEC_BITRATE,newbitrate,-1);
|
||||
gtk_tree_model_get(GTK_TREE_MODEL(store),&iter,CODEC_PRIVDATA,&pt,-1);
|
||||
linphone_core_set_payload_type_bitrate(linphone_gtk_get_core(), pt, (int)newbitrate);
|
||||
}
|
||||
}
|
||||
|
||||
static void linphone_gtk_init_codec_list(GtkTreeView *listview){
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
|
|
@ -571,7 +588,9 @@ static void linphone_gtk_init_codec_list(GtkTreeView *listview){
|
|||
renderer,
|
||||
"text", CODEC_BITRATE,
|
||||
"foreground",CODEC_COLOR,
|
||||
"editable",TRUE,
|
||||
NULL);
|
||||
g_signal_connect(G_OBJECT(renderer),"edited",G_CALLBACK(bitrate_edited),store);
|
||||
gtk_tree_view_append_column (listview, column);
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Parameters"),
|
||||
|
|
|
|||
|
|
@ -1904,6 +1904,49 @@ end:
|
|||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
||||
static void call_with_ice_video_added2(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
LinphoneVideoPolicy vpol={TRUE,TRUE};
|
||||
bool_t call_ok;
|
||||
|
||||
linphone_core_enable_video_capture(marie->lc, TRUE);
|
||||
linphone_core_enable_video_display(marie->lc, TRUE);
|
||||
|
||||
linphone_core_enable_video_capture(pauline->lc, TRUE);
|
||||
linphone_core_enable_video_display(pauline->lc, TRUE);
|
||||
|
||||
linphone_core_set_video_policy(pauline->lc,&vpol);
|
||||
vpol.automatically_accept=FALSE;
|
||||
vpol.automatically_initiate=FALSE;
|
||||
linphone_core_set_video_policy(marie->lc,&vpol);
|
||||
|
||||
linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce);
|
||||
linphone_core_set_firewall_policy(pauline->lc,LinphonePolicyUseIce);
|
||||
|
||||
if (1){
|
||||
linphone_core_set_audio_port(marie->lc,-1);
|
||||
linphone_core_set_video_port(marie->lc,-1);
|
||||
linphone_core_set_audio_port(pauline->lc,-1);
|
||||
linphone_core_set_video_port(pauline->lc,-1);
|
||||
}
|
||||
|
||||
CU_ASSERT_TRUE(call_ok=call(pauline,marie));
|
||||
if (!call_ok) goto end;
|
||||
CU_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection));
|
||||
CU_ASSERT_FALSE(linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(pauline->lc))));
|
||||
/*wait for ICE reINVITEs to complete*/
|
||||
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,2)
|
||||
&&
|
||||
wait_for(pauline->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
CU_ASSERT_TRUE(add_video(pauline,marie));
|
||||
CU_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection));
|
||||
end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
||||
|
||||
static void video_call_with_early_media_no_matching_audio_codecs(void) {
|
||||
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc");
|
||||
|
|
@ -3982,6 +4025,7 @@ test_t call_tests[] = {
|
|||
{ "Call with multiple early media", multiple_early_media },
|
||||
{ "Call with ICE from video to non-video", call_with_ice_video_to_novideo},
|
||||
{ "Call with ICE and video added", call_with_ice_video_added },
|
||||
{ "Call with ICE and video added 2", call_with_ice_video_added2 },
|
||||
{ "Video call with ICE accepted using call params",video_call_ice_params},
|
||||
{ "Video call recording", video_call_recording_test },
|
||||
{ "Snapshot", video_call_snapshot },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue