Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: webrtc/api/videosource.cc

Issue 1717583002: Non-constraint interfaces for all constrainable interfaces (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix an ambiguous function Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698