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
24c2a4cf
Commit
24c2a4cf
authored
Sep 21, 2017
by
Ghislain MARY
Browse files
Fix build of linphonec, linphone-daemon and testers.
parent
b06df633
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
56 deletions
+68
-56
console/commands.c
console/commands.c
+1
-1
console/linphonec.c
console/linphonec.c
+7
-7
coreapi/private.h
coreapi/private.h
+2
-0
coreapi/proxy.c
coreapi/proxy.c
+1
-1
daemon/daemon.cc
daemon/daemon.cc
+7
-7
include/linphone/call.h
include/linphone/call.h
+2
-0
src/c-wrapper/api/c-call-stats.cpp
src/c-wrapper/api/c-call-stats.cpp
+8
-0
tester/call_single_tester.c
tester/call_single_tester.c
+33
-33
tester/tester.c
tester/tester.c
+7
-7
No files found.
console/commands.c
View file @
24c2a4cf
...
...
@@ -2492,7 +2492,7 @@ static void lpc_display_call_states(LinphoneCore *lc){
tmp
=
linphone_call_get_remote_address_as_string
(
call
);
flag
=
in_conference
?
"conferencing"
:
""
;
flag
=
linphone_call_has_transfer_pending
(
call
)
?
"transfer pending"
:
flag
;
linphonec_out
(
"%-2i | %-35s | %-15s | %s
\n
"
,
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
)),
linphonec_out
(
"%-2i | %-35s | %-15s | %s
\n
"
,
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
)),
tmp
,
linphone_call_state_to_string
(
linphone_call_get_state
(
call
))
+
strlen
(
"LinphoneCall"
),
flag
);
ms_free
(
tmp
);
}
...
...
console/linphonec.c
View file @
24c2a4cf
...
...
@@ -175,7 +175,7 @@ bool_t linphonec_camera_enabled=TRUE;
void
linphonec_call_identify
(
LinphoneCall
*
call
){
static
int
callid
=
1
;
linphone_call_set_user_
pointer
(
call
,
INT_TO_VOIDPTR
(
callid
));
linphone_call_set_user_
data
(
call
,
INT_TO_VOIDPTR
(
callid
));
callid
++
;
}
...
...
@@ -183,7 +183,7 @@ LinphoneCall *linphonec_get_call(int id){
const
MSList
*
elem
=
linphone_core_get_calls
(
linphonec
);
for
(;
elem
!=
NULL
;
elem
=
elem
->
next
){
LinphoneCall
*
call
=
(
LinphoneCall
*
)
elem
->
data
;
if
(
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
))
==
id
){
if
(
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
))
==
id
){
return
call
;
}
}
...
...
@@ -279,7 +279,7 @@ linphonec_transfer_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneC
char
*
remote
=
linphone_call_get_remote_address_as_string
(
call
);
if
(
new_call_state
==
LinphoneCallConnected
){
linphonec_out
(
"The distant endpoint %s of call %i has been transfered, you can safely close the call.
\n
"
,
remote
,
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
)));
remote
,
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
)));
}
ms_free
(
remote
);
}
...
...
@@ -322,7 +322,7 @@ static void linphonec_call_updated(LinphoneCall *call){
}
static
void
linphonec_call_encryption_changed
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
bool_t
encrypted
,
const
char
*
auth_token
)
{
int
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
));
int
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
));
if
(
!
encrypted
)
{
linphonec_out
(
"Call %i is not fully encrypted and auth token is %s.
\n
"
,
id
,
(
auth_token
!=
NULL
)
?
auth_token
:
"absent"
);
...
...
@@ -334,7 +334,7 @@ static void linphonec_call_encryption_changed(LinphoneCore *lc, LinphoneCall *ca
static
void
linphonec_call_state_changed
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
LinphoneCallState
st
,
const
char
*
msg
){
char
*
from
=
linphone_call_get_remote_address_as_string
(
call
);
int
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
));
int
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
));
switch
(
st
){
case
LinphoneCallEnd
:
linphonec_out
(
"Call %i with %s ended (%s).
\n
"
,
id
,
from
,
linphone_reason_to_string
(
linphone_call_get_reason
(
call
)));
...
...
@@ -357,7 +357,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
case
LinphoneCallIncomingReceived
:
linphonec_call_identify
(
call
);
linphone_call_enable_camera
(
call
,
linphonec_camera_enabled
);
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
));
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
));
linphonec_set_caller
(
from
);
linphonec_out
(
"Receiving new incoming call from %s, assigned id %i
\n
"
,
from
,
id
);
if
(
auto_answer
)
{
...
...
@@ -373,7 +373,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
break
;
case
LinphoneCallOutgoingInit
:
linphonec_call_identify
(
call
);
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
));
id
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
));
linphonec_out
(
"Establishing call id to %s, assigned id %i
\n
"
,
from
,
id
);
break
;
case
LinphoneCallUpdatedByRemote
:
...
...
coreapi/private.h
View file @
24c2a4cf
...
...
@@ -409,6 +409,7 @@ void _linphone_call_stats_uninit(LinphoneCallStats *stats);
void
_linphone_call_stats_clone
(
LinphoneCallStats
*
dst
,
const
LinphoneCallStats
*
src
);
void
_linphone_call_stats_set_ice_state
(
LinphoneCallStats
*
stats
,
LinphoneIceState
state
);
void
_linphone_call_stats_set_type
(
LinphoneCallStats
*
stats
,
LinphoneStreamType
type
);
mblk_t
*
_linphone_call_stats_get_received_rtcp
(
const
LinphoneCallStats
*
stats
);
void
_linphone_call_stats_set_received_rtcp
(
LinphoneCallStats
*
stats
,
mblk_t
*
m
);
void
_linphone_call_stats_set_sent_rtcp
(
LinphoneCallStats
*
stats
,
mblk_t
*
m
);
int
_linphone_call_stats_get_updated
(
const
LinphoneCallStats
*
stats
);
...
...
@@ -419,6 +420,7 @@ void _linphone_call_stats_set_upload_bandwidth (LinphoneCallStats *stats, float
void
_linphone_call_stats_set_rtcp_download_bandwidth
(
LinphoneCallStats
*
stats
,
float
bandwidth
);
void
_linphone_call_stats_set_rtcp_upload_bandwidth
(
LinphoneCallStats
*
stats
,
float
bandwidth
);
void
_linphone_call_stats_set_ip_family_of_remote
(
LinphoneCallStats
*
stats
,
LinphoneAddressFamily
family
);
bool_t
_linphone_call_stats_rtcp_received_via_mux
(
const
LinphoneCallStats
*
stats
);
void
linphone_call_update_local_media_description_from_ice_or_upnp
(
LinphoneCall
*
call
);
void
linphone_call_update_ice_from_remote_media_description
(
LinphoneCall
*
call
,
const
SalMediaDescription
*
md
,
bool_t
is_offer
);
void
linphone_call_clear_unused_ice_candidates
(
LinphoneCall
*
call
,
const
SalMediaDescription
*
md
);
...
...
coreapi/proxy.c
View file @
24c2a4cf
...
...
@@ -119,7 +119,7 @@ static void linphone_proxy_config_init(LinphoneCore* lc, LinphoneProxyConfig *cf
cfg
->
reg_sendregister
=
lc
?
!!
lp_config_get_default_int
(
lc
->
config
,
"proxy"
,
"reg_sendregister"
,
1
)
:
1
;
cfg
->
dial_prefix
=
dial_prefix
?
ms_strdup
(
dial_prefix
)
:
NULL
;
cfg
->
dial_escape_plus
=
lc
?
!!
lp_config_get_default_int
(
lc
->
config
,
"proxy"
,
"dial_escape_plus"
,
0
)
:
0
;
cfg
->
privacy
=
lc
?
(
LinphonePrivacyMask
)
lp_config_get_default_int
(
lc
->
config
,
"proxy"
,
"privacy"
,
LinphonePrivacyDefault
)
:
LinphonePrivacyDefault
;
cfg
->
privacy
=
lc
?
(
LinphonePrivacyMask
)
lp_config_get_default_int
(
lc
->
config
,
"proxy"
,
"privacy"
,
LinphonePrivacyDefault
)
:
(
LinphonePrivacyMask
)
LinphonePrivacyDefault
;
cfg
->
identity_address
=
identity
?
linphone_address_new
(
identity
)
:
NULL
;
cfg
->
reg_identity
=
cfg
->
identity_address
?
linphone_address_as_string
(
cfg
->
identity_address
)
:
NULL
;
cfg
->
reg_proxy
=
proxy
?
ms_strdup
(
proxy
)
:
NULL
;
...
...
daemon/daemon.cc
View file @
24c2a4cf
...
...
@@ -166,19 +166,19 @@ CallStatsResponse::CallStatsResponse(Daemon *daemon, LinphoneCall *call, const L
ostr
<<
"Event-type: call-stats
\n
"
;
ostr
<<
"Id: "
<<
daemon
->
updateCallId
(
call
)
<<
"
\n
"
;
ostr
<<
"Type: "
;
if
(
stats
->
type
==
LINPHONE_CALL_STATS_AUDIO
)
{
if
(
linphone_call_stats_get_type
(
stats
)
==
LINPHONE_CALL_STATS_AUDIO
)
{
ostr
<<
"Audio"
;
}
else
{
ostr
<<
"Video"
;
}
ostr
<<
"
\n
"
;
}
else
{
prefix
=
((
stats
->
type
==
LINPHONE_CALL_STATS_AUDIO
)
?
"Audio-"
:
"Video-"
);
prefix
=
((
linphone_call_stats_get_type
(
stats
)
==
LINPHONE_CALL_STATS_AUDIO
)
?
"Audio-"
:
"Video-"
);
}
printCallStatsHelper
(
ostr
,
stats
,
prefix
);
if
(
stats
->
type
==
LINPHONE_CALL_STATS_AUDIO
)
{
if
(
linphone_call_stats_get_type
(
stats
)
==
LINPHONE_CALL_STATS_AUDIO
)
{
const
PayloadType
*
audioCodec
=
linphone_call_params_get_used_audio_codec
(
callParams
);
ostr
<<
PayloadTypeResponse
(
linphone_call_get_core
(
call
),
audioCodec
,
-
1
,
prefix
,
false
).
getBody
()
<<
"
\n
"
;
}
else
{
...
...
@@ -353,9 +353,9 @@ LinphoneSoundDaemon *Daemon::getLSD() {
}
int
Daemon
::
updateCallId
(
LinphoneCall
*
call
)
{
int
val
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
));
int
val
=
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
));
if
(
val
==
0
)
{
linphone_call_set_user_
pointer
(
call
,
INT_TO_VOIDPTR
(
++
mCallIds
));
linphone_call_set_user_
data
(
call
,
INT_TO_VOIDPTR
(
++
mCallIds
));
return
mCallIds
;
}
return
val
;
...
...
@@ -365,7 +365,7 @@ LinphoneCall *Daemon::findCall(int id) {
const
bctbx_list_t
*
elem
=
linphone_core_get_calls
(
mLc
);
for
(;
elem
!=
NULL
;
elem
=
elem
->
next
)
{
LinphoneCall
*
call
=
(
LinphoneCall
*
)
elem
->
data
;
if
(
VOIDPTR_TO_INT
(
linphone_call_get_user_
pointer
(
call
))
==
id
)
if
(
VOIDPTR_TO_INT
(
linphone_call_get_user_
data
(
call
))
==
id
)
return
call
;
}
return
NULL
;
...
...
@@ -518,7 +518,7 @@ void Daemon::callStateChanged(LinphoneCall *call, LinphoneCallState state, const
void
Daemon
::
callStatsUpdated
(
LinphoneCall
*
call
,
const
LinphoneCallStats
*
stats
)
{
if
(
mUseStatsEvents
)
{
/* don't queue periodical updates (3 per seconds for just bandwidth updates) */
if
(
!
(
stats
->
updated
&
LINPHONE_CALL_STATS_PERIODICAL_UPDATE
)){
if
(
!
(
_linphone_call_stats_get_updated
(
stats
)
&
LINPHONE_CALL_STATS_PERIODICAL_UPDATE
)){
mEventQueue
.
push
(
new
CallStatsResponse
(
this
,
call
,
stats
,
true
));
}
}
...
...
include/linphone/call.h
View file @
24c2a4cf
...
...
@@ -21,5 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define LINPHONE_CALL_H
#include "linphone/api/c-call.h"
#include "linphone/api/c-call-cbs.h"
#include "linphone/api/c-call-stats.h"
#endif
/* LINPHONE_CALL_H */
src/c-wrapper/api/c-call-stats.cpp
View file @
24c2a4cf
...
...
@@ -106,6 +106,10 @@ void _linphone_call_stats_set_type (LinphoneCallStats *stats, LinphoneStreamType
stats
->
type
=
type
;
}
mblk_t
*
_linphone_call_stats_get_received_rtcp
(
const
LinphoneCallStats
*
stats
)
{
return
stats
->
received_rtcp
;
}
void
_linphone_call_stats_set_received_rtcp
(
LinphoneCallStats
*
stats
,
mblk_t
*
m
)
{
stats
->
received_rtcp
=
m
;
}
...
...
@@ -146,6 +150,10 @@ void _linphone_call_stats_set_ip_family_of_remote (LinphoneCallStats *stats, Lin
stats
->
rtp_remote_family
=
family
;
}
bool_t
_linphone_call_stats_rtcp_received_via_mux
(
const
LinphoneCallStats
*
stats
)
{
return
stats
->
rtcp_received_via_mux
;
}
// =============================================================================
// Public functions
// =============================================================================
...
...
tester/call_single_tester.c
View file @
24c2a4cf
...
...
@@ -101,28 +101,28 @@ static void rtcp_received(stats* counters, mblk_t *packet) {
void
call_stats_updated
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
const
LinphoneCallStats
*
lstats
)
{
stats
*
counters
=
get_stats
(
lc
);
counters
->
number_of_LinphoneCallStatsUpdated
++
;
if
(
lstats
->
updated
&
LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE
)
{
if
(
_linphone_call_stats_get_updated
(
lstats
)
&
LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE
)
{
counters
->
number_of_rtcp_received
++
;
if
(
l
stats
->
rtcp_received_via_mux
){
if
(
_linphone_call_
stats
_
rtcp_received_via_mux
(
lstats
)
){
counters
->
number_of_rtcp_received_via_mux
++
;
}
rtcp_received
(
counters
,
lstats
->
received_rtcp
);
rtcp_received
(
counters
,
_linphone_call_stats_get_
received_rtcp
(
lstats
)
);
}
if
(
lstats
->
updated
&
LINPHONE_CALL_STATS_SENT_RTCP_UPDATE
)
{
if
(
_linphone_call_stats_get_updated
(
lstats
)
&
LINPHONE_CALL_STATS_SENT_RTCP_UPDATE
)
{
counters
->
number_of_rtcp_sent
++
;
}
if
(
lstats
->
updated
&
LINPHONE_CALL_STATS_PERIODICAL_UPDATE
)
{
if
(
_linphone_call_stats_get_updated
(
lstats
)
&
LINPHONE_CALL_STATS_PERIODICAL_UPDATE
)
{
int
tab_size
=
sizeof
(
counters
->
audio_download_bandwidth
)
/
sizeof
(
int
);
int
index
=
(
counters
->
current_bandwidth_index
[
l
stats
->
type
]
++
)
%
tab_size
;
int
index
=
(
counters
->
current_bandwidth_index
[
l
inphone_call_stats_get_type
(
lstats
)
]
++
)
%
tab_size
;
LinphoneCallStats
*
audio_stats
,
*
video_stats
;
audio_stats
=
linphone_call_get_audio_stats
(
call
);
video_stats
=
linphone_call_get_video_stats
(
call
);
if
(
l
stats
->
type
==
LINPHONE_CALL_STATS_AUDIO
)
{
counters
->
audio_download_bandwidth
[
index
]
=
(
int
)
audio
_stats
->
download_bandwidth
;
counters
->
audio_upload_bandwidth
[
index
]
=
(
int
)
audio
_stats
->
upload_bandwidth
;
if
(
l
inphone_call_stats_get_type
(
lstats
)
==
LINPHONE_CALL_STATS_AUDIO
)
{
counters
->
audio_download_bandwidth
[
index
]
=
(
int
)
linphone_call
_stats
_get_
download_bandwidth
(
audio_stats
)
;
counters
->
audio_upload_bandwidth
[
index
]
=
(
int
)
linphone_call
_stats
_get_
upload_bandwidth
(
audio_stats
)
;
}
else
{
counters
->
video_download_bandwidth
[
index
]
=
(
int
)
video
_stats
->
download_bandwidth
;
counters
->
video_upload_bandwidth
[
index
]
=
(
int
)
video
_stats
->
upload_bandwidth
;
counters
->
video_download_bandwidth
[
index
]
=
(
int
)
linphone_call
_stats
_get_
download_bandwidth
(
video_stats
)
;
counters
->
video_upload_bandwidth
[
index
]
=
(
int
)
linphone_call
_stats
_get_
upload_bandwidth
(
video_stats
)
;
}
linphone_call_stats_unref
(
audio_stats
);
linphone_call_stats_unref
(
video_stats
);
...
...
@@ -207,10 +207,10 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana
video_stats1
=
linphone_call_get_video_stats
(
c1
);
audio_stats2
=
linphone_call_get_audio_stats
(
c2
);
video_stats2
=
linphone_call_get_video_stats
(
c2
);
if
(
audio
_stats
1
->
round_trip_delay
>
0
.
0
&&
audio
_stats
2
->
round_trip_delay
>
0
.
0
&&
(
!
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c1
))
||
video
_stats
1
->
round_trip_delay
>
0
.
0
)
&&
(
!
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c2
))
||
video
_stats
2
->
round_trip_delay
>
0
.
0
))
{
if
(
linphone_call
_stats
_get_
round_trip_delay
(
audio_stats1
)
>
0
.
0
&&
linphone_call
_stats
_get_
round_trip_delay
(
audio_stats2
)
>
0
.
0
&&
(
!
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c1
))
||
linphone_call
_stats
_get_
round_trip_delay
(
video_stats1
)
>
0
.
0
)
&&
(
!
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c2
))
||
linphone_call
_stats
_get_
round_trip_delay
(
video_stats2
)
>
0
.
0
))
{
break
;
}
...
...
@@ -228,33 +228,33 @@ void liblinphone_tester_check_rtcp(LinphoneCoreManager* caller, LinphoneCoreMana
if
(
linphone_core_rtcp_enabled
(
caller
->
lc
)
&&
linphone_core_rtcp_enabled
(
callee
->
lc
))
{
BC_ASSERT_GREATER
(
caller
->
stat
.
number_of_rtcp_received
,
1
,
int
,
"%i"
);
BC_ASSERT_GREATER
(
callee
->
stat
.
number_of_rtcp_received
,
1
,
int
,
"%i"
);
BC_ASSERT_GREATER
(
audio
_stats
1
->
round_trip_delay
,
0
.
0
,
float
,
"%f"
);
BC_ASSERT_GREATER
(
audio
_stats
2
->
round_trip_delay
,
0
.
0
,
float
,
"%f"
);
BC_ASSERT_GREATER
(
linphone_call
_stats
_get_
round_trip_delay
(
audio_stats1
)
,
0
.
0
,
float
,
"%f"
);
BC_ASSERT_GREATER
(
linphone_call
_stats
_get_
round_trip_delay
(
audio_stats2
)
,
0
.
0
,
float
,
"%f"
);
if
(
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c1
)))
{
BC_ASSERT_GREATER
(
video
_stats
1
->
round_trip_delay
,
0
.
0
,
float
,
"%f"
);
BC_ASSERT_GREATER
(
linphone_call
_stats
_get_
round_trip_delay
(
video_stats1
)
,
0
.
0
,
float
,
"%f"
);
}
if
(
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c2
)))
{
BC_ASSERT_GREATER
(
video
_stats
2
->
round_trip_delay
,
0
.
0
,
float
,
"%f"
);
BC_ASSERT_GREATER
(
linphone_call
_stats
_get_
round_trip_delay
(
video_stats2
)
,
0
.
0
,
float
,
"%f"
);
}
}
else
{
if
(
linphone_core_rtcp_enabled
(
caller
->
lc
))
{
BC_ASSERT_EQUAL
(
audio
_stats
1
->
rtp_stats
.
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
audio
_stats
2
->
rtp_stats
.
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
audio_stats1
)
->
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
audio_stats2
)
->
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
if
(
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c1
)))
{
BC_ASSERT_EQUAL
(
video
_stats
1
->
rtp_stats
.
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
video_stats1
)
->
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
}
if
(
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c2
)))
{
BC_ASSERT_EQUAL
(
video
_stats
2
->
rtp_stats
.
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
video_stats2
)
->
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
}
}
if
(
linphone_core_rtcp_enabled
(
callee
->
lc
))
{
BC_ASSERT_EQUAL
(
audio
_stats
2
->
rtp_stats
.
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
audio
_stats
1
->
rtp_stats
.
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
audio_stats2
)
->
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
audio_stats1
)
->
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
if
(
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c1
)))
{
BC_ASSERT_EQUAL
(
video
_stats
1
->
rtp_stats
.
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
video_stats1
)
->
recv_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
}
if
(
linphone_call_log_video_enabled
(
linphone_call_get_call_log
(
c2
)))
{
BC_ASSERT_EQUAL
(
video
_stats
2
->
rtp_stats
.
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
BC_ASSERT_EQUAL
(
linphone_call
_stats
_get_
rtp_stats
(
video_stats2
)
->
sent_rtcp_packets
,
0
,
unsigned
long
long
,
"%llu"
);
}
}
...
...
@@ -3622,14 +3622,14 @@ void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, bctbx_l
}
switch
(
video_dir
)
{
case
LinphoneMediaDirectionInactive
:
BC_ASSERT_LOWER
((
int
)
stats
->
upload_bandwidth
,
5
,
int
,
"%i"
);
BC_ASSERT_LOWER
((
int
)
linphone_call_stats_get_
upload_bandwidth
(
stats
)
,
5
,
int
,
"%i"
);
break
;
case
LinphoneMediaDirectionSendOnly
:
expected_recv_iframe
=
0
;
BC_ASSERT_LOWER
((
int
)
stats
->
download_bandwidth
,
5
,
int
,
"%i"
);
BC_ASSERT_LOWER
((
int
)
linphone_call_stats_get_
download_bandwidth
(
stats
)
,
5
,
int
,
"%i"
);
break
;
case
LinphoneMediaDirectionRecvOnly
:
BC_ASSERT_LOWER
((
int
)
stats
->
upload_bandwidth
,
5
,
int
,
"%i"
);
BC_ASSERT_LOWER
((
int
)
linphone_call_stats_get_
upload_bandwidth
(
stats
)
,
5
,
int
,
"%i"
);
BCTBX_NO_BREAK
;
/*intentionally no break*/
case
LinphoneMediaDirectionSendRecv
:
expected_recv_iframe
=
1
;
...
...
@@ -4018,7 +4018,7 @@ static void call_with_paused_no_sdp_on_resume(void) {
wait_for_until
(
marie
->
lc
,
pauline
->
lc
,
&
dummy
,
1
,
3000
);
BC_ASSERT_GREATER
(
linphone_core_manager_get_max_audio_down_bw
(
marie
),
70
,
int
,
"%i"
);
stats
=
linphone_call_get_audio_stats
(
linphone_core_get_current_call
(
pauline
->
lc
));
BC_ASSERT_TRUE
(
stats
->
download_bandwidth
>
70
);
BC_ASSERT_TRUE
(
linphone_call_stats_get_
download_bandwidth
(
stats
)
>
70
);
linphone_call_stats_unref
(
stats
);
end_call
(
marie
,
pauline
);
end:
...
...
@@ -5952,8 +5952,8 @@ static void call_with_encryption_mandatory(bool_t caller_has_encryption_mandator
/*however we can trust packet_recv from the other party instead */
marie_stats
=
linphone_call_get_audio_stats
(
linphone_core_get_current_call
(
marie
->
lc
));
pauline_stats
=
linphone_call_get_audio_stats
(
linphone_core_get_current_call
(
pauline
->
lc
));
BC_ASSERT_EQUAL
((
int
)
marie_stats
->
rtp_stats
.
packet_recv
,
0
,
int
,
"%i"
);
BC_ASSERT_EQUAL
((
int
)
pauline_stats
->
rtp_stats
.
packet_recv
,
0
,
int
,
"%i"
);
BC_ASSERT_EQUAL
((
int
)
linphone_call_stats_get_rtp_stats
(
marie_stats
)
->
packet_recv
,
0
,
int
,
"%i"
);
BC_ASSERT_EQUAL
((
int
)
linphone_call_stats_get_rtp_stats
(
pauline_stats
)
->
packet_recv
,
0
,
int
,
"%i"
);
linphone_call_stats_unref
(
marie_stats
);
linphone_call_stats_unref
(
pauline_stats
);
end_call
(
marie
,
pauline
);
...
...
tester/tester.c
View file @
24c2a4cf
...
...
@@ -699,7 +699,7 @@ static void check_ice_from_rtp(LinphoneCall *c1, LinphoneCall *c2, LinphoneStrea
}
stats
=
linphone_call_get_audio_stats
(
c1
);
if
(
stats
->
ice_state
==
LinphoneIceStateHostConnection
&&
media_stream_started
(
ms
))
{
if
(
linphone_call_stats_get_
ice_state
(
stats
)
==
LinphoneIceStateHostConnection
&&
media_stream_started
(
ms
))
{
struct
sockaddr_storage
remaddr
;
socklen_t
remaddrlen
=
sizeof
(
remaddr
);
char
ip
[
NI_MAXHOST
]
=
{
0
};
...
...
@@ -758,8 +758,8 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph
if
((
c1
!=
NULL
)
&&
(
c2
!=
NULL
))
{
LinphoneCallStats
*
stats1
=
linphone_call_get_audio_stats
(
c1
);
LinphoneCallStats
*
stats2
=
linphone_call_get_audio_stats
(
c2
);
if
(
stats1
->
ice_state
==
state
&&
stats2
->
ice_state
==
state
){
if
(
linphone_call_stats_get_
ice_state
(
stats1
)
==
state
&&
linphone_call_stats_get_
ice_state
(
stats2
)
==
state
){
audio_success
=
TRUE
;
check_ice_from_rtp
(
c1
,
c2
,
LinphoneStreamTypeAudio
);
check_ice_from_rtp
(
c2
,
c1
,
LinphoneStreamTypeAudio
);
...
...
@@ -780,8 +780,8 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph
if
((
c1
!=
NULL
)
&&
(
c2
!=
NULL
))
{
LinphoneCallStats
*
stats1
=
linphone_call_get_video_stats
(
c1
);
LinphoneCallStats
*
stats2
=
linphone_call_get_video_stats
(
c2
);
if
(
stats1
->
ice_state
==
state
&&
stats2
->
ice_state
==
state
){
if
(
linphone_call_stats_get_
ice_state
(
stats1
)
==
state
&&
linphone_call_stats_get_
ice_state
(
stats2
)
==
state
){
video_success
=
TRUE
;
check_ice_from_rtp
(
c1
,
c2
,
LinphoneStreamTypeVideo
);
check_ice_from_rtp
(
c2
,
c1
,
LinphoneStreamTypeVideo
);
...
...
@@ -802,8 +802,8 @@ bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee, Linph
if
((
c1
!=
NULL
)
&&
(
c2
!=
NULL
))
{
LinphoneCallStats
*
stats1
=
linphone_call_get_text_stats
(
c1
);
LinphoneCallStats
*
stats2
=
linphone_call_get_text_stats
(
c2
);
if
(
stats1
->
ice_state
==
state
&&
stats2
->
ice_state
==
state
){
if
(
linphone_call_stats_get_
ice_state
(
stats1
)
==
state
&&
linphone_call_stats_get_
ice_state
(
stats2
)
==
state
){
text_success
=
TRUE
;
check_ice_from_rtp
(
c1
,
c2
,
LinphoneStreamTypeText
);
check_ice_from_rtp
(
c2
,
c1
,
LinphoneStreamTypeText
);
...
...
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