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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 VoiceMediaChannel* media_channel = media_engine_->CreateChannel( | 239 VoiceMediaChannel* media_channel = media_engine_->CreateChannel( |
240 media_controller->call_w(), media_controller->config(), options); | 240 media_controller->call_w(), media_controller->config(), options); |
241 if (!media_channel) | 241 if (!media_channel) |
242 return nullptr; | 242 return nullptr; |
243 | 243 |
244 VoiceChannel* voice_channel = new VoiceChannel( | 244 VoiceChannel* voice_channel = new VoiceChannel( |
245 worker_thread_, network_thread_, signaling_thread, media_engine_.get(), | 245 worker_thread_, network_thread_, signaling_thread, media_engine_.get(), |
246 media_channel, content_name, rtcp_mux_required, srtp_required); | 246 media_channel, content_name, rtcp_mux_required, srtp_required); |
247 voice_channel->SetCryptoOptions(crypto_options_); | 247 voice_channel->SetCryptoOptions(crypto_options_); |
248 | 248 |
249 if (!voice_channel->Init_w(rtp_transport, rtcp_transport)) { | 249 if (!voice_channel->Init_w(rtp_transport, rtcp_transport, rtp_transport, |
| 250 rtcp_transport)) { |
250 delete voice_channel; | 251 delete voice_channel; |
251 return nullptr; | 252 return nullptr; |
252 } | 253 } |
253 voice_channels_.push_back(voice_channel); | 254 voice_channels_.push_back(voice_channel); |
254 return voice_channel; | 255 return voice_channel; |
255 } | 256 } |
256 | 257 |
257 void ChannelManager::DestroyVoiceChannel(VoiceChannel* voice_channel) { | 258 void ChannelManager::DestroyVoiceChannel(VoiceChannel* voice_channel) { |
258 TRACE_EVENT0("webrtc", "ChannelManager::DestroyVoiceChannel"); | 259 TRACE_EVENT0("webrtc", "ChannelManager::DestroyVoiceChannel"); |
259 if (voice_channel) { | 260 if (voice_channel) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel( | 311 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel( |
311 media_controller->call_w(), media_controller->config(), options); | 312 media_controller->call_w(), media_controller->config(), options); |
312 if (media_channel == NULL) { | 313 if (media_channel == NULL) { |
313 return NULL; | 314 return NULL; |
314 } | 315 } |
315 | 316 |
316 VideoChannel* video_channel = new VideoChannel( | 317 VideoChannel* video_channel = new VideoChannel( |
317 worker_thread_, network_thread_, signaling_thread, media_channel, | 318 worker_thread_, network_thread_, signaling_thread, media_channel, |
318 content_name, rtcp_mux_required, srtp_required); | 319 content_name, rtcp_mux_required, srtp_required); |
319 video_channel->SetCryptoOptions(crypto_options_); | 320 video_channel->SetCryptoOptions(crypto_options_); |
320 if (!video_channel->Init_w(rtp_transport, rtcp_transport)) { | 321 if (!video_channel->Init_w(rtp_transport, rtcp_transport, rtp_transport, |
| 322 rtcp_transport)) { |
321 delete video_channel; | 323 delete video_channel; |
322 return NULL; | 324 return NULL; |
323 } | 325 } |
324 video_channels_.push_back(video_channel); | 326 video_channels_.push_back(video_channel); |
325 return video_channel; | 327 return video_channel; |
326 } | 328 } |
327 | 329 |
328 void ChannelManager::DestroyVideoChannel(VideoChannel* video_channel) { | 330 void ChannelManager::DestroyVideoChannel(VideoChannel* video_channel) { |
329 TRACE_EVENT0("webrtc", "ChannelManager::DestroyVideoChannel"); | 331 TRACE_EVENT0("webrtc", "ChannelManager::DestroyVideoChannel"); |
330 if (video_channel) { | 332 if (video_channel) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 DataMediaChannel* media_channel = data_media_engine_->CreateChannel(config); | 385 DataMediaChannel* media_channel = data_media_engine_->CreateChannel(config); |
384 if (!media_channel) { | 386 if (!media_channel) { |
385 LOG(LS_WARNING) << "Failed to create RTP data channel."; | 387 LOG(LS_WARNING) << "Failed to create RTP data channel."; |
386 return nullptr; | 388 return nullptr; |
387 } | 389 } |
388 | 390 |
389 RtpDataChannel* data_channel = new RtpDataChannel( | 391 RtpDataChannel* data_channel = new RtpDataChannel( |
390 worker_thread_, network_thread_, signaling_thread, media_channel, | 392 worker_thread_, network_thread_, signaling_thread, media_channel, |
391 content_name, rtcp_mux_required, srtp_required); | 393 content_name, rtcp_mux_required, srtp_required); |
392 data_channel->SetCryptoOptions(crypto_options_); | 394 data_channel->SetCryptoOptions(crypto_options_); |
393 if (!data_channel->Init_w(rtp_transport, rtcp_transport)) { | 395 if (!data_channel->Init_w(rtp_transport, rtcp_transport, rtp_transport, |
| 396 rtcp_transport)) { |
394 LOG(LS_WARNING) << "Failed to init data channel."; | 397 LOG(LS_WARNING) << "Failed to init data channel."; |
395 delete data_channel; | 398 delete data_channel; |
396 return nullptr; | 399 return nullptr; |
397 } | 400 } |
398 data_channels_.push_back(data_channel); | 401 data_channels_.push_back(data_channel); |
399 return data_channel; | 402 return data_channel; |
400 } | 403 } |
401 | 404 |
402 void ChannelManager::DestroyRtpDataChannel(RtpDataChannel* data_channel) { | 405 void ChannelManager::DestroyRtpDataChannel(RtpDataChannel* data_channel) { |
403 TRACE_EVENT0("webrtc", "ChannelManager::DestroyRtpDataChannel"); | 406 TRACE_EVENT0("webrtc", "ChannelManager::DestroyRtpDataChannel"); |
(...skipping 25 matching lines...) Expand all Loading... |
429 media_engine_.get(), file, max_size_bytes)); | 432 media_engine_.get(), file, max_size_bytes)); |
430 } | 433 } |
431 | 434 |
432 void ChannelManager::StopAecDump() { | 435 void ChannelManager::StopAecDump() { |
433 worker_thread_->Invoke<void>( | 436 worker_thread_->Invoke<void>( |
434 RTC_FROM_HERE, | 437 RTC_FROM_HERE, |
435 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); | 438 Bind(&MediaEngineInterface::StopAecDump, media_engine_.get())); |
436 } | 439 } |
437 | 440 |
438 } // namespace cricket | 441 } // namespace cricket |
OLD | NEW |