OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 const webrtc::MediaConstraintsInterface* constraints, | 287 const webrtc::MediaConstraintsInterface* constraints, |
288 bool remote) { | 288 bool remote) { |
289 ASSERT(channel_manager != NULL); | 289 ASSERT(channel_manager != NULL); |
290 ASSERT(capturer != NULL); | 290 ASSERT(capturer != NULL); |
291 rtc::scoped_refptr<VideoSource> source(new rtc::RefCountedObject<VideoSource>( | 291 rtc::scoped_refptr<VideoSource> source(new rtc::RefCountedObject<VideoSource>( |
292 channel_manager, capturer, remote)); | 292 channel_manager, capturer, remote)); |
293 source->Initialize(constraints); | 293 source->Initialize(constraints); |
294 return source; | 294 return source; |
295 } | 295 } |
296 | 296 |
| 297 rtc::scoped_refptr<VideoSource> VideoSource::Create( |
| 298 cricket::ChannelManager* channel_manager, |
| 299 cricket::VideoCapturer* capturer, |
| 300 bool remote) { |
| 301 return Create(channel_manager, capturer, nullptr, remote); |
| 302 } |
| 303 |
297 VideoSource::VideoSource(cricket::ChannelManager* channel_manager, | 304 VideoSource::VideoSource(cricket::ChannelManager* channel_manager, |
298 cricket::VideoCapturer* capturer, | 305 cricket::VideoCapturer* capturer, |
299 bool remote) | 306 bool remote) |
300 : channel_manager_(channel_manager), | 307 : channel_manager_(channel_manager), |
301 video_capturer_(capturer), | 308 video_capturer_(capturer), |
302 state_(kInitializing), | 309 state_(kInitializing), |
303 remote_(remote) { | 310 remote_(remote) { |
304 channel_manager_->SignalVideoCaptureStateChange.connect( | 311 channel_manager_->SignalVideoCaptureStateChange.connect( |
305 this, &VideoSource::OnStateChange); | 312 this, &VideoSource::OnStateChange); |
306 } | 313 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 void VideoSource::SetState(SourceState new_state) { | 419 void VideoSource::SetState(SourceState new_state) { |
413 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. | 420 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. |
414 // if (VERIFY(state_ != new_state)) { | 421 // if (VERIFY(state_ != new_state)) { |
415 if (state_ != new_state) { | 422 if (state_ != new_state) { |
416 state_ = new_state; | 423 state_ = new_state; |
417 FireOnChanged(); | 424 FireOnChanged(); |
418 } | 425 } |
419 } | 426 } |
420 | 427 |
421 } // namespace webrtc | 428 } // namespace webrtc |
OLD | NEW |