OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |