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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 virtual void SendSenderReport( | 137 virtual void SendSenderReport( |
138 uint32 ssrc, | 138 uint32 ssrc, |
139 base::TimeTicks current_time, | 139 base::TimeTicks current_time, |
140 uint32 current_time_as_rtp_timestamp) OVERRIDE { | 140 uint32 current_time_as_rtp_timestamp) OVERRIDE { |
141 transport_->SendSenderReport(ssrc, | 141 transport_->SendSenderReport(ssrc, |
142 current_time, | 142 current_time, |
143 current_time_as_rtp_timestamp); | 143 current_time_as_rtp_timestamp); |
144 } | 144 } |
145 | 145 |
146 // Retransmission request. | 146 virtual void CancelSendingFrames( |
147 virtual void ResendPackets( | 147 uint32 ssrc, |
148 bool is_audio, | 148 const std::vector<uint32>& frame_ids) OVERRIDE { |
149 const MissingFramesAndPacketsMap& missing_packets, | 149 transport_->CancelSendingFrames(ssrc, frame_ids); |
150 bool cancel_rtx_if_not_in_list, | 150 } |
151 base::TimeDelta dedupe_window) OVERRIDE { | 151 |
152 transport_->ResendPackets( | 152 virtual void ResendFrameForKickstart(uint32 ssrc, |
153 is_audio, missing_packets, cancel_rtx_if_not_in_list, dedupe_window); | 153 uint32 frame_id) OVERRIDE { |
| 154 transport_->ResendFrameForKickstart(ssrc, frame_id); |
154 } | 155 } |
155 | 156 |
156 virtual PacketReceiverCallback PacketReceiverForTesting() OVERRIDE { | 157 virtual PacketReceiverCallback PacketReceiverForTesting() OVERRIDE { |
157 return transport_->PacketReceiverForTesting(); | 158 return transport_->PacketReceiverForTesting(); |
158 } | 159 } |
159 | 160 |
160 private: | 161 private: |
161 scoped_ptr<CastTransportSender> transport_; | 162 scoped_ptr<CastTransportSender> transport_; |
162 uint64* encoded_video_bytes_; | 163 uint64* encoded_video_bytes_; |
163 uint64* encoded_audio_bytes_; | 164 uint64* encoded_audio_bytes_; |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 media::cast::CastBenchmark benchmark; | 707 media::cast::CastBenchmark benchmark; |
707 if (getenv("PROFILE_FILE")) { | 708 if (getenv("PROFILE_FILE")) { |
708 std::string profile_file(getenv("PROFILE_FILE")); | 709 std::string profile_file(getenv("PROFILE_FILE")); |
709 base::debug::StartProfiling(profile_file); | 710 base::debug::StartProfiling(profile_file); |
710 benchmark.Run(); | 711 benchmark.Run(); |
711 base::debug::StopProfiling(); | 712 base::debug::StopProfiling(); |
712 } else { | 713 } else { |
713 benchmark.Run(); | 714 benchmark.Run(); |
714 } | 715 } |
715 } | 716 } |
OLD | NEW |