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 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 ChannelGroup* channel_group, | 132 ChannelGroup* channel_group, |
133 int channel_id, | 133 int channel_id, |
134 const VideoReceiveStream::Config& config, | 134 const VideoReceiveStream::Config& config, |
135 webrtc::VoiceEngine* voice_engine) | 135 webrtc::VoiceEngine* voice_engine) |
136 : transport_adapter_(config.rtcp_send_transport), | 136 : transport_adapter_(config.rtcp_send_transport), |
137 encoded_frame_proxy_(config.pre_decode_callback), | 137 encoded_frame_proxy_(config.pre_decode_callback), |
138 config_(config), | 138 config_(config), |
139 clock_(Clock::GetRealTimeClock()), | 139 clock_(Clock::GetRealTimeClock()), |
140 channel_group_(channel_group), | 140 channel_group_(channel_group), |
141 channel_id_(channel_id) { | 141 channel_id_(channel_id) { |
| 142 LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString(); |
142 RTC_CHECK(channel_group_->CreateReceiveChannel( | 143 RTC_CHECK(channel_group_->CreateReceiveChannel( |
143 channel_id_, &transport_adapter_, num_cpu_cores, config)); | 144 channel_id_, &transport_adapter_, num_cpu_cores, config)); |
144 | 145 |
145 vie_channel_ = channel_group_->GetChannel(channel_id_); | 146 vie_channel_ = channel_group_->GetChannel(channel_id_); |
146 | 147 |
147 // TODO(pbos): This is not fine grained enough... | 148 // TODO(pbos): This is not fine grained enough... |
148 vie_channel_->SetProtectionMode(config_.rtp.nack.rtp_history_ms > 0, false, | 149 vie_channel_->SetProtectionMode(config_.rtp.nack.rtp_history_ms > 0, false, |
149 -1, -1); | 150 -1, -1); |
150 RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff) | 151 RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff) |
151 << "A stream should not be configured with RTCP disabled. This value is " | 152 << "A stream should not be configured with RTCP disabled. This value is " |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 incoming_video_stream_->SetExpectedRenderDelay(config.render_delay_ms); | 251 incoming_video_stream_->SetExpectedRenderDelay(config.render_delay_ms); |
251 incoming_video_stream_->SetExternalCallback(this); | 252 incoming_video_stream_->SetExternalCallback(this); |
252 vie_channel_->SetIncomingVideoStream(incoming_video_stream_.get()); | 253 vie_channel_->SetIncomingVideoStream(incoming_video_stream_.get()); |
253 | 254 |
254 if (config.pre_decode_callback) | 255 if (config.pre_decode_callback) |
255 vie_channel_->RegisterPreDecodeImageCallback(&encoded_frame_proxy_); | 256 vie_channel_->RegisterPreDecodeImageCallback(&encoded_frame_proxy_); |
256 vie_channel_->RegisterPreRenderCallback(this); | 257 vie_channel_->RegisterPreRenderCallback(this); |
257 } | 258 } |
258 | 259 |
259 VideoReceiveStream::~VideoReceiveStream() { | 260 VideoReceiveStream::~VideoReceiveStream() { |
| 261 LOG(LS_INFO) << "~VideoReceiveStream: " << config_.ToString(); |
260 incoming_video_stream_->Stop(); | 262 incoming_video_stream_->Stop(); |
261 vie_channel_->RegisterPreRenderCallback(nullptr); | 263 vie_channel_->RegisterPreRenderCallback(nullptr); |
262 vie_channel_->RegisterPreDecodeImageCallback(nullptr); | 264 vie_channel_->RegisterPreDecodeImageCallback(nullptr); |
263 | 265 |
264 for (size_t i = 0; i < config_.decoders.size(); ++i) | 266 for (size_t i = 0; i < config_.decoders.size(); ++i) |
265 vie_channel_->DeRegisterExternalDecoder(config_.decoders[i].payload_type); | 267 vie_channel_->DeRegisterExternalDecoder(config_.decoders[i].payload_type); |
266 | 268 |
267 channel_group_->DeleteChannel(channel_id_); | 269 channel_group_->DeleteChannel(channel_id_); |
268 } | 270 } |
269 | 271 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 return 0; | 332 return 0; |
331 } | 333 } |
332 | 334 |
333 void VideoReceiveStream::SignalNetworkState(NetworkState state) { | 335 void VideoReceiveStream::SignalNetworkState(NetworkState state) { |
334 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode | 336 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode |
335 : RtcpMode::kOff); | 337 : RtcpMode::kOff); |
336 } | 338 } |
337 | 339 |
338 } // namespace internal | 340 } // namespace internal |
339 } // namespace webrtc | 341 } // namespace webrtc |
OLD | NEW |