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

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: Review comments Created 4 years, 9 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
« no previous file with comments | « webrtc/api/videosource.h ('k') | webrtc/api/webrtcsession.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 const webrtc::MediaConstraintsInterface* constraints, 280 const webrtc::MediaConstraintsInterface* constraints,
281 bool remote) { 281 bool remote) {
282 RTC_DCHECK(worker_thread != NULL); 282 RTC_DCHECK(worker_thread != NULL);
283 RTC_DCHECK(capturer != NULL); 283 RTC_DCHECK(capturer != NULL);
284 rtc::scoped_refptr<VideoSource> source(new rtc::RefCountedObject<VideoSource>( 284 rtc::scoped_refptr<VideoSource> source(new rtc::RefCountedObject<VideoSource>(
285 worker_thread, capturer, remote)); 285 worker_thread, capturer, remote));
286 source->Initialize(constraints); 286 source->Initialize(constraints);
287 return source; 287 return source;
288 } 288 }
289 289
290 rtc::scoped_refptr<VideoSource> VideoSource::Create(
291 rtc::Thread* worker_thread,
292 cricket::VideoCapturer* capturer,
293 bool remote) {
294 return Create(worker_thread, capturer, nullptr, remote);
295 }
296
290 VideoSource::VideoSource(rtc::Thread* worker_thread, 297 VideoSource::VideoSource(rtc::Thread* worker_thread,
291 cricket::VideoCapturer* capturer, 298 cricket::VideoCapturer* capturer,
292 bool remote) 299 bool remote)
293 : signaling_thread_(rtc::Thread::Current()), 300 : signaling_thread_(rtc::Thread::Current()),
294 worker_thread_(worker_thread), 301 worker_thread_(worker_thread),
295 video_capturer_(capturer), 302 video_capturer_(capturer),
296 started_(false), 303 started_(false),
297 state_(kInitializing), 304 state_(kInitializing),
298 remote_(remote) { 305 remote_(remote) {
299 video_capturer_->SignalStateChange.connect( 306 video_capturer_->SignalStateChange.connect(
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 432 }
426 433
427 void VideoSource::SetState(SourceState new_state) { 434 void VideoSource::SetState(SourceState new_state) {
428 if (state_ != new_state) { 435 if (state_ != new_state) {
429 state_ = new_state; 436 state_ = new_state;
430 FireOnChanged(); 437 FireOnChanged();
431 } 438 }
432 } 439 }
433 440
434 } // namespace webrtc 441 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/videosource.h ('k') | webrtc/api/webrtcsession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698