| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 rtc::scoped_refptr<VideoTrackSourceInterface> | 206 rtc::scoped_refptr<VideoTrackSourceInterface> |
| 207 PeerConnectionFactory::CreateVideoSource( | 207 PeerConnectionFactory::CreateVideoSource( |
| 208 cricket::VideoCapturer* capturer, | 208 cricket::VideoCapturer* capturer, |
| 209 const MediaConstraintsInterface* constraints) { | 209 const MediaConstraintsInterface* constraints) { |
| 210 RTC_DCHECK(signaling_thread_->IsCurrent()); | 210 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 211 rtc::scoped_refptr<VideoTrackSourceInterface> source( | 211 rtc::scoped_refptr<VideoTrackSourceInterface> source( |
| 212 VideoCapturerTrackSource::Create(worker_thread_, capturer, constraints, | 212 VideoCapturerTrackSource::Create(worker_thread_, capturer, constraints, |
| 213 false)); | 213 false)); |
| 214 return VideoTrackSourceProxy::Create(signaling_thread_, source); | 214 return VideoTrackSourceProxy::Create(signaling_thread_, worker_thread_, |
| 215 source); |
| 215 } | 216 } |
| 216 | 217 |
| 217 rtc::scoped_refptr<VideoTrackSourceInterface> | 218 rtc::scoped_refptr<VideoTrackSourceInterface> |
| 218 PeerConnectionFactory::CreateVideoSource(cricket::VideoCapturer* capturer) { | 219 PeerConnectionFactory::CreateVideoSource(cricket::VideoCapturer* capturer) { |
| 219 RTC_DCHECK(signaling_thread_->IsCurrent()); | 220 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 220 rtc::scoped_refptr<VideoTrackSourceInterface> source( | 221 rtc::scoped_refptr<VideoTrackSourceInterface> source( |
| 221 VideoCapturerTrackSource::Create(worker_thread_, capturer, false)); | 222 VideoCapturerTrackSource::Create(worker_thread_, capturer, false)); |
| 222 return VideoTrackSourceProxy::Create(signaling_thread_, source); | 223 return VideoTrackSourceProxy::Create(signaling_thread_, worker_thread_, |
| 224 source); |
| 223 } | 225 } |
| 224 | 226 |
| 225 bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file, | 227 bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file, |
| 226 int64_t max_size_bytes) { | 228 int64_t max_size_bytes) { |
| 227 RTC_DCHECK(signaling_thread_->IsCurrent()); | 229 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 228 return channel_manager_->StartAecDump(file, max_size_bytes); | 230 return channel_manager_->StartAecDump(file, max_size_bytes); |
| 229 } | 231 } |
| 230 | 232 |
| 231 void PeerConnectionFactory::StopAecDump() { | 233 void PeerConnectionFactory::StopAecDump() { |
| 232 RTC_DCHECK(signaling_thread_->IsCurrent()); | 234 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 return MediaStreamProxy::Create(signaling_thread_, | 316 return MediaStreamProxy::Create(signaling_thread_, |
| 315 MediaStream::Create(label)); | 317 MediaStream::Create(label)); |
| 316 } | 318 } |
| 317 | 319 |
| 318 rtc::scoped_refptr<VideoTrackInterface> PeerConnectionFactory::CreateVideoTrack( | 320 rtc::scoped_refptr<VideoTrackInterface> PeerConnectionFactory::CreateVideoTrack( |
| 319 const std::string& id, | 321 const std::string& id, |
| 320 VideoTrackSourceInterface* source) { | 322 VideoTrackSourceInterface* source) { |
| 321 RTC_DCHECK(signaling_thread_->IsCurrent()); | 323 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 322 rtc::scoped_refptr<VideoTrackInterface> track( | 324 rtc::scoped_refptr<VideoTrackInterface> track( |
| 323 VideoTrack::Create(id, source)); | 325 VideoTrack::Create(id, source)); |
| 324 return VideoTrackProxy::Create(signaling_thread_, track); | 326 return VideoTrackProxy::Create(signaling_thread_, worker_thread_, track); |
| 325 } | 327 } |
| 326 | 328 |
| 327 rtc::scoped_refptr<AudioTrackInterface> | 329 rtc::scoped_refptr<AudioTrackInterface> |
| 328 PeerConnectionFactory::CreateAudioTrack(const std::string& id, | 330 PeerConnectionFactory::CreateAudioTrack(const std::string& id, |
| 329 AudioSourceInterface* source) { | 331 AudioSourceInterface* source) { |
| 330 RTC_DCHECK(signaling_thread_->IsCurrent()); | 332 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| 331 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); | 333 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); |
| 332 return AudioTrackProxy::Create(signaling_thread_, track); | 334 return AudioTrackProxy::Create(signaling_thread_, track); |
| 333 } | 335 } |
| 334 | 336 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 351 } | 353 } |
| 352 | 354 |
| 353 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { | 355 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { |
| 354 ASSERT(worker_thread_ == rtc::Thread::Current()); | 356 ASSERT(worker_thread_ == rtc::Thread::Current()); |
| 355 return cricket::WebRtcMediaEngineFactory::Create( | 357 return cricket::WebRtcMediaEngineFactory::Create( |
| 356 default_adm_.get(), video_encoder_factory_.get(), | 358 default_adm_.get(), video_encoder_factory_.get(), |
| 357 video_decoder_factory_.get()); | 359 video_decoder_factory_.get()); |
| 358 } | 360 } |
| 359 | 361 |
| 360 } // namespace webrtc | 362 } // namespace webrtc |
| OLD | NEW |