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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 | 348 |
349 rtc::scoped_refptr<AudioTrackInterface> | 349 rtc::scoped_refptr<AudioTrackInterface> |
350 PeerConnectionFactory::CreateAudioTrack(const std::string& id, | 350 PeerConnectionFactory::CreateAudioTrack(const std::string& id, |
351 AudioSourceInterface* source) { | 351 AudioSourceInterface* source) { |
352 RTC_DCHECK(signaling_thread_->IsCurrent()); | 352 RTC_DCHECK(signaling_thread_->IsCurrent()); |
353 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); | 353 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); |
354 return AudioTrackProxy::Create(signaling_thread_, track); | 354 return AudioTrackProxy::Create(signaling_thread_, track); |
355 } | 355 } |
356 | 356 |
357 webrtc::MediaControllerInterface* PeerConnectionFactory::CreateMediaController( | |
358 const cricket::MediaConfig& config, | |
359 webrtc::RtcEventLog* event_log) const { | |
360 RTC_DCHECK(signaling_thread_->IsCurrent()); | |
361 return MediaControllerInterface::Create(config, worker_thread_, | |
362 channel_manager_.get(), event_log); | |
363 } | |
364 | |
365 cricket::TransportController* PeerConnectionFactory::CreateTransportController( | 357 cricket::TransportController* PeerConnectionFactory::CreateTransportController( |
366 cricket::PortAllocator* port_allocator, | 358 cricket::PortAllocator* port_allocator, |
367 bool redetermine_role_on_ice_restart) { | 359 bool redetermine_role_on_ice_restart) { |
368 RTC_DCHECK(signaling_thread_->IsCurrent()); | 360 RTC_DCHECK(signaling_thread_->IsCurrent()); |
369 return new cricket::TransportController( | 361 return new cricket::TransportController( |
370 signaling_thread_, network_thread_, port_allocator, | 362 signaling_thread_, network_thread_, port_allocator, |
371 redetermine_role_on_ice_restart, options_.crypto_options); | 363 redetermine_role_on_ice_restart, options_.crypto_options); |
372 } | 364 } |
373 | 365 |
| 366 cricket::ChannelManager* PeerConnectionFactory::channel_manager() { |
| 367 return channel_manager_.get(); |
| 368 } |
| 369 |
374 rtc::Thread* PeerConnectionFactory::signaling_thread() { | 370 rtc::Thread* PeerConnectionFactory::signaling_thread() { |
375 // This method can be called on a different thread when the factory is | 371 // This method can be called on a different thread when the factory is |
376 // created in CreatePeerConnectionFactory(). | 372 // created in CreatePeerConnectionFactory(). |
377 return signaling_thread_; | 373 return signaling_thread_; |
378 } | 374 } |
379 | 375 |
380 rtc::Thread* PeerConnectionFactory::worker_thread() { | 376 rtc::Thread* PeerConnectionFactory::worker_thread() { |
381 RTC_DCHECK(signaling_thread_->IsCurrent()); | 377 RTC_DCHECK(signaling_thread_->IsCurrent()); |
382 return worker_thread_; | 378 return worker_thread_; |
383 } | 379 } |
384 | 380 |
385 rtc::Thread* PeerConnectionFactory::network_thread() { | 381 rtc::Thread* PeerConnectionFactory::network_thread() { |
386 return network_thread_; | 382 return network_thread_; |
387 } | 383 } |
388 | 384 |
389 std::unique_ptr<cricket::MediaEngineInterface> | 385 std::unique_ptr<cricket::MediaEngineInterface> |
390 PeerConnectionFactory::CreateMediaEngine_w() { | 386 PeerConnectionFactory::CreateMediaEngine_w() { |
391 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 387 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
392 return std::unique_ptr<cricket::MediaEngineInterface>( | 388 return std::unique_ptr<cricket::MediaEngineInterface>( |
393 cricket::WebRtcMediaEngineFactory::Create( | 389 cricket::WebRtcMediaEngineFactory::Create( |
394 default_adm_.get(), audio_decoder_factory_, | 390 default_adm_.get(), audio_decoder_factory_, |
395 video_encoder_factory_.get(), video_decoder_factory_.get(), | 391 video_encoder_factory_.get(), video_decoder_factory_.get(), |
396 external_audio_mixer_)); | 392 external_audio_mixer_)); |
397 } | 393 } |
398 | 394 |
399 } // namespace webrtc | 395 } // namespace webrtc |
OLD | NEW |