Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment_gencfgs.py

Issue 2995363002: Replace gflags usages with rtc_base/flags in all targets based on test_main (Closed)
Patch Set: Improve error messages Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Generate .json files with which the APM module can be tested using the 10 """Generate .json files with which the APM module can be tested using the
11 apm_quality_assessment.py script. 11 apm_quality_assessment.py script.
12 """ 12 """
13 13
14 import logging 14 import logging
15 import os 15 import os
16 16
17 import quality_assessment.data_access as data_access 17 import quality_assessment.data_access as data_access
18 18
19 OUTPUT_PATH = os.path.abspath('apm_configs') 19 OUTPUT_PATH = os.path.abspath('apm_configs')
20 20
21 21
22 def _GenerateDefaultOverridden(config_override): 22 def _GenerateDefaultOverridden(config_override):
23 """Generates one or more APM overriden configurations. 23 """Generates one or more APM overriden configurations.
24 24
25 For each item in config_override, it overrides the default configuration and 25 For each item in config_override, it overrides the default configuration and
26 writes a new APM configuration file. 26 writes a new APM configuration file.
27 27
28 The default settings are loaded via "-all_default". 28 The default settings are loaded via "-all_default".
29 Check "src/webrtc/modules/audio_processing/test/audioproc_float.cc" and search 29 Check "src/webrtc/modules/audio_processing/test/audioproc_float.cc" and search
30 for "if (FLAGS_all_default) {". 30 for "if (FLAG_all_default) {".
31 31
32 For instance, in 55eb6d621489730084927868fed195d3645a9ec9 the default is this: 32 For instance, in 55eb6d621489730084927868fed195d3645a9ec9 the default is this:
33 settings.use_aec = rtc::Optional<bool>(true); 33 settings.use_aec = rtc::Optional<bool>(true);
34 settings.use_aecm = rtc::Optional<bool>(false); 34 settings.use_aecm = rtc::Optional<bool>(false);
35 settings.use_agc = rtc::Optional<bool>(true); 35 settings.use_agc = rtc::Optional<bool>(true);
36 settings.use_bf = rtc::Optional<bool>(false); 36 settings.use_bf = rtc::Optional<bool>(false);
37 settings.use_ed = rtc::Optional<bool>(false); 37 settings.use_ed = rtc::Optional<bool>(false);
38 settings.use_hpf = rtc::Optional<bool>(true); 38 settings.use_hpf = rtc::Optional<bool>(true);
39 settings.use_ie = rtc::Optional<bool>(false); 39 settings.use_ie = rtc::Optional<bool>(false);
40 settings.use_le = rtc::Optional<bool>(true); 40 settings.use_le = rtc::Optional<bool>(true);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 92
93 def main(): 93 def main():
94 logging.basicConfig(level=logging.INFO) 94 logging.basicConfig(level=logging.INFO)
95 _GenerateAllDefaultPlusOne() 95 _GenerateAllDefaultPlusOne()
96 _GenerateAllDefaultButOne() 96 _GenerateAllDefaultButOne()
97 97
98 98
99 if __name__ == '__main__': 99 if __name__ == '__main__':
100 main() 100 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698