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

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

Issue 343523005: Cast: Avoid retransmit if we sent the same packet recently (less than RTT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bugfix Created 6 years, 6 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/rtcp/rtcp_unittest.cc ('k') | media/cast/transport/cast_transport_sender.h » ('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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 rtp_timestamp, 205 rtp_timestamp,
206 dlrr, 206 dlrr,
207 sending_ssrc, 207 sending_ssrc,
208 c_name); 208 c_name);
209 } 209 }
210 210
211 // Retransmission request. 211 // Retransmission request.
212 virtual void ResendPackets( 212 virtual void ResendPackets(
213 bool is_audio, 213 bool is_audio,
214 const MissingFramesAndPacketsMap& missing_packets, 214 const MissingFramesAndPacketsMap& missing_packets,
215 bool cancel_rtx_if_not_in_list) OVERRIDE { 215 bool cancel_rtx_if_not_in_list,
216 base::TimeDelta dedupe_window) OVERRIDE {
216 transport_->ResendPackets( 217 transport_->ResendPackets(
217 is_audio, missing_packets, cancel_rtx_if_not_in_list); 218 is_audio, missing_packets, cancel_rtx_if_not_in_list, dedupe_window);
218 } 219 }
219 220
220 private: 221 private:
221 scoped_ptr<transport::CastTransportSender> transport_; 222 scoped_ptr<transport::CastTransportSender> transport_;
222 uint64* encoded_video_bytes_; 223 uint64* encoded_video_bytes_;
223 uint64* encoded_audio_bytes_; 224 uint64* encoded_audio_bytes_;
224 }; 225 };
225 226
226 struct MeasuringPoint { 227 struct MeasuringPoint {
227 MeasuringPoint(double bitrate_, double latency_, double percent_packet_drop_) 228 MeasuringPoint(double bitrate_, double latency_, double percent_packet_drop_)
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 media::cast::CastBenchmark benchmark; 762 media::cast::CastBenchmark benchmark;
762 if (getenv("PROFILE_FILE")) { 763 if (getenv("PROFILE_FILE")) {
763 std::string profile_file(getenv("PROFILE_FILE")); 764 std::string profile_file(getenv("PROFILE_FILE"));
764 base::debug::StartProfiling(profile_file); 765 base::debug::StartProfiling(profile_file);
765 benchmark.Run(); 766 benchmark.Run();
766 base::debug::StopProfiling(); 767 base::debug::StopProfiling();
767 } else { 768 } else {
768 benchmark.Run(); 769 benchmark.Run();
769 } 770 }
770 } 771 }
OLDNEW
« no previous file with comments | « media/cast/rtcp/rtcp_unittest.cc ('k') | media/cast/transport/cast_transport_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698