| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004--2011 Google Inc. | 3 * Copyright 2004--2011 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 rtc::scoped_refptr<LocalAudioSource> source( | 218 rtc::scoped_refptr<LocalAudioSource> source( |
| 219 LocalAudioSource::Create(options_, constraints)); | 219 LocalAudioSource::Create(options_, constraints)); |
| 220 return source; | 220 return source; |
| 221 } | 221 } |
| 222 | 222 |
| 223 rtc::scoped_refptr<VideoSourceInterface> | 223 rtc::scoped_refptr<VideoSourceInterface> |
| 224 PeerConnectionFactory::CreateVideoSource( | 224 PeerConnectionFactory::CreateVideoSource( |
| 225 cricket::VideoCapturer* capturer, | 225 cricket::VideoCapturer* capturer, |
| 226 const MediaConstraintsInterface* constraints) { | 226 const MediaConstraintsInterface* constraints) { |
| 227 RTC_DCHECK(signaling_thread_->IsCurrent()); | 227 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 228 rtc::scoped_refptr<VideoSource> source( | 228 rtc::scoped_refptr<VideoSource> source(VideoSource::Create( |
| 229 VideoSource::Create(channel_manager_.get(), capturer, constraints)); | 229 channel_manager_.get(), capturer, constraints, false)); |
| 230 return VideoSourceProxy::Create(signaling_thread_, source); | 230 return VideoSourceProxy::Create(signaling_thread_, source); |
| 231 } | 231 } |
| 232 | 232 |
| 233 bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file) { | 233 bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file) { |
| 234 RTC_DCHECK(signaling_thread_->IsCurrent()); | 234 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 235 return channel_manager_->StartAecDump(file); | 235 return channel_manager_->StartAecDump(file); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void PeerConnectionFactory::StopAecDump() { | 238 void PeerConnectionFactory::StopAecDump() { |
| 239 RTC_DCHECK(signaling_thread_->IsCurrent()); | 239 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 RTC_DCHECK(signaling_thread_->IsCurrent()); | 332 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 333 rtc::scoped_refptr<VideoTrackInterface> track( | 333 rtc::scoped_refptr<VideoTrackInterface> track( |
| 334 VideoTrack::Create(id, source)); | 334 VideoTrack::Create(id, source)); |
| 335 return VideoTrackProxy::Create(signaling_thread_, track); | 335 return VideoTrackProxy::Create(signaling_thread_, track); |
| 336 } | 336 } |
| 337 | 337 |
| 338 rtc::scoped_refptr<AudioTrackInterface> | 338 rtc::scoped_refptr<AudioTrackInterface> |
| 339 PeerConnectionFactory::CreateAudioTrack(const std::string& id, | 339 PeerConnectionFactory::CreateAudioTrack(const std::string& id, |
| 340 AudioSourceInterface* source) { | 340 AudioSourceInterface* source) { |
| 341 RTC_DCHECK(signaling_thread_->IsCurrent()); | 341 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 342 rtc::scoped_refptr<AudioTrackInterface> track( | 342 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); |
| 343 AudioTrack::Create(id, source)); | |
| 344 return AudioTrackProxy::Create(signaling_thread_, track); | 343 return AudioTrackProxy::Create(signaling_thread_, track); |
| 345 } | 344 } |
| 346 | 345 |
| 347 webrtc::MediaControllerInterface* PeerConnectionFactory::CreateMediaController() | 346 webrtc::MediaControllerInterface* PeerConnectionFactory::CreateMediaController() |
| 348 const { | 347 const { |
| 349 RTC_DCHECK(signaling_thread_->IsCurrent()); | 348 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 350 return MediaControllerInterface::Create(worker_thread_, | 349 return MediaControllerInterface::Create(worker_thread_, |
| 351 channel_manager_.get()); | 350 channel_manager_.get()); |
| 352 } | 351 } |
| 353 | 352 |
| 354 rtc::Thread* PeerConnectionFactory::signaling_thread() { | 353 rtc::Thread* PeerConnectionFactory::signaling_thread() { |
| 355 // This method can be called on a different thread when the factory is | 354 // This method can be called on a different thread when the factory is |
| 356 // created in CreatePeerConnectionFactory(). | 355 // created in CreatePeerConnectionFactory(). |
| 357 return signaling_thread_; | 356 return signaling_thread_; |
| 358 } | 357 } |
| 359 | 358 |
| 360 rtc::Thread* PeerConnectionFactory::worker_thread() { | 359 rtc::Thread* PeerConnectionFactory::worker_thread() { |
| 361 RTC_DCHECK(signaling_thread_->IsCurrent()); | 360 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 362 return worker_thread_; | 361 return worker_thread_; |
| 363 } | 362 } |
| 364 | 363 |
| 365 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { | 364 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { |
| 366 ASSERT(worker_thread_ == rtc::Thread::Current()); | 365 ASSERT(worker_thread_ == rtc::Thread::Current()); |
| 367 return cricket::WebRtcMediaEngineFactory::Create( | 366 return cricket::WebRtcMediaEngineFactory::Create( |
| 368 default_adm_.get(), video_encoder_factory_.get(), | 367 default_adm_.get(), video_encoder_factory_.get(), |
| 369 video_decoder_factory_.get()); | 368 video_decoder_factory_.get()); |
| 370 } | 369 } |
| 371 | 370 |
| 372 } // namespace webrtc | 371 } // namespace webrtc |
| OLD | NEW |