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
574f4924
Commit
574f4924
authored
May 20, 2010
by
Simon Morlat
Browse files
add support for retrieving RTP statistics.
parent
f159efb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
coreapi/linphonecore.c
coreapi/linphonecore.c
+39
-0
coreapi/linphonecore.h
coreapi/linphonecore.h
+6
-0
No files found.
coreapi/linphonecore.c
View file @
574f4924
...
...
@@ -379,6 +379,23 @@ char * linphone_call_log_to_str(LinphoneCallLog *cl){
return
tmp
;
}
/**
* Returns RTP statistics computed locally regarding the call.
*
**/
const
rtp_stats_t
*
linphone_call_log_get_local_stats
(
const
LinphoneCallLog
*
cl
){
return
&
cl
->
local_stats
;
}
/**
* Returns RTP statistics computed by remote end and sent back via RTCP.
*
* @note Not implemented yet.
**/
const
rtp_stats_t
*
linphone_call_log_get_remote_stats
(
const
LinphoneCallLog
*
cl
){
return
&
cl
->
remote_stats
;
}
void
linphone_call_log_set_user_pointer
(
LinphoneCallLog
*
cl
,
void
*
up
){
cl
->
user_pointer
=
up
;
}
...
...
@@ -3354,6 +3371,28 @@ void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, Rtp
lc
->
a_rtcp
=
rtcp
;
}
/**
* Retrieve RTP statistics regarding current call.
* @param local RTP statistics computed locally.
* @param remote RTP statistics computed by far end (obtained via RTCP feedback).
*
* @note Remote RTP statistics is not implemented yet.
*
* @returns 0 or -1 if no call is running.
**/
int
linphone_core_get_current_call_stats
(
LinphoneCore
*
lc
,
rtp_stats_t
*
local
,
rtp_stats_t
*
remote
){
LinphoneCall
*
call
=
linphone_core_get_current_call
(
lc
);
if
(
call
!=
NULL
){
if
(
lc
->
audiostream
!=
NULL
){
memset
(
remote
,
0
,
sizeof
(
*
remote
));
audio_stream_get_local_rtp_stats
(
lc
->
audiostream
,
local
);
return
0
;
}
}
return
-
1
;
}
void
net_config_uninit
(
LinphoneCore
*
lc
)
{
net_config_t
*
config
=&
lc
->
net_conf
;
...
...
coreapi/linphonecore.h
View file @
574f4924
...
...
@@ -127,6 +127,8 @@ typedef struct _LinphoneCallLog{
int
duration
;
/**<Duration of the call in seconds*/
char
*
refkey
;
void
*
user_pointer
;
rtp_stats_t
local_stats
;
rtp_stats_t
remote_stats
;
struct
_LinphoneCore
*
lc
;
}
LinphoneCallLog
;
...
...
@@ -137,6 +139,8 @@ void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up);
void
*
linphone_call_log_get_user_pointer
(
const
LinphoneCallLog
*
cl
);
void
linphone_call_log_set_ref_key
(
LinphoneCallLog
*
cl
,
const
char
*
refkey
);
const
char
*
linphone_call_log_get_ref_key
(
const
LinphoneCallLog
*
cl
);
const
rtp_stats_t
*
linphone_call_log_get_local_stats
(
const
LinphoneCallLog
*
cl
);
const
rtp_stats_t
*
linphone_call_log_get_remote_stats
(
const
LinphoneCallLog
*
cl
);
char
*
linphone_call_log_to_str
(
LinphoneCallLog
*
cl
);
typedef
enum
{
...
...
@@ -785,6 +789,8 @@ void linphone_core_destroy(LinphoneCore *lc);
/*for advanced users:*/
void
linphone_core_set_audio_transports
(
LinphoneCore
*
lc
,
RtpTransport
*
rtp
,
RtpTransport
*
rtcp
);
int
linphone_core_get_current_call_stats
(
LinphoneCore
*
lc
,
rtp_stats_t
*
local
,
rtp_stats_t
*
remote
);
#ifdef __cplusplus
}
#endif
...
...
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