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
a1c1f301
Commit
a1c1f301
authored
Apr 11, 2014
by
Gautier Pelloux-Prayer
Browse files
Quality reporting: verify values before adding them to the report
parent
a9e94795
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
193 additions
and
142 deletions
+193
-142
coreapi/linphonecall.c
coreapi/linphonecall.c
+5
-2
coreapi/linphonecore.c
coreapi/linphonecore.c
+0
-5
coreapi/private.h
coreapi/private.h
+2
-2
coreapi/quality_reporting.c
coreapi/quality_reporting.c
+185
-133
coreapi/quality_reporting.h
coreapi/quality_reporting.h
+1
-0
No files found.
coreapi/linphonecall.c
View file @
a1c1f301
...
...
@@ -483,6 +483,9 @@ static void linphone_call_init_common(LinphoneCall *call, LinphoneAddress *from,
call
->
owns_call_log
=
TRUE
;
call
->
camera_enabled
=
TRUE
;
call
->
log
->
reports
[
LINPHONE_CALL_STATS_AUDIO
]
=
linphone_reporting_new
();
call
->
log
->
reports
[
LINPHONE_CALL_STATS_VIDEO
]
=
linphone_reporting_new
();
linphone_core_get_audio_port_range
(
call
->
core
,
&
min_port
,
&
max_port
);
port_config_set
(
call
,
0
,
min_port
,
max_port
);
...
...
@@ -1851,7 +1854,6 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
playfile
=
lc
->
play_file
;
recfile
=
lc
->
rec_file
;
call
->
audio_profile
=
make_profile
(
call
,
call
->
resultdesc
,
stream
,
&
used_pt
);
call
->
reports
[
LINPHONE_CALL_STATS_AUDIO
]
=
ms_new0
(
reporting_session_report_t
,
1
);
if
(
used_pt
!=-
1
){
call
->
current_params
.
audio_codec
=
rtp_profile_get_payload
(
call
->
audio_profile
,
used_pt
);
...
...
@@ -1981,7 +1983,6 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
const
SalStreamDescription
*
local_st_desc
=
sal_media_description_find_stream
(
call
->
localdesc
,
vstream
->
proto
,
SalVideo
);
call
->
video_profile
=
make_profile
(
call
,
call
->
resultdesc
,
vstream
,
&
used_pt
);
call
->
reports
[
LINPHONE_CALL_STATS_VIDEO
]
=
ms_new0
(
reporting_session_report_t
,
1
);
if
(
used_pt
!=-
1
){
VideoStreamDir
dir
=
VideoStreamSendRecv
;
...
...
@@ -2206,6 +2207,7 @@ static void linphone_call_log_fill_stats(LinphoneCallLog *log, MediaStream *st){
void
linphone_call_stop_audio_stream
(
LinphoneCall
*
call
)
{
if
(
call
->
audiostream
!=
NULL
)
{
linphone_reporting_update
(
call
,
LINPHONE_CALL_STATS_AUDIO
);
media_stream_reclaim_sessions
(
&
call
->
audiostream
->
ms
,
&
call
->
sessions
[
0
]);
rtp_session_unregister_event_queue
(
call
->
audiostream
->
ms
.
sessions
.
rtp_session
,
call
->
audiostream_app_evq
);
ortp_ev_queue_flush
(
call
->
audiostream_app_evq
);
...
...
@@ -2234,6 +2236,7 @@ void linphone_call_stop_audio_stream(LinphoneCall *call) {
void
linphone_call_stop_video_stream
(
LinphoneCall
*
call
)
{
#ifdef VIDEO_ENABLED
if
(
call
->
videostream
!=
NULL
){
linphone_reporting_update
(
call
,
LINPHONE_CALL_STATS_VIDEO
);
media_stream_reclaim_sessions
(
&
call
->
videostream
->
ms
,
&
call
->
sessions
[
1
]);
rtp_session_unregister_event_queue
(
call
->
videostream
->
ms
.
sessions
.
rtp_session
,
call
->
videostream_app_evq
);
ortp_ev_queue_flush
(
call
->
videostream_app_evq
);
...
...
coreapi/linphonecore.c
View file @
a1c1f301
...
...
@@ -3470,11 +3470,6 @@ static void terminate_call(LinphoneCore *lc, LinphoneCall *call){
/*stop ringing*/
linphone_core_stop_ringing
(
lc
);
linphone_reporting_update
(
call
,
LINPHONE_CALL_STATS_AUDIO
);
if
(
call
->
videostream
!=
NULL
){
linphone_reporting_update
(
call
,
LINPHONE_CALL_STATS_VIDEO
);
}
linphone_call_stop_media_streams
(
call
);
#ifdef BUILD_UPNP
...
...
coreapi/private.h
View file @
a1c1f301
...
...
@@ -116,6 +116,8 @@ struct _LinphoneCallLog{
float
quality
;
time_t
start_date_time
;
/**Start date of the call in seconds as expressed in a time_t */
char
*
call_id
;
/**unique id of a call*/
reporting_session_report_t
*
reports
[
2
];
bool_t
video_enabled
;
};
...
...
@@ -193,8 +195,6 @@ struct _LinphoneCall
struct
_AudioStream
*
audiostream
;
/**/
struct
_VideoStream
*
videostream
;
reporting_session_report_t
*
reports
[
2
];
MSAudioEndpoint
*
endpoint
;
/*used for conferencing*/
char
*
refer_to
;
LinphoneCallParams
params
;
...
...
coreapi/quality_reporting.c
View file @
a1c1f301
This diff is collapsed.
Click to expand it.
coreapi/quality_reporting.h
View file @
a1c1f301
...
...
@@ -136,6 +136,7 @@ typedef struct reporting_session_report {
char
*
dialog_id
;
// optional
}
reporting_session_report_t
;
reporting_session_report_t
*
linphone_reporting_new
();
reporting_session_report_t
*
linphone_reporting_update
(
LinphoneCall
*
call
,
int
stats_type
);
void
linphone_reporting_publish
(
LinphoneCall
*
call
);
void
linphone_reporting_call_stats_updated
(
LinphoneCall
*
call
,
int
stats_type
);
...
...
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