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

Side by Side Diff: media/cast/sender/video_sender.cc

Issue 519443002: Cast: merge InsertCoded{Audio,Video}Frame into InsertFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more missing test file fixed Created 6 years, 3 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/sender/audio_sender.cc ('k') | media/cast/test/cast_benchmarks.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 #include "media/cast/sender/video_sender.h" 5 #include "media/cast/sender/video_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 SendRtcpReport(is_last_aggressive_report); 204 SendRtcpReport(is_last_aggressive_report);
205 } 205 }
206 206
207 congestion_control_.SendFrameToTransport( 207 congestion_control_.SendFrameToTransport(
208 frame_id, encoded_frame->data.size() * 8, last_send_time_); 208 frame_id, encoded_frame->data.size() * 8, last_send_time_);
209 209
210 if (send_target_playout_delay_) { 210 if (send_target_playout_delay_) {
211 encoded_frame->new_playout_delay_ms = 211 encoded_frame->new_playout_delay_ms =
212 target_playout_delay_.InMilliseconds(); 212 target_playout_delay_.InMilliseconds();
213 } 213 }
214 transport_sender_->InsertCodedVideoFrame(*encoded_frame); 214 transport_sender_->InsertFrame(ssrc_, *encoded_frame);
215 } 215 }
216 216
217 void VideoSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) { 217 void VideoSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
218 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 218 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
219 219
220 base::TimeDelta rtt; 220 base::TimeDelta rtt;
221 base::TimeDelta avg_rtt; 221 base::TimeDelta avg_rtt;
222 base::TimeDelta min_rtt; 222 base::TimeDelta min_rtt;
223 base::TimeDelta max_rtt; 223 base::TimeDelta max_rtt;
224 if (is_rtt_available()) { 224 if (is_rtt_available()) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 << duration_in_flight.InMicroseconds() << " usec (" 319 << duration_in_flight.InMicroseconds() << " usec ("
320 << (target_playout_delay_ > base::TimeDelta() ? 320 << (target_playout_delay_ > base::TimeDelta() ?
321 100 * duration_in_flight / target_playout_delay_ : 321 100 * duration_in_flight / target_playout_delay_ :
322 kint64max) << "%)"; 322 kint64max) << "%)";
323 return frames_in_flight >= max_unacked_frames_ || 323 return frames_in_flight >= max_unacked_frames_ ||
324 duration_in_flight >= target_playout_delay_; 324 duration_in_flight >= target_playout_delay_;
325 } 325 }
326 326
327 } // namespace cast 327 } // namespace cast
328 } // namespace media 328 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/audio_sender.cc ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698