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 <string> | 15 #include <string> |
16 | 16 |
17 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
18 #include "webrtc/base/logging.h" | 18 #include "webrtc/base/logging.h" |
19 #include "webrtc/call/congestion_controller.h" | 19 #include "webrtc/call/congestion_controller.h" |
20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
21 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | |
stefan-webrtc
2015/11/13 08:29:27
Why is this needed in video_receive_stream.cc?
mflodman
2015/11/13 08:35:36
It is needed for the line of code you commented on
| |
21 #include "webrtc/system_wrappers/include/clock.h" | 22 #include "webrtc/system_wrappers/include/clock.h" |
22 #include "webrtc/video/receive_statistics_proxy.h" | 23 #include "webrtc/video/receive_statistics_proxy.h" |
23 #include "webrtc/video_engine/call_stats.h" | 24 #include "webrtc/video_engine/call_stats.h" |
24 #include "webrtc/video_receive_stream.h" | 25 #include "webrtc/video_receive_stream.h" |
25 | 26 |
26 namespace webrtc { | 27 namespace webrtc { |
27 | 28 |
28 static bool UseSendSideBwe(const std::vector<RtpExtension>& extensions) { | 29 static bool UseSendSideBwe(const std::vector<RtpExtension>& extensions) { |
29 for (const auto& extension : extensions) { | 30 for (const auto& extension : extensions) { |
30 if (extension.name == RtpExtension::kTransportSequenceNumber) | 31 if (extension.name == RtpExtension::kTransportSequenceNumber) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString(); | 155 LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString(); |
155 | 156 |
156 bool send_side_bwe = UseSendSideBwe(config_.rtp.extensions); | 157 bool send_side_bwe = UseSendSideBwe(config_.rtp.extensions); |
157 | 158 |
158 RemoteBitrateEstimator* bitrate_estimator = | 159 RemoteBitrateEstimator* bitrate_estimator = |
159 congestion_controller_->GetRemoteBitrateEstimator(send_side_bwe); | 160 congestion_controller_->GetRemoteBitrateEstimator(send_side_bwe); |
160 | 161 |
161 vie_channel_.reset(new ViEChannel( | 162 vie_channel_.reset(new ViEChannel( |
162 num_cpu_cores, &transport_adapter_, process_thread, nullptr, | 163 num_cpu_cores, &transport_adapter_, process_thread, nullptr, |
163 congestion_controller_->GetBitrateController()-> | 164 congestion_controller_->GetBitrateController()-> |
164 CreateRtcpBandwidthObserver(), | 165 CreateRtcpBandwidthObserver(), |
stefan-webrtc
2015/11/13 08:29:27
Is it possible to follow up with removing or setti
mflodman
2015/11/13 08:35:36
Absolutely, I'll take a look at this and I totally
| |
165 nullptr, bitrate_estimator, call_stats_->rtcp_rtt_stats(), | 166 nullptr, bitrate_estimator, call_stats_->rtcp_rtt_stats(), |
166 congestion_controller_->pacer(), congestion_controller_->packet_router(), | 167 congestion_controller_->pacer(), congestion_controller_->packet_router(), |
167 1, false)); | 168 1, false)); |
168 | 169 |
169 RTC_CHECK(vie_channel_->Init() == 0); | 170 RTC_CHECK(vie_channel_->Init() == 0); |
170 | 171 |
171 // Register the channel to receive stats updates. | 172 // Register the channel to receive stats updates. |
172 call_stats_->RegisterStatsObserver(vie_channel_->GetStatsObserver()); | 173 call_stats_->RegisterStatsObserver(vie_channel_->GetStatsObserver()); |
173 | 174 |
174 // TODO(pbos): This is not fine grained enough... | 175 // TODO(pbos): This is not fine grained enough... |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 return 0; | 379 return 0; |
379 } | 380 } |
380 | 381 |
381 void VideoReceiveStream::SignalNetworkState(NetworkState state) { | 382 void VideoReceiveStream::SignalNetworkState(NetworkState state) { |
382 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode | 383 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode |
383 : RtcpMode::kOff); | 384 : RtcpMode::kOff); |
384 } | 385 } |
385 | 386 |
386 } // namespace internal | 387 } // namespace internal |
387 } // namespace webrtc | 388 } // namespace webrtc |
OLD | NEW |