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
71f81ce6
Commit
71f81ce6
authored
Sep 24, 2013
by
jehan
Browse files
improve rtcp checking speed
parent
1b47a0df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
tester/call_tester.c
tester/call_tester.c
+5
-4
tester/liblinphone_tester.c
tester/liblinphone_tester.c
+6
-3
tester/liblinphone_tester.h
tester/liblinphone_tester.h
+1
-0
No files found.
tester/call_tester.c
View file @
71f81ce6
...
...
@@ -103,14 +103,15 @@ static void check_rtcp(LinphoneCoreManager* caller, LinphoneCoreManager* callee)
c1
=
linphone_core_get_current_call
(
caller
->
lc
);
c2
=
linphone_core_get_current_call
(
callee
->
lc
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
12
/*=6s*/
;
i
++
)
{
if
(
linphone_call_get_audio_stats
(
c1
)
->
round_trip_delay
>
0
.
0
&&
linphone_call_get_audio_stats
(
c2
)
->
round_trip_delay
>
0
.
0
&&
(
!
linphone_call_
get
_video_
stats
(
c1
)
||
linphone_call_get_video_stats
(
c1
)
->
round_trip_delay
>
0
.
0
)
&&
(
!
linphone_call_
get
_video_
stats
(
c1
)
||
linphone_call_get_video_stats
(
c
1
)
->
round_trip_delay
>
0
.
0
))
{
&&
(
!
linphone_call_
log
_video_
enabled
(
linphone_call_get_call_log
(
c1
)
)
||
linphone_call_get_video_stats
(
c1
)
->
round_trip_delay
>
0
.
0
)
&&
(
!
linphone_call_
log
_video_
enabled
(
linphone_call_get_call_log
(
c2
))
||
linphone_call_get_video_stats
(
c
2
)
->
round_trip_delay
>
0
.
0
))
{
break
;
}
wait_for
(
caller
->
lc
,
callee
->
lc
,
&
dummy
,
1
);
wait_for
_until
(
caller
->
lc
,
callee
->
lc
,
&
dummy
,
1
,
500
);
/*just to sleep while iterating*/
}
CU_ASSERT_TRUE
(
linphone_call_get_audio_stats
(
c1
)
->
round_trip_delay
>
0
.
0
);
...
...
tester/liblinphone_tester.c
View file @
71f81ce6
...
...
@@ -125,18 +125,21 @@ static LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char*
return
lc
;
}
bool_t
wait_for
(
LinphoneCore
*
lc_1
,
LinphoneCore
*
lc_2
,
int
*
counter
,
int
value
)
{
bool_t
wait_for_until
(
LinphoneCore
*
lc_1
,
LinphoneCore
*
lc_2
,
int
*
counter
,
int
value
,
int
timout
)
{
MSList
*
lcs
=
NULL
;
bool_t
result
;
if
(
lc_1
)
lcs
=
ms_list_append
(
lcs
,
lc_1
);
if
(
lc_2
)
lcs
=
ms_list_append
(
lcs
,
lc_2
);
result
=
wait_for_list
(
lcs
,
counter
,
value
,
2000
);
result
=
wait_for_list
(
lcs
,
counter
,
value
,
timout
);
ms_list_free
(
lcs
);
return
result
;
}
bool_t
wait_for
(
LinphoneCore
*
lc_1
,
LinphoneCore
*
lc_2
,
int
*
counter
,
int
value
)
{
return
wait_for_until
(
lc_1
,
lc_2
,
counter
,
value
,
2000
);
}
bool_t
wait_for_list
(
MSList
*
lcs
,
int
*
counter
,
int
value
,
int
timeout_ms
)
{
int
retry
=
0
;
MSList
*
iterator
;
...
...
tester/liblinphone_tester.h
View file @
71f81ce6
...
...
@@ -203,6 +203,7 @@ void linphone_notify_received(LinphoneCore *lc, LinphoneEvent *lev, const char *
LinphoneAddress
*
create_linphone_address
(
const
char
*
domain
);
bool_t
wait_for
(
LinphoneCore
*
lc_1
,
LinphoneCore
*
lc_2
,
int
*
counter
,
int
value
);
bool_t
wait_for_list
(
MSList
*
lcs
,
int
*
counter
,
int
value
,
int
timeout_ms
);
bool_t
wait_for_until
(
LinphoneCore
*
lc_1
,
LinphoneCore
*
lc_2
,
int
*
counter
,
int
value
,
int
timout_ms
);
bool_t
call
(
LinphoneCoreManager
*
caller_mgr
,
LinphoneCoreManager
*
callee_mgr
);
stats
*
get_stats
(
LinphoneCore
*
lc
);
...
...
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