OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 if (!initialized_) { | 183 if (!initialized_) { |
184 return; | 184 return; |
185 } | 185 } |
186 worker_thread_->Invoke<void>(RTC_FROM_HERE, | 186 worker_thread_->Invoke<void>(RTC_FROM_HERE, |
187 Bind(&ChannelManager::Terminate_w, this)); | 187 Bind(&ChannelManager::Terminate_w, this)); |
188 initialized_ = false; | 188 initialized_ = false; |
189 } | 189 } |
190 | 190 |
191 void ChannelManager::DestructorDeletes_w() { | 191 void ChannelManager::DestructorDeletes_w() { |
192 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 192 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
193 media_engine_.reset(NULL); | 193 media_engine_.reset(nullptr); |
194 } | 194 } |
195 | 195 |
196 void ChannelManager::Terminate_w() { | 196 void ChannelManager::Terminate_w() { |
197 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 197 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
198 // Need to destroy the voice/video channels | 198 // Need to destroy the voice/video channels |
199 while (!video_channels_.empty()) { | 199 while (!video_channels_.empty()) { |
200 DestroyVideoChannel_w(video_channels_.back()); | 200 DestroyVideoChannel_w(video_channels_.back()); |
201 } | 201 } |
202 while (!voice_channels_.empty()) { | 202 while (!voice_channels_.empty()) { |
203 DestroyVoiceChannel_w(voice_channels_.back()); | 203 DestroyVoiceChannel_w(voice_channels_.back()); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 const std::string& content_name, | 302 const std::string& content_name, |
303 const std::string* bundle_transport_name, | 303 const std::string* bundle_transport_name, |
304 bool rtcp_mux_required, | 304 bool rtcp_mux_required, |
305 bool srtp_required, | 305 bool srtp_required, |
306 const VideoOptions& options) { | 306 const VideoOptions& options) { |
307 RTC_DCHECK(initialized_); | 307 RTC_DCHECK(initialized_); |
308 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 308 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
309 RTC_DCHECK(nullptr != media_controller); | 309 RTC_DCHECK(nullptr != media_controller); |
310 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel( | 310 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel( |
311 media_controller->call_w(), media_controller->config(), options); | 311 media_controller->call_w(), media_controller->config(), options); |
312 if (media_channel == NULL) { | 312 if (media_channel == nullptr) { |
313 return NULL; | 313 return nullptr; |
314 } | 314 } |
315 | 315 |
316 VideoChannel* video_channel = new VideoChannel( | 316 VideoChannel* video_channel = new VideoChannel( |
317 worker_thread_, network_thread_, signaling_thread, media_channel, | 317 worker_thread_, network_thread_, signaling_thread, media_channel, |
318 content_name, rtcp_mux_required, srtp_required); | 318 content_name, rtcp_mux_required, srtp_required); |
319 video_channel->SetCryptoOptions(crypto_options_); | 319 video_channel->SetCryptoOptions(crypto_options_); |
320 if (!video_channel->Init_w(rtp_transport, rtcp_transport, rtp_transport, | 320 if (!video_channel->Init_w(rtp_transport, rtcp_transport, rtp_transport, |
321 rtcp_transport)) { | 321 rtcp_transport)) { |
322 delete video_channel; | 322 delete video_channel; |
323 return NULL; | 323 return nullptr; |
324 } | 324 } |
325 video_channels_.push_back(video_channel); | 325 video_channels_.push_back(video_channel); |
326 return video_channel; | 326 return video_channel; |
327 } | 327 } |
328 | 328 |
329 void ChannelManager::DestroyVideoChannel(VideoChannel* video_channel) { | 329 void ChannelManager::DestroyVideoChannel(VideoChannel* video_channel) { |
330 TRACE_EVENT0("webrtc", "ChannelManager::DestroyVideoChannel"); | 330 TRACE_EVENT0("webrtc", "ChannelManager::DestroyVideoChannel"); |
331 if (video_channel) { | 331 if (video_channel) { |
332 worker_thread_->Invoke<void>( | 332 worker_thread_->Invoke<void>( |
333 RTC_FROM_HERE, | 333 RTC_FROM_HERE, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 media_engine_.get(), file, max_size_bytes)); | 431 media_engine_.get(), file, max_size_bytes)); |
432 } | 432 } |
433 | 433 |
434 void ChannelManager::StopAecDump() { | 434 void ChannelManager::StopAecDump() { |
435 worker_thread_->Invoke<void>( | 435 worker_thread_->Invoke<void>( |
436 RTC_FROM_HERE, | 436 RTC_FROM_HERE, |
437 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); | 437 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); |
438 } | 438 } |
439 | 439 |
440 } // namespace cricket | 440 } // namespace cricket |
OLD | NEW |