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

Side by Side Diff: media/cast/test/cast_benchmarks.cc

Issue 839983002: Adding "target_frame_rate" variable in lieu of "max_frame_rate" for FrameReceiverConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « media/cast/receiver/frame_receiver_unittest.cc ('k') | media/cast/test/end2end_unittest.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This program benchmarks the theoretical throughput of the cast library. 5 // This program benchmarks the theoretical throughput of the cast library.
6 // It runs using a fake clock, simulated network and fake codecs. This allows 6 // It runs using a fake clock, simulated network and fake codecs. This allows
7 // tests to run much faster than real time. 7 // tests to run much faster than real time.
8 // To run the program, run: 8 // To run the program, run:
9 // $ ./out/Release/cast_benchmarks | tee benchmarkoutput.asc 9 // $ ./out/Release/cast_benchmarks | tee benchmarkoutput.asc
10 // This may take a while, when it is done, you can view the data with 10 // This may take a while, when it is done, you can view the data with
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 audio_sender_config_.bitrate = kDefaultAudioEncoderBitrate; 249 audio_sender_config_.bitrate = kDefaultAudioEncoderBitrate;
250 audio_sender_config_.codec = audio_codec; 250 audio_sender_config_.codec = audio_codec;
251 251
252 audio_receiver_config_.feedback_ssrc = 252 audio_receiver_config_.feedback_ssrc =
253 audio_sender_config_.receiver_ssrc; 253 audio_sender_config_.receiver_ssrc;
254 audio_receiver_config_.incoming_ssrc = audio_sender_config_.ssrc; 254 audio_receiver_config_.incoming_ssrc = audio_sender_config_.ssrc;
255 audio_receiver_config_.rtp_payload_type = 255 audio_receiver_config_.rtp_payload_type =
256 audio_sender_config_.rtp_payload_type; 256 audio_sender_config_.rtp_payload_type;
257 audio_receiver_config_.frequency = audio_sender_config_.frequency; 257 audio_receiver_config_.frequency = audio_sender_config_.frequency;
258 audio_receiver_config_.channels = kAudioChannels; 258 audio_receiver_config_.channels = kAudioChannels;
259 audio_receiver_config_.max_frame_rate = 100; 259 audio_receiver_config_.target_frame_rate = 100;
260 audio_receiver_config_.codec = audio_sender_config_.codec; 260 audio_receiver_config_.codec = audio_sender_config_.codec;
261 audio_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs; 261 audio_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs;
262 262
263 video_sender_config_.ssrc = 3; 263 video_sender_config_.ssrc = 3;
264 video_sender_config_.receiver_ssrc = 4; 264 video_sender_config_.receiver_ssrc = 4;
265 video_sender_config_.max_playout_delay = 265 video_sender_config_.max_playout_delay =
266 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs); 266 base::TimeDelta::FromMilliseconds(kTargetPlayoutDelayMs);
267 video_sender_config_.rtp_payload_type = 97; 267 video_sender_config_.rtp_payload_type = 97;
268 video_sender_config_.use_external_encoder = false; 268 video_sender_config_.use_external_encoder = false;
269 video_sender_config_.width = kVideoHdWidth; 269 video_sender_config_.width = kVideoHdWidth;
(...skipping 15 matching lines...) Expand all
285 video_sender_config_.codec = video_codec; 285 video_sender_config_.codec = video_codec;
286 286
287 video_receiver_config_.feedback_ssrc = 287 video_receiver_config_.feedback_ssrc =
288 video_sender_config_.receiver_ssrc; 288 video_sender_config_.receiver_ssrc;
289 video_receiver_config_.incoming_ssrc = video_sender_config_.ssrc; 289 video_receiver_config_.incoming_ssrc = video_sender_config_.ssrc;
290 video_receiver_config_.rtp_payload_type = 290 video_receiver_config_.rtp_payload_type =
291 video_sender_config_.rtp_payload_type; 291 video_sender_config_.rtp_payload_type;
292 video_receiver_config_.codec = video_sender_config_.codec; 292 video_receiver_config_.codec = video_sender_config_.codec;
293 video_receiver_config_.frequency = kVideoFrequency; 293 video_receiver_config_.frequency = kVideoFrequency;
294 video_receiver_config_.channels = 1; 294 video_receiver_config_.channels = 1;
295 video_receiver_config_.max_frame_rate = 100; 295 video_receiver_config_.target_frame_rate = 100;
296 video_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs; 296 video_receiver_config_.rtp_max_delay_ms = kTargetPlayoutDelayMs;
297 } 297 }
298 298
299 void SetSenderClockSkew(double skew, base::TimeDelta offset) { 299 void SetSenderClockSkew(double skew, base::TimeDelta offset) {
300 testing_clock_sender_->SetSkew(skew, offset); 300 testing_clock_sender_->SetSkew(skew, offset);
301 task_runner_sender_->SetSkew(1.0 / skew); 301 task_runner_sender_->SetSkew(1.0 / skew);
302 } 302 }
303 303
304 void SetReceiverClockSkew(double skew, base::TimeDelta offset) { 304 void SetReceiverClockSkew(double skew, base::TimeDelta offset) {
305 testing_clock_receiver_->SetSkew(skew, offset); 305 testing_clock_receiver_->SetSkew(skew, offset);
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 media::cast::CastBenchmark benchmark; 747 media::cast::CastBenchmark benchmark;
748 if (getenv("PROFILE_FILE")) { 748 if (getenv("PROFILE_FILE")) {
749 std::string profile_file(getenv("PROFILE_FILE")); 749 std::string profile_file(getenv("PROFILE_FILE"));
750 base::debug::StartProfiling(profile_file); 750 base::debug::StartProfiling(profile_file);
751 benchmark.Run(); 751 benchmark.Run();
752 base::debug::StopProfiling(); 752 base::debug::StopProfiling();
753 } else { 753 } else {
754 benchmark.Run(); 754 benchmark.Run();
755 } 755 }
756 } 756 }
OLDNEW
« no previous file with comments | « media/cast/receiver/frame_receiver_unittest.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698