Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
linphone
Commits
e4c70dd7
Commit
e4c70dd7
authored
May 22, 2017
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for video bandwidth estimator
parent
6ded1d49
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
1 deletion
+39
-1
call_single_tester.c
tester/call_single_tester.c
+1
-0
liblinphone_tester.h
tester/liblinphone_tester.h
+1
-0
quality_reporting_tester.c
tester/quality_reporting_tester.c
+37
-1
No files found.
tester/call_single_tester.c
View file @
e4c70dd7
...
...
@@ -89,6 +89,7 @@ static void rtcp_received(stats* counters, mblk_t *packet) {
do
{
if
(
rtcp_is_type
(
packet
,
RTCP_RTPFB
)){
if
(
rtcp_RTPFB_get_type
(
packet
)
==
RTCP_RTPFB_TMMBR
)
{
counters
->
number_of_tmmbr_received
++
;
counters
->
last_tmmbr_value_received
=
(
int
)
rtcp_RTPFB_tmmbr_get_max_bitrate
(
packet
);
}
}
...
...
tester/liblinphone_tester.h
View file @
e4c70dd7
...
...
@@ -259,6 +259,7 @@ typedef struct _stats {
int
current_bandwidth_index
[
2
]
/*audio and video only*/
;
int
number_of_rtcp_generic_nack
;
int
number_of_tmmbr_received
;
int
last_tmmbr_value_received
;
}
stats
;
...
...
tester/quality_reporting_tester.c
View file @
e4c70dd7
...
...
@@ -429,6 +429,41 @@ static void quality_reporting_interval_report_video_and_rtt(void) {
}
#endif
static
void
video_bandwidth_estimation
(
void
){
LinphoneCoreManager
*
marie
=
linphone_core_manager_new
(
"marie_rc"
);
LinphoneCoreManager
*
pauline
=
linphone_core_manager_new
(
"pauline_rc"
);
LinphoneVideoPolicy
pol
=
{
0
};
OrtpNetworkSimulatorParams
simparams
=
{
0
};
linphone_core_set_video_device
(
marie
->
lc
,
"Mire: Mire (synthetic moving picture)"
);
linphone_core_enable_video_capture
(
marie
->
lc
,
TRUE
);
linphone_core_enable_video_display
(
marie
->
lc
,
TRUE
);
linphone_core_enable_video_capture
(
pauline
->
lc
,
TRUE
);
linphone_core_enable_video_display
(
pauline
->
lc
,
TRUE
);
pol
.
automatically_accept
=
TRUE
;
pol
.
automatically_initiate
=
TRUE
;
linphone_core_set_video_policy
(
marie
->
lc
,
&
pol
);
linphone_core_set_video_policy
(
pauline
->
lc
,
&
pol
);
linphone_core_set_preferred_video_size_by_name
(
marie
->
lc
,
"vga"
);
simparams
.
mode
=
OrtpNetworkSimulatorOutbound
;
simparams
.
enabled
=
TRUE
;
simparams
.
max_bandwidth
=
300000
;
linphone_core_set_network_simulator_params
(
marie
->
lc
,
&
simparams
);
if
(
BC_ASSERT_TRUE
(
call
(
marie
,
pauline
))){
/*wait for the first TMMBR*/
BC_ASSERT_TRUE
(
wait_for_until
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_tmmbr_received
,
1
,
50000
));
BC_ASSERT_GREATER
((
float
)
marie
->
stat
.
last_tmmbr_value_received
,
270000
.
f
,
float
,
"%f"
);
BC_ASSERT_LOWER
((
float
)
marie
->
stat
.
last_tmmbr_value_received
,
330000
.
f
,
float
,
"%f"
);
end_call
(
marie
,
pauline
);
}
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
test_t
quality_reporting_tests
[]
=
{
TEST_NO_TAG
(
"Not used if no config"
,
quality_reporting_not_used_without_config
),
TEST_NO_TAG
(
"Call term session report not sent if call did not start"
,
quality_reporting_not_sent_if_call_not_started
),
...
...
@@ -440,7 +475,8 @@ test_t quality_reporting_tests[] = {
TEST_NO_TAG
(
"Interval report if interval is configured with video and realtime text"
,
quality_reporting_interval_report_video_and_rtt
),
TEST_NO_TAG
(
"Session report sent if video stopped during call"
,
quality_reporting_session_report_if_video_stopped
),
#endif
TEST_NO_TAG
(
"Sent using custom route"
,
quality_reporting_sent_using_custom_route
)
TEST_NO_TAG
(
"Sent using custom route"
,
quality_reporting_sent_using_custom_route
),
TEST_NO_TAG
(
"Video bandwidth estimation"
,
video_bandwidth_estimation
)
};
test_suite_t
quality_reporting_test_suite
=
{
"QualityReporting"
,
NULL
,
NULL
,
liblinphone_tester_before_each
,
liblinphone_tester_after_each
,
...
...
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