OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/video/video_receive_stream.h" | 11 #include "webrtc/video/video_receive_stream.h" |
12 | 12 |
13 #include <stdlib.h> | 13 #include <stdlib.h> |
14 | 14 |
15 #include <set> | 15 #include <set> |
16 #include <string> | 16 #include <string> |
| 17 #include <utility> |
17 | 18 |
18 #include "webrtc/base/checks.h" | 19 #include "webrtc/base/checks.h" |
19 #include "webrtc/base/logging.h" | 20 #include "webrtc/base/logging.h" |
20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 21 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
21 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" | 22 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" |
22 #include "webrtc/modules/utility/include/process_thread.h" | 23 #include "webrtc/modules/utility/include/process_thread.h" |
23 #include "webrtc/modules/video_coding/include/video_coding.h" | 24 #include "webrtc/modules/video_coding/include/video_coding.h" |
24 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" | 25 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" |
25 #include "webrtc/system_wrappers/include/clock.h" | 26 #include "webrtc/system_wrappers/include/clock.h" |
26 #include "webrtc/video/call_stats.h" | 27 #include "webrtc/video/call_stats.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 VieRemb* remb) | 156 VieRemb* remb) |
156 : transport_adapter_(config.rtcp_send_transport), | 157 : transport_adapter_(config.rtcp_send_transport), |
157 config_(std::move(config)), | 158 config_(std::move(config)), |
158 process_thread_(process_thread), | 159 process_thread_(process_thread), |
159 clock_(Clock::GetRealTimeClock()), | 160 clock_(Clock::GetRealTimeClock()), |
160 decode_thread_(DecodeThreadFunction, this, "DecodingThread"), | 161 decode_thread_(DecodeThreadFunction, this, "DecodingThread"), |
161 congestion_controller_(congestion_controller), | 162 congestion_controller_(congestion_controller), |
162 call_stats_(call_stats), | 163 call_stats_(call_stats), |
163 video_receiver_(clock_, nullptr, this, this, this), | 164 video_receiver_(clock_, nullptr, this, this, this), |
164 stats_proxy_(&config_, clock_), | 165 stats_proxy_(&config_, clock_), |
165 rtp_stream_receiver_(&video_receiver_, | 166 rtp_stream_receiver_( |
166 congestion_controller_->GetRemoteBitrateEstimator( | 167 &video_receiver_, |
167 UseSendSideBwe(config_)), | 168 congestion_controller_->GetRemoteBitrateEstimator( |
168 &transport_adapter_, | 169 UseSendSideBwe(config_)), |
169 call_stats_->rtcp_rtt_stats(), | 170 &transport_adapter_, |
170 congestion_controller_->pacer(), | 171 call_stats_->rtcp_rtt_stats(), |
171 congestion_controller_->packet_router(), | 172 congestion_controller_->pacer(), |
172 remb, | 173 congestion_controller_->packet_router(), |
173 &config_, | 174 remb, |
174 &stats_proxy_, | 175 &config_, |
175 process_thread_), | 176 &stats_proxy_, |
| 177 process_thread_, |
| 178 congestion_controller_->GetRetransmissionRateLimiter()), |
176 vie_sync_(&video_receiver_) { | 179 vie_sync_(&video_receiver_) { |
177 LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString(); | 180 LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString(); |
178 | 181 |
179 RTC_DCHECK(process_thread_); | 182 RTC_DCHECK(process_thread_); |
180 RTC_DCHECK(congestion_controller_); | 183 RTC_DCHECK(congestion_controller_); |
181 RTC_DCHECK(call_stats_); | 184 RTC_DCHECK(call_stats_); |
182 | 185 |
183 RTC_DCHECK(!config_.decoders.empty()); | 186 RTC_DCHECK(!config_.decoders.empty()); |
184 std::set<int> decoder_payload_types; | 187 std::set<int> decoder_payload_types; |
185 for (const Decoder& decoder : config_.decoders) { | 188 for (const Decoder& decoder : config_.decoders) { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 const std::vector<uint16_t>& sequence_numbers) { | 365 const std::vector<uint16_t>& sequence_numbers) { |
363 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); | 366 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); |
364 } | 367 } |
365 | 368 |
366 void VideoReceiveStream::RequestKeyFrame() { | 369 void VideoReceiveStream::RequestKeyFrame() { |
367 rtp_stream_receiver_.RequestKeyFrame(); | 370 rtp_stream_receiver_.RequestKeyFrame(); |
368 } | 371 } |
369 | 372 |
370 } // namespace internal | 373 } // namespace internal |
371 } // namespace webrtc | 374 } // namespace webrtc |
OLD | NEW |