OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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_engine/vie_channel.h" | 11 #include "webrtc/video_engine/vie_channel.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
| 18 #include "webrtc/base/platform_thread.h" |
18 #include "webrtc/common.h" | 19 #include "webrtc/common.h" |
19 #include "webrtc/common_video/include/incoming_video_stream.h" | 20 #include "webrtc/common_video/include/incoming_video_stream.h" |
20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 21 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
21 #include "webrtc/frame_callback.h" | 22 #include "webrtc/frame_callback.h" |
22 #include "webrtc/modules/pacing/paced_sender.h" | 23 #include "webrtc/modules/pacing/paced_sender.h" |
23 #include "webrtc/modules/pacing/packet_router.h" | 24 #include "webrtc/modules/pacing/packet_router.h" |
24 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" | 25 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
26 #include "webrtc/modules/utility/include/process_thread.h" | 27 #include "webrtc/modules/utility/include/process_thread.h" |
27 #include "webrtc/modules/video_coding/include/video_coding.h" | 28 #include "webrtc/modules/video_coding/include/video_coding.h" |
28 #include "webrtc/modules/video_processing/include/video_processing.h" | 29 #include "webrtc/modules/video_processing/include/video_processing.h" |
29 #include "webrtc/modules/video_render/video_render_defines.h" | 30 #include "webrtc/modules/video_render/video_render_defines.h" |
30 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 31 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
31 #include "webrtc/system_wrappers/include/metrics.h" | 32 #include "webrtc/system_wrappers/include/metrics.h" |
32 #include "webrtc/system_wrappers/include/thread_wrapper.h" | |
33 #include "webrtc/video/receive_statistics_proxy.h" | 33 #include "webrtc/video/receive_statistics_proxy.h" |
34 #include "webrtc/video_engine/call_stats.h" | 34 #include "webrtc/video_engine/call_stats.h" |
35 #include "webrtc/video_engine/payload_router.h" | 35 #include "webrtc/video_engine/payload_router.h" |
36 #include "webrtc/video_engine/report_block_stats.h" | 36 #include "webrtc/video_engine/report_block_stats.h" |
37 | 37 |
38 namespace webrtc { | 38 namespace webrtc { |
39 | 39 |
40 const int kMaxDecodeWaitTimeMs = 50; | 40 const int kMaxDecodeWaitTimeMs = 50; |
41 static const int kMaxTargetDelayMs = 10000; | 41 static const int kMaxTargetDelayMs = 10000; |
42 const int kMinSendSidePacketHistorySize = 600; | 42 const int kMinSendSidePacketHistorySize = 600; |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 configuration.remote_bitrate_estimator = nullptr; | 1143 configuration.remote_bitrate_estimator = nullptr; |
1144 } | 1144 } |
1145 return modules; | 1145 return modules; |
1146 } | 1146 } |
1147 | 1147 |
1148 void ViEChannel::StartDecodeThread() { | 1148 void ViEChannel::StartDecodeThread() { |
1149 RTC_DCHECK(!sender_); | 1149 RTC_DCHECK(!sender_); |
1150 // Start the decode thread | 1150 // Start the decode thread |
1151 if (decode_thread_) | 1151 if (decode_thread_) |
1152 return; | 1152 return; |
1153 decode_thread_ = ThreadWrapper::CreateThread(ChannelDecodeThreadFunction, | 1153 decode_thread_ = PlatformThread::CreateThread(ChannelDecodeThreadFunction, |
1154 this, "DecodingThread"); | 1154 this, "DecodingThread"); |
1155 decode_thread_->Start(); | 1155 decode_thread_->Start(); |
1156 decode_thread_->SetPriority(kHighestPriority); | 1156 decode_thread_->SetPriority(kHighestPriority); |
1157 } | 1157 } |
1158 | 1158 |
1159 void ViEChannel::StopDecodeThread() { | 1159 void ViEChannel::StopDecodeThread() { |
1160 if (!decode_thread_) | 1160 if (!decode_thread_) |
1161 return; | 1161 return; |
1162 | 1162 |
1163 vcm_->TriggerDecoderShutdown(); | 1163 vcm_->TriggerDecoderShutdown(); |
1164 | 1164 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 CriticalSectionScoped cs(crit_.get()); | 1219 CriticalSectionScoped cs(crit_.get()); |
1220 receive_stats_callback_ = receive_statistics_proxy; | 1220 receive_stats_callback_ = receive_statistics_proxy; |
1221 } | 1221 } |
1222 | 1222 |
1223 void ViEChannel::SetIncomingVideoStream( | 1223 void ViEChannel::SetIncomingVideoStream( |
1224 IncomingVideoStream* incoming_video_stream) { | 1224 IncomingVideoStream* incoming_video_stream) { |
1225 CriticalSectionScoped cs(crit_.get()); | 1225 CriticalSectionScoped cs(crit_.get()); |
1226 incoming_video_stream_ = incoming_video_stream; | 1226 incoming_video_stream_ = incoming_video_stream; |
1227 } | 1227 } |
1228 } // namespace webrtc | 1228 } // namespace webrtc |
OLD | NEW |