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

Side by Side Diff: webrtc/video/video_loopback.cc

Issue 1351693005: Read the number of TLs for VP9 too + cleanup (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase master and reordering of params Created 5 years, 2 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 10
11 #include <stdio.h> 11 #include <stdio.h>
12 12
13 #include <map>
14
15 #include "gflags/gflags.h" 13 #include "gflags/gflags.h"
16 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
17 15
18 #include "webrtc/test/field_trial.h" 16 #include "webrtc/test/field_trial.h"
19 #include "webrtc/test/run_test.h" 17 #include "webrtc/test/run_test.h"
20 #include "webrtc/typedefs.h"
21 #include "webrtc/video/video_quality_test.h" 18 #include "webrtc/video/video_quality_test.h"
22 19
23 namespace webrtc { 20 namespace webrtc {
24
25 namespace flags { 21 namespace flags {
26 22
27 DEFINE_int32(width, 640, "Video width."); 23 DEFINE_int32(width, 640, "Video width.");
28 size_t Width() { 24 size_t Width() {
29 return static_cast<size_t>(FLAGS_width); 25 return static_cast<size_t>(FLAGS_width);
30 } 26 }
31 27
32 DEFINE_int32(height, 480, "Video height."); 28 DEFINE_int32(height, 480, "Video height.");
33 size_t Height() { 29 size_t Height() {
34 return static_cast<size_t>(FLAGS_height); 30 return static_cast<size_t>(FLAGS_height);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 109 }
114 110
115 DEFINE_int32( 111 DEFINE_int32(
116 tl_discard_threshold, 112 tl_discard_threshold,
117 0, 113 0,
118 "Discard TLs with id greater or equal the threshold. 0 to disable."); 114 "Discard TLs with id greater or equal the threshold. 0 to disable.");
119 size_t TLDiscardThreshold() { 115 size_t TLDiscardThreshold() {
120 return static_cast<size_t>(FLAGS_tl_discard_threshold); 116 return static_cast<size_t>(FLAGS_tl_discard_threshold);
121 } 117 }
122 118
119 DEFINE_bool(disable_wrapper_frame_dropper,
120 false,
121 "Disable FrameDropper in the wrapper. "
122 "Does not affect drop on capture or PacedSender.");
123
123 DEFINE_string(clip, 124 DEFINE_string(clip,
124 "", 125 "",
125 "Name of the clip to show. If empty, using chroma generator."); 126 "Name of the clip to show. If empty, using chroma generator.");
126 std::string Clip() { 127 std::string Clip() {
127 return static_cast<std::string>(FLAGS_clip); 128 return static_cast<std::string>(FLAGS_clip);
128 } 129 }
129 130
130 DEFINE_string( 131 DEFINE_string(
131 output_filename, 132 output_filename,
132 "", 133 "",
(...skipping 26 matching lines...) Expand all
159 160
160 std::string clip = flags::Clip(); 161 std::string clip = flags::Clip();
161 std::string graph_title = clip.empty() ? "" : "video " + clip; 162 std::string graph_title = clip.empty() ? "" : "video " + clip;
162 VideoQualityTest::Params params{ 163 VideoQualityTest::Params params{
163 {flags::Width(), flags::Height(), flags::Fps(), 164 {flags::Width(), flags::Height(), flags::Fps(),
164 flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000, 165 flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000,
165 flags::MaxBitrateKbps() * 1000, flags::Codec(), 166 flags::MaxBitrateKbps() * 1000, flags::Codec(),
166 flags::NumTemporalLayers(), 167 flags::NumTemporalLayers(),
167 0, // No min transmit bitrate. 168 0, // No min transmit bitrate.
168 call_bitrate_config, flags::TLDiscardThreshold(), 169 call_bitrate_config, flags::TLDiscardThreshold(),
169 flags::FLAGS_send_side_bwe}, 170 flags::FLAGS_send_side_bwe, flags::FLAGS_disable_wrapper_frame_dropper},
170 {clip}, 171 {clip},
171 {}, // Screenshare specific. 172 {}, // Screenshare specific.
172 {graph_title, 0.0, 0.0, flags::DurationSecs(), flags::OutputFilename()}, 173 {graph_title, 0.0, 0.0, flags::DurationSecs(), flags::OutputFilename()},
173 pipe_config, 174 pipe_config,
174 flags::FLAGS_logs}; 175 flags::FLAGS_logs};
175 176
176 VideoQualityTest test; 177 VideoQualityTest test;
177 if (flags::OutputFilename().empty()) 178 if (flags::OutputFilename().empty())
178 test.RunWithVideoRenderer(params); 179 test.RunWithVideoRenderer(params);
179 else 180 else
180 test.RunWithAnalyzer(params); 181 test.RunWithAnalyzer(params);
181 } 182 }
182 } // namespace webrtc 183 } // namespace webrtc
183 184
184 int main(int argc, char* argv[]) { 185 int main(int argc, char* argv[]) {
185 ::testing::InitGoogleTest(&argc, argv); 186 ::testing::InitGoogleTest(&argc, argv);
186 google::ParseCommandLineFlags(&argc, &argv, true); 187 google::ParseCommandLineFlags(&argc, &argv, true);
187 webrtc::test::InitFieldTrialsFromString( 188 webrtc::test::InitFieldTrialsFromString(
188 webrtc::flags::FLAGS_force_fieldtrials); 189 webrtc::flags::FLAGS_force_fieldtrials);
189 webrtc::test::RunTest(webrtc::Loopback); 190 webrtc::test::RunTest(webrtc::Loopback);
190 return 0; 191 return 0;
191 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698