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