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

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: 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
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 SendRtcpReport(is_last_aggressive_report); 213 SendRtcpReport(is_last_aggressive_report);
214 } 214 }
215 215
216 congestion_control_.SendFrameToTransport( 216 congestion_control_.SendFrameToTransport(
217 frame_id, encoded_frame->data.size() * 8, last_send_time_); 217 frame_id, encoded_frame->data.size() * 8, last_send_time_);
218 218
219 if (send_target_playout_delay_) { 219 if (send_target_playout_delay_) {
220 encoded_frame->new_playout_delay_ms = 220 encoded_frame->new_playout_delay_ms =
221 target_playout_delay_.InMilliseconds(); 221 target_playout_delay_.InMilliseconds();
222 } 222 }
223 transport_sender_->InsertCodedVideoFrame(*encoded_frame); 223 transport_sender_->InsertFrame(ssrc_, *encoded_frame);
224 } 224 }
225 225
226 void VideoSender::ResendCheck() { 226 void VideoSender::ResendCheck() {
227 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 227 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
228 DCHECK(!last_send_time_.is_null()); 228 DCHECK(!last_send_time_.is_null());
229 const base::TimeDelta time_since_last_send = 229 const base::TimeDelta time_since_last_send =
230 cast_environment_->Clock()->NowTicks() - last_send_time_; 230 cast_environment_->Clock()->NowTicks() - last_send_time_;
231 if (time_since_last_send > target_playout_delay_) { 231 if (time_since_last_send > target_playout_delay_) {
232 if (latest_acked_frame_id_ == last_sent_frame_id_) { 232 if (latest_acked_frame_id_ == last_sent_frame_id_) {
233 // Last frame acked, no point in doing anything 233 // Last frame acked, no point in doing anything
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 356 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
357 DCHECK(!last_send_time_.is_null()); 357 DCHECK(!last_send_time_.is_null());
358 VLOG(1) << "Resending last packet of frame " << last_sent_frame_id_ 358 VLOG(1) << "Resending last packet of frame " << last_sent_frame_id_
359 << " to kick-start."; 359 << " to kick-start.";
360 last_send_time_ = cast_environment_->Clock()->NowTicks(); 360 last_send_time_ = cast_environment_->Clock()->NowTicks();
361 transport_sender_->ResendFrameForKickstart(ssrc_, last_sent_frame_id_); 361 transport_sender_->ResendFrameForKickstart(ssrc_, last_sent_frame_id_);
362 } 362 }
363 363
364 } // namespace cast 364 } // namespace cast
365 } // namespace media 365 } // namespace media
OLDNEW
« media/cast/net/cast_transport_sender.h ('K') | « media/cast/sender/audio_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698