mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
add test about early media and ICE
This commit is contained in:
parent
e4d3a08bb2
commit
37b8bfcb33
4 changed files with 55 additions and 11 deletions
|
|
@ -4458,6 +4458,7 @@ LinphonePresenceModel * linphone_core_get_presence_model(const LinphoneCore *lc)
|
|||
* Get playback sound level in 0-100 scale.
|
||||
*
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
**/
|
||||
int linphone_core_get_play_level(LinphoneCore *lc)
|
||||
{
|
||||
|
|
@ -4468,6 +4469,7 @@ int linphone_core_get_play_level(LinphoneCore *lc)
|
|||
* Get ring sound level in 0-100 scale
|
||||
*
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
**/
|
||||
int linphone_core_get_ring_level(LinphoneCore *lc)
|
||||
{
|
||||
|
|
@ -4478,6 +4480,7 @@ int linphone_core_get_ring_level(LinphoneCore *lc)
|
|||
* Get sound capture level in 0-100 scale
|
||||
*
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
**/
|
||||
int linphone_core_get_rec_level(LinphoneCore *lc){
|
||||
return lc->sound_conf.rec_lev;
|
||||
|
|
@ -4487,6 +4490,7 @@ int linphone_core_get_rec_level(LinphoneCore *lc){
|
|||
* Set sound ring level in 0-100 scale
|
||||
*
|
||||
* @ingroup media_parameters
|
||||
* @deprecated
|
||||
**/
|
||||
void linphone_core_set_ring_level(LinphoneCore *lc, int level){
|
||||
MSSndCard *sndcard;
|
||||
|
|
@ -4560,7 +4564,7 @@ float linphone_core_get_playback_gain_db(LinphoneCore *lc) {
|
|||
|
||||
/**
|
||||
* Set sound playback level in 0-100 scale
|
||||
*
|
||||
* @deprecated
|
||||
* @ingroup media_parameters
|
||||
**/
|
||||
void linphone_core_set_play_level(LinphoneCore *lc, int level){
|
||||
|
|
@ -4572,7 +4576,7 @@ void linphone_core_set_play_level(LinphoneCore *lc, int level){
|
|||
|
||||
/**
|
||||
* Set sound capture level in 0-100 scale
|
||||
*
|
||||
* @deprecated
|
||||
* @ingroup media_parameters
|
||||
**/
|
||||
void linphone_core_set_rec_level(LinphoneCore *lc, int level)
|
||||
|
|
|
|||
|
|
@ -3213,26 +3213,27 @@ LINPHONE_PUBLIC void linphone_core_reload_sound_devices(LinphoneCore *lc);
|
|||
|
||||
LINPHONE_PUBLIC bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *device);
|
||||
LINPHONE_PUBLIC bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *device);
|
||||
LINPHONE_PUBLIC int linphone_core_get_ring_level(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_get_play_level(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_get_rec_level(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC void linphone_core_set_ring_level(LinphoneCore *lc, int level);
|
||||
LINPHONE_PUBLIC void linphone_core_set_play_level(LinphoneCore *lc, int level);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_ring_level(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_play_level(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_rec_level(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_ring_level(LinphoneCore *lc, int level);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_play_level(LinphoneCore *lc, int level);
|
||||
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_rec_level(LinphoneCore *lc, int level);
|
||||
LINPHONE_DEPRECATED char linphone_core_get_sound_source(LinphoneCore *lc);
|
||||
LINPHONE_DEPRECATED void linphone_core_set_sound_source(LinphoneCore *lc, char source);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_core_set_mic_gain_db(LinphoneCore *lc, float level);
|
||||
LINPHONE_PUBLIC float linphone_core_get_mic_gain_db(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC void linphone_core_set_playback_gain_db(LinphoneCore *lc, float level);
|
||||
LINPHONE_PUBLIC float linphone_core_get_playback_gain_db(LinphoneCore *lc);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_core_set_rec_level(LinphoneCore *lc, int level);
|
||||
LINPHONE_PUBLIC const char * linphone_core_get_ringer_device(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const char * linphone_core_get_playback_device(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const char * linphone_core_get_capture_device(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid);
|
||||
LINPHONE_PUBLIC int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid);
|
||||
LINPHONE_PUBLIC int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid);
|
||||
char linphone_core_get_sound_source(LinphoneCore *lc);
|
||||
void linphone_core_set_sound_source(LinphoneCore *lc, char source);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_core_stop_ringing(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC void linphone_core_set_ring(LinphoneCore *lc, const char *path);
|
||||
LINPHONE_PUBLIC const char *linphone_core_get_ring(const LinphoneCore *lc);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 888c00d18c79177d114fd050c8b6e688bb86d9a7
|
||||
Subproject commit c04430db7777cf8d93ddfd4d3789f677657e48bf
|
||||
|
|
@ -3241,6 +3241,44 @@ end:
|
|||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
||||
static void early_media_call_with_ice(void) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_early_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
LinphoneCall *marie_call;
|
||||
MSList *lcs = NULL;
|
||||
|
||||
lcs = ms_list_append(lcs, marie->lc);
|
||||
lcs = ms_list_append(lcs, pauline->lc);
|
||||
|
||||
/*in this test, pauline has ICE activated, marie not, but marie proposes early media.
|
||||
* We want to check that ICE processing is not disturbing early media*/
|
||||
linphone_core_set_firewall_policy(pauline->lc, LinphonePolicyUseIce);
|
||||
|
||||
linphone_core_invite_address(pauline->lc, marie->identity);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallIncomingReceived,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallIncomingEarlyMedia,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallOutgoingEarlyMedia,1,1000));
|
||||
|
||||
wait_for_until(pauline->lc,marie->lc,NULL,0,1000);
|
||||
|
||||
marie_call = linphone_core_get_current_call(marie->lc);
|
||||
|
||||
if (!marie_call) goto end;
|
||||
|
||||
linphone_core_accept_call(marie->lc, marie_call);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallConnected,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallConnected,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallStreamsRunning,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallStreamsRunning,1,3000));
|
||||
|
||||
end_call(marie, pauline);
|
||||
end:
|
||||
ms_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
||||
static void early_media_call_with_ringing(void){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_tcp_rc");
|
||||
|
|
@ -6125,6 +6163,7 @@ test_t call_tests[] = {
|
|||
TEST_NO_TAG("Call with media relay (random ports)", call_with_media_relay_random_ports),
|
||||
TEST_NO_TAG("Simple call compatibility mode", simple_call_compatibility_mode),
|
||||
TEST_NO_TAG("Early-media call", early_media_call),
|
||||
TEST_ONE_TAG("Early-media call with ICE", early_media_call_with_ice, "ICE"),
|
||||
TEST_NO_TAG("Early-media call with ringing", early_media_call_with_ringing),
|
||||
TEST_NO_TAG("Early-media call with updated media session", early_media_call_with_session_update),
|
||||
TEST_NO_TAG("Early-media call with updated codec", early_media_call_with_codec_update),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue