Refactoring full stack and loopback tests
Refactoring full stack, video and screenshare tests to use the same code basis
for parametrization and initialization. This patch is done on top of recently
commited full stack graphs CL https://codereview.webrtc.org/1289933003/, but
virtually no changes have been made to full_stack_plot.py nor to the VideoAnalyzer
in full stack, except moving it to video_quality_test.cc.
Also, full_stack_samples.cc (build target) was removed and replaced with
-output_filename and -duration cmdline arguments in video_loopback and
screenshare_loopback.
The important things to review:
- video_quality_test.h
Is the structure of Params good? (examples of usage can be found in
full_stack.cc, video_loopback.cc and screenshare_loopback.cc)
- video_quality_test.cc
Is the initialization correct? The case for using Analyzer and using local
renderer are different, can they be further merged?
- webrtc_tests.gypi
Reproducing the different bitrate settings the full stack and loopback tests had
was a little bit tricky. To support both simultaneously, I added BitrateConfig
to the Params struct, as well as separate start_bitrate and target_bitrate flags
for loopback tests.
Note: Side-by-side diff for video_quality_test.cc compares that file directly
with the old full_stack.cc, so changes to VideoAnalyzer are clearly visible.
Note: Recent CL I've committed added -num_temporal_layers and -sl_discard_threshold
args to loopback tests. This was removed here. Support for streams and SVC
will be added in a CL following this one.
Review URL: https://codereview.webrtc.org/1308403003
Cr-Commit-Position: refs/heads/master@{#9969}
diff --git a/webrtc/video/full_stack_plot.py b/webrtc/video/full_stack_plot.py
index 92b50a4..0e89901 100755
--- a/webrtc/video/full_stack_plot.py
+++ b/webrtc/video/full_stack_plot.py
@@ -7,7 +7,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
-"""Generate graphs for data generated by full_stack_quality_sampler.cc.
+"""Generate graphs for data generated by loopback tests.
Usage examples:
Show end to end time for a single full stack test.
@@ -76,7 +76,6 @@
name_to_id = {field[1]: field[0] for field in _fields}
id_to_title = {field[0]: field[2] for field in _fields}
-
def field_arg_to_id(arg):
if arg == "none":
return None
@@ -297,7 +296,6 @@
def get_parser():
class CustomAction(argparse.Action):
-
def __call__(self, parser, namespace, values, option_string=None):
if "ordered_args" not in namespace:
namespace.ordered_args = []
@@ -331,7 +329,7 @@
"Otherwise, a window will be shown.")
parser.add_argument(
"files", nargs="+", action=CustomAction,
- help="List of text-based files generated by full_stack.cc")
+ help="List of text-based files generated by loopback tests.")
return parser