Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
b025abb6
Commit
b025abb6
authored
Oct 08, 2015
by
Ghislain MARY
Browse files
Fix useless media restart on ICE re-invite.
parent
733ce6a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
coreapi/linphonecall.c
coreapi/linphonecall.c
+2
-0
coreapi/private.h
coreapi/private.h
+1
-0
coreapi/sal.c
coreapi/sal.c
+4
-4
tester/call_tester.c
tester/call_tester.c
+12
-0
No files found.
coreapi/linphonecall.c
View file @
b025abb6
...
...
@@ -3353,6 +3353,8 @@ void linphone_call_start_media_streams(LinphoneCall *call, LinphoneCallState nex
ms_fatal
(
"start_media_stream() called without prior init !"
);
return
;
}
call
->
nb_media_starts
++
;
#if defined(VIDEO_ENABLED)
if
(
vstream
!=
NULL
&&
vstream
->
dir
!=
SalStreamInactive
&&
vstream
->
payloads
!=
NULL
){
/*when video is used, do not make adaptive rate control on audio, it is stupid.*/
...
...
coreapi/private.h
View file @
b025abb6
...
...
@@ -302,6 +302,7 @@ struct _LinphoneCall{
int
localdesc_changed
;
/*not a boolean, contains a mask representing changes*/
LinphonePlayer
*
player
;
unsigned
long
bg_task_id
;
/*used to prevent device to suspend app while a call is received in background*/
unsigned
int
nb_media_starts
;
char
*
dtmf_sequence
;
/*DTMF sequence needed to be sent using #dtmfs_timer*/
belle_sip_source_t
*
dtmfs_timer
;
/*DTMF timer needed to send a DTMF sequence*/
...
...
coreapi/sal.c
View file @
b025abb6
...
...
@@ -328,8 +328,8 @@ int sal_stream_description_equals(const SalStreamDescription *sd1, const SalStre
if
(
sd1
->
dir
!=
sd2
->
dir
)
result
|=
SAL_MEDIA_DESCRIPTION_CODEC_CHANGED
;
/* ICE */
if
(
sd1
->
ice_ufrag
!=
sd2
->
ice_ufrag
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
if
(
sd1
->
ice_pwd
!=
sd2
->
ice_pwd
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
if
(
strcmp
(
sd1
->
ice_ufrag
,
sd2
->
ice_ufrag
)
!=
0
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
if
(
strcmp
(
sd1
->
ice_pwd
,
sd2
->
ice_pwd
)
!=
0
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
/*DTLS*/
if
(
sd1
->
dtls_role
!=
sd2
->
dtls_role
)
result
|=
SAL_MEDIA_DESCRIPTION_CRYPTO_KEYS_CHANGED
;
...
...
@@ -390,8 +390,8 @@ int sal_media_description_equals(const SalMediaDescription *md1, const SalMediaD
if
(
md1
->
bandwidth
!=
md2
->
bandwidth
)
result
|=
SAL_MEDIA_DESCRIPTION_CODEC_CHANGED
;
/* ICE */
if
(
md1
->
ice_ufrag
!=
md2
->
ice_ufrag
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
if
(
md1
->
ice_pwd
!=
md2
->
ice_pwd
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
if
(
strcmp
(
md1
->
ice_ufrag
,
md2
->
ice_ufrag
)
!=
0
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
if
(
strcmp
(
md1
->
ice_pwd
,
md2
->
ice_pwd
)
!=
0
)
result
|=
SAL_MEDIA_DESCRIPTION_ICE_RESTART_DETECTED
;
for
(
i
=
0
;
i
<
SAL_MEDIA_DESCRIPTION_MAX_STREAMS
;
++
i
){
if
(
!
sal_stream_description_active
(
&
md1
->
streams
[
i
])
&&
!
sal_stream_description_active
(
&
md2
->
streams
[
i
]))
continue
;
...
...
tester/call_tester.c
View file @
b025abb6
...
...
@@ -1087,11 +1087,23 @@ static void _call_with_ice_base(LinphoneCoreManager* pauline,LinphoneCoreManager
return
;
if
(
callee_with_ice
&&
caller_with_ice
)
{
LinphoneCall
*
c1
,
*
c2
;
/*wait for the ICE reINVITE to complete*/
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneCallStreamsRunning
,
2
));
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneCallStreamsRunning
,
2
));
BC_ASSERT_TRUE
(
check_ice
(
pauline
,
marie
,
LinphoneIceStateHostConnection
));
c1
=
linphone_core_get_current_call
(
pauline
->
lc
);
c2
=
linphone_core_get_current_call
(
marie
->
lc
);
BC_ASSERT_PTR_NOT_NULL
(
c1
);
BC_ASSERT_PTR_NOT_NULL
(
c2
);
if
(
c1
)
{
BC_ASSERT_EQUAL
(
c1
->
nb_media_starts
,
1
,
unsigned
int
,
"%u"
);
}
if
(
c2
)
{
BC_ASSERT_EQUAL
(
c2
->
nb_media_starts
,
1
,
unsigned
int
,
"%u"
);
}
}
liblinphone_tester_check_rtcp
(
marie
,
pauline
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment