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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
245 rtc::scoped_refptr<LocalAudioSource> source( | 245 rtc::scoped_refptr<LocalAudioSource> source( |
246 LocalAudioSource::Create(&options)); | 246 LocalAudioSource::Create(&options)); |
247 return source; | 247 return source; |
248 } | 248 } |
249 | 249 |
250 rtc::scoped_refptr<VideoTrackSourceInterface> | 250 rtc::scoped_refptr<VideoTrackSourceInterface> |
251 PeerConnectionFactory::CreateVideoSource( | 251 PeerConnectionFactory::CreateVideoSource( |
252 std::unique_ptr<cricket::VideoCapturer> capturer, | 252 std::unique_ptr<cricket::VideoCapturer> capturer, |
253 const MediaConstraintsInterface* constraints) { | 253 const MediaConstraintsInterface* constraints) { |
254 RTC_DCHECK(signaling_thread_->IsCurrent()); | 254 RTC_DCHECK(signaling_thread_->IsCurrent()); |
255 rtc::scoped_refptr<VideoTrackSourceInterface> source( | 255 return VideoCapturerTrackSource::Create(worker_thread_, std::move(capturer), |
Taylor Brandstetter
2017/07/05 23:13:40
Hmm... I don't know if it's safe to do this, becau
perkj_webrtc
2017/07/06 15:08:20
VideoTrackSourceInterface is supposed to be an imp
Taylor Brandstetter
2017/07/06 22:24:05
So, what do you plan to do here then? If this meth
| |
256 VideoCapturerTrackSource::Create(worker_thread_, std::move(capturer), | 256 constraints, false); |
257 constraints, false)); | |
258 return VideoTrackSourceProxy::Create(signaling_thread_, worker_thread_, | |
259 source); | |
260 } | 257 } |
261 | 258 |
262 rtc::scoped_refptr<VideoTrackSourceInterface> | 259 rtc::scoped_refptr<VideoTrackSourceInterface> |
263 PeerConnectionFactory::CreateVideoSource( | 260 PeerConnectionFactory::CreateVideoSource( |
264 std::unique_ptr<cricket::VideoCapturer> capturer) { | 261 std::unique_ptr<cricket::VideoCapturer> capturer) { |
265 RTC_DCHECK(signaling_thread_->IsCurrent()); | 262 RTC_DCHECK(signaling_thread_->IsCurrent()); |
266 rtc::scoped_refptr<VideoTrackSourceInterface> source( | 263 return VideoCapturerTrackSource::Create(worker_thread_, std::move(capturer), |
267 VideoCapturerTrackSource::Create(worker_thread_, std::move(capturer), | 264 false); |
268 false)); | |
269 return VideoTrackSourceProxy::Create(signaling_thread_, worker_thread_, | |
270 source); | |
271 } | 265 } |
272 | 266 |
273 bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file, | 267 bool PeerConnectionFactory::StartAecDump(rtc::PlatformFile file, |
274 int64_t max_size_bytes) { | 268 int64_t max_size_bytes) { |
275 RTC_DCHECK(signaling_thread_->IsCurrent()); | 269 RTC_DCHECK(signaling_thread_->IsCurrent()); |
276 return channel_manager_->StartAecDump(file, max_size_bytes); | 270 return channel_manager_->StartAecDump(file, max_size_bytes); |
277 } | 271 } |
278 | 272 |
279 void PeerConnectionFactory::StopAecDump() { | 273 void PeerConnectionFactory::StopAecDump() { |
280 RTC_DCHECK(signaling_thread_->IsCurrent()); | 274 RTC_DCHECK(signaling_thread_->IsCurrent()); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 RTC_DCHECK(signaling_thread_->IsCurrent()); | 329 RTC_DCHECK(signaling_thread_->IsCurrent()); |
336 return MediaStreamProxy::Create(signaling_thread_, | 330 return MediaStreamProxy::Create(signaling_thread_, |
337 MediaStream::Create(label)); | 331 MediaStream::Create(label)); |
338 } | 332 } |
339 | 333 |
340 rtc::scoped_refptr<VideoTrackInterface> PeerConnectionFactory::CreateVideoTrack( | 334 rtc::scoped_refptr<VideoTrackInterface> PeerConnectionFactory::CreateVideoTrack( |
341 const std::string& id, | 335 const std::string& id, |
342 VideoTrackSourceInterface* source) { | 336 VideoTrackSourceInterface* source) { |
343 RTC_DCHECK(signaling_thread_->IsCurrent()); | 337 RTC_DCHECK(signaling_thread_->IsCurrent()); |
344 rtc::scoped_refptr<VideoTrackInterface> track( | 338 rtc::scoped_refptr<VideoTrackInterface> track( |
345 VideoTrack::Create(id, source)); | 339 VideoTrack::Create(id, VideoTrackSourceProxy::Create( |
340 signaling_thread_, worker_thread_, source))); | |
346 return VideoTrackProxy::Create(signaling_thread_, worker_thread_, track); | 341 return VideoTrackProxy::Create(signaling_thread_, worker_thread_, track); |
347 } | 342 } |
348 | 343 |
349 rtc::scoped_refptr<AudioTrackInterface> | 344 rtc::scoped_refptr<AudioTrackInterface> |
350 PeerConnectionFactory::CreateAudioTrack(const std::string& id, | 345 PeerConnectionFactory::CreateAudioTrack(const std::string& id, |
351 AudioSourceInterface* source) { | 346 AudioSourceInterface* source) { |
352 RTC_DCHECK(signaling_thread_->IsCurrent()); | 347 RTC_DCHECK(signaling_thread_->IsCurrent()); |
353 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); | 348 rtc::scoped_refptr<AudioTrackInterface> track(AudioTrack::Create(id, source)); |
354 return AudioTrackProxy::Create(signaling_thread_, track); | 349 return AudioTrackProxy::Create(signaling_thread_, track); |
355 } | 350 } |
(...skipping 30 matching lines...) Expand all Loading... | |
386 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); | 381 RTC_DCHECK(worker_thread_ == rtc::Thread::Current()); |
387 return std::unique_ptr<cricket::MediaEngineInterface>( | 382 return std::unique_ptr<cricket::MediaEngineInterface>( |
388 cricket::WebRtcMediaEngineFactory::Create( | 383 cricket::WebRtcMediaEngineFactory::Create( |
389 default_adm_.get(), audio_encoder_factory_, | 384 default_adm_.get(), audio_encoder_factory_, |
390 audio_decoder_factory_, | 385 audio_decoder_factory_, |
391 video_encoder_factory_.get(), video_decoder_factory_.get(), | 386 video_encoder_factory_.get(), video_decoder_factory_.get(), |
392 external_audio_mixer_)); | 387 external_audio_mixer_)); |
393 } | 388 } |
394 | 389 |
395 } // namespace webrtc | 390 } // namespace webrtc |
OLD | NEW |