OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/video_sender/video_sender.h" | 5 #include "media/cast/video_sender/video_sender.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 scoped_refptr<CastEnvironment> cast_environment, | 87 scoped_refptr<CastEnvironment> cast_environment, |
88 const VideoSenderConfig& video_config, | 88 const VideoSenderConfig& video_config, |
89 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, | 89 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, |
90 const CastInitializationCallback& initialization_status, | 90 const CastInitializationCallback& initialization_status, |
91 transport::CastTransportSender* const transport_sender) | 91 transport::CastTransportSender* const transport_sender) |
92 : rtp_max_delay_(base::TimeDelta::FromMilliseconds( | 92 : rtp_max_delay_(base::TimeDelta::FromMilliseconds( |
93 video_config.rtp_config.max_delay_ms)), | 93 video_config.rtp_config.max_delay_ms)), |
94 max_frame_rate_(video_config.max_frame_rate), | 94 max_frame_rate_(video_config.max_frame_rate), |
95 cast_environment_(cast_environment), | 95 cast_environment_(cast_environment), |
96 transport_sender_(transport_sender), | 96 transport_sender_(transport_sender), |
97 event_subscriber_( | 97 event_subscriber_(kMaxEventSubscriberEntries), |
98 cast_environment_->GetMessageSingleThreadTaskRunnerForThread( | |
99 CastEnvironment::MAIN), | |
100 kMaxEventSubscriberEntries), | |
101 rtcp_feedback_(new LocalRtcpVideoSenderFeedback(this)), | 98 rtcp_feedback_(new LocalRtcpVideoSenderFeedback(this)), |
102 last_acked_frame_id_(-1), | 99 last_acked_frame_id_(-1), |
103 last_sent_frame_id_(-1), | 100 last_sent_frame_id_(-1), |
104 duplicate_ack_(0), | 101 duplicate_ack_(0), |
105 last_skip_count_(0), | 102 last_skip_count_(0), |
106 congestion_control_(cast_environment->Clock(), | 103 congestion_control_(cast_environment->Clock(), |
107 video_config.congestion_control_back_off, | 104 video_config.congestion_control_back_off, |
108 video_config.max_bitrate, video_config.min_bitrate, | 105 video_config.max_bitrate, video_config.min_bitrate, |
109 video_config.start_bitrate), | 106 video_config.start_bitrate), |
110 initialized_(false), | 107 initialized_(false), |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 473 |
477 void VideoSender::ResendPacketsOnTransportThread( | 474 void VideoSender::ResendPacketsOnTransportThread( |
478 const transport::MissingFramesAndPacketsMap& missing_packets) { | 475 const transport::MissingFramesAndPacketsMap& missing_packets) { |
479 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); | 476 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); |
480 last_send_time_ = cast_environment_->Clock()->NowTicks(); | 477 last_send_time_ = cast_environment_->Clock()->NowTicks(); |
481 transport_sender_->ResendPackets(false, missing_packets); | 478 transport_sender_->ResendPackets(false, missing_packets); |
482 } | 479 } |
483 | 480 |
484 } // namespace cast | 481 } // namespace cast |
485 } // namespace media | 482 } // namespace media |
OLD | NEW |