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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 frames_in_encoder_(0), | 44 frames_in_encoder_(0), |
45 last_sent_frame_id_(0), | 45 last_sent_frame_id_(0), |
46 latest_acked_frame_id_(0), | 46 latest_acked_frame_id_(0), |
47 duplicate_ack_counter_(0), | 47 duplicate_ack_counter_(0), |
48 congestion_control_(cast_environment->Clock(), | 48 congestion_control_(cast_environment->Clock(), |
49 video_config.max_bitrate, | 49 video_config.max_bitrate, |
50 video_config.min_bitrate, | 50 video_config.min_bitrate, |
51 max_unacked_frames_), | 51 max_unacked_frames_), |
52 cast_initialization_status_(STATUS_VIDEO_UNINITIALIZED), | 52 cast_initialization_status_(STATUS_VIDEO_UNINITIALIZED), |
53 weak_factory_(this) { | 53 weak_factory_(this) { |
54 VLOG(1) << "max_unacked_frames " << max_unacked_frames_; | 54 VLOG(1) << "max_unacked_frames is " << max_unacked_frames_ |
| 55 << " for target_playout_delay=" |
| 56 << target_playout_delay_.InMilliseconds() << " ms" |
| 57 << " and max_frame_rate=" << video_config.max_frame_rate; |
55 DCHECK_GT(max_unacked_frames_, 0); | 58 DCHECK_GT(max_unacked_frames_, 0); |
56 | 59 |
57 if (video_config.use_external_encoder) { | 60 if (video_config.use_external_encoder) { |
58 video_encoder_.reset(new ExternalVideoEncoder(cast_environment, | 61 video_encoder_.reset(new ExternalVideoEncoder(cast_environment, |
59 video_config, | 62 video_config, |
60 create_vea_cb, | 63 create_vea_cb, |
61 create_video_encode_mem_cb)); | 64 create_video_encode_mem_cb)); |
62 } else { | 65 } else { |
63 video_encoder_.reset(new VideoEncoderImpl( | 66 video_encoder_.reset(new VideoEncoderImpl( |
64 cast_environment, video_config, max_unacked_frames_)); | 67 cast_environment, video_config, max_unacked_frames_)); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 last_send_time_ = cast_environment_->Clock()->NowTicks(); | 351 last_send_time_ = cast_environment_->Clock()->NowTicks(); |
349 | 352 |
350 // Sending this extra packet is to kick-start the session. There is | 353 // Sending this extra packet is to kick-start the session. There is |
351 // no need to optimize re-transmission for this case. | 354 // no need to optimize re-transmission for this case. |
352 transport_sender_->ResendPackets(false, missing_frames_and_packets, | 355 transport_sender_->ResendPackets(false, missing_frames_and_packets, |
353 false, rtt_); | 356 false, rtt_); |
354 } | 357 } |
355 | 358 |
356 } // namespace cast | 359 } // namespace cast |
357 } // namespace media | 360 } // namespace media |
OLD | NEW |