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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 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
« no previous file with comments | « webrtc/video/rtc_event_log_unittest.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 "", 147 "",
148 "Field trials control experimental feature code which can be forced. " 148 "Field trials control experimental feature code which can be forced. "
149 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/" 149 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
150 " will assign the group Enable to field trial WebRTC-FooFeature. Multiple " 150 " will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
151 "trials are separated by \"/\""); 151 "trials are separated by \"/\"");
152 } // namespace flags 152 } // namespace flags
153 153
154 class ScreenshareLoopback : public test::Loopback { 154 class ScreenshareLoopback : public test::Loopback {
155 public: 155 public:
156 explicit ScreenshareLoopback(const Config& config) : Loopback(config) { 156 explicit ScreenshareLoopback(const Config& config) : Loopback(config) {
157 CHECK_GE(config.num_temporal_layers, 1u); 157 RTC_CHECK_GE(config.num_temporal_layers, 1u);
158 CHECK_LE(config.num_temporal_layers, 2u); 158 RTC_CHECK_LE(config.num_temporal_layers, 2u);
159 CHECK_GE(config.num_spatial_layers, 1u); 159 RTC_CHECK_GE(config.num_spatial_layers, 1u);
160 CHECK_LE(config.num_spatial_layers, 5u); 160 RTC_CHECK_LE(config.num_spatial_layers, 5u);
161 CHECK(config.num_spatial_layers == 1 || config.codec == "VP9"); 161 RTC_CHECK(config.num_spatial_layers == 1 || config.codec == "VP9");
162 CHECK(config.num_spatial_layers == 1 || config.num_temporal_layers == 1); 162 RTC_CHECK(config.num_spatial_layers == 1 ||
163 CHECK_LT(config.tl_discard_threshold, config.num_temporal_layers); 163 config.num_temporal_layers == 1);
164 CHECK_LT(config.sl_discard_threshold, config.num_spatial_layers); 164 RTC_CHECK_LT(config.tl_discard_threshold, config.num_temporal_layers);
165 RTC_CHECK_LT(config.sl_discard_threshold, config.num_spatial_layers);
165 166
166 vp8_settings_ = VideoEncoder::GetDefaultVp8Settings(); 167 vp8_settings_ = VideoEncoder::GetDefaultVp8Settings();
167 vp8_settings_.denoisingOn = false; 168 vp8_settings_.denoisingOn = false;
168 vp8_settings_.frameDroppingOn = false; 169 vp8_settings_.frameDroppingOn = false;
169 vp8_settings_.numberOfTemporalLayers = 170 vp8_settings_.numberOfTemporalLayers =
170 static_cast<unsigned char>(config.num_temporal_layers); 171 static_cast<unsigned char>(config.num_temporal_layers);
171 172
172 vp9_settings_ = VideoEncoder::GetDefaultVp9Settings(); 173 vp9_settings_ = VideoEncoder::GetDefaultVp9Settings();
173 vp9_settings_.denoisingOn = false; 174 vp9_settings_.denoisingOn = false;
174 vp9_settings_.frameDroppingOn = false; 175 vp9_settings_.frameDroppingOn = false;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 test::VideoCapturer* CreateCapturer(VideoSendStream* send_stream) override { 210 test::VideoCapturer* CreateCapturer(VideoSendStream* send_stream) override {
210 std::vector<std::string> slides; 211 std::vector<std::string> slides;
211 slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv")); 212 slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv"));
212 slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv")); 213 slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv"));
213 slides.push_back(test::ResourcePath("photo_1850_1110", "yuv")); 214 slides.push_back(test::ResourcePath("photo_1850_1110", "yuv"));
214 slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv")); 215 slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv"));
215 216
216 // Fixed for input resolution for prerecorded screenshare content. 217 // Fixed for input resolution for prerecorded screenshare content.
217 const size_t kWidth = 1850; 218 const size_t kWidth = 1850;
218 const size_t kHeight = 1110; 219 const size_t kHeight = 1110;
219 CHECK_LE(flags::Width(), kWidth); 220 RTC_CHECK_LE(flags::Width(), kWidth);
220 CHECK_LE(flags::Height(), kHeight); 221 RTC_CHECK_LE(flags::Height(), kHeight);
221 CHECK_GT(flags::SlideChangeInterval(), 0); 222 RTC_CHECK_GT(flags::SlideChangeInterval(), 0);
222 const int kPauseDurationMs = 223 const int kPauseDurationMs =
223 (flags::SlideChangeInterval() - flags::ScrollDuration()) * 1000; 224 (flags::SlideChangeInterval() - flags::ScrollDuration()) * 1000;
224 CHECK_LE(flags::ScrollDuration(), flags::SlideChangeInterval()); 225 RTC_CHECK_LE(flags::ScrollDuration(), flags::SlideChangeInterval());
225 226
226 test::FrameGenerator* frame_generator = 227 test::FrameGenerator* frame_generator =
227 test::FrameGenerator::CreateScrollingInputFromYuvFiles( 228 test::FrameGenerator::CreateScrollingInputFromYuvFiles(
228 Clock::GetRealTimeClock(), slides, kWidth, kHeight, flags::Width(), 229 Clock::GetRealTimeClock(), slides, kWidth, kHeight, flags::Width(),
229 flags::Height(), flags::ScrollDuration() * 1000, kPauseDurationMs); 230 flags::Height(), flags::ScrollDuration() * 1000, kPauseDurationMs);
230 231
231 test::FrameGeneratorCapturer* capturer(new test::FrameGeneratorCapturer( 232 test::FrameGeneratorCapturer* capturer(new test::FrameGeneratorCapturer(
232 clock_, send_stream->Input(), frame_generator, flags::Fps())); 233 clock_, send_stream->Input(), frame_generator, flags::Fps()));
233 EXPECT_TRUE(capturer->Init()); 234 EXPECT_TRUE(capturer->Init());
234 return capturer; 235 return capturer;
(...skipping 28 matching lines...) Expand all
263 } // namespace webrtc 264 } // namespace webrtc
264 265
265 int main(int argc, char* argv[]) { 266 int main(int argc, char* argv[]) {
266 ::testing::InitGoogleTest(&argc, argv); 267 ::testing::InitGoogleTest(&argc, argv);
267 google::ParseCommandLineFlags(&argc, &argv, true); 268 google::ParseCommandLineFlags(&argc, &argv, true);
268 webrtc::test::InitFieldTrialsFromString( 269 webrtc::test::InitFieldTrialsFromString(
269 webrtc::flags::FLAGS_force_fieldtrials); 270 webrtc::flags::FLAGS_force_fieldtrials);
270 webrtc::test::RunTest(webrtc::Loopback); 271 webrtc::test::RunTest(webrtc::Loopback);
271 return 0; 272 return 0;
272 } 273 }
OLDNEW
« no previous file with comments | « webrtc/video/rtc_event_log_unittest.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698