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

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

Issue 445933002: Cast: Move retransmission to the transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed test compile Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/sender/video_sender_unittest.cc ('k') | no next file » | 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « media/cast/sender/video_sender_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698