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

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

Issue 1733673002: Removed unused cricket::VideoCapturer methods (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « webrtc/api/test/fakeperiodicvideocapturer.h ('k') | webrtc/media/base/capturemanager.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 MediaSourceInterface::SourceState 50 MediaSourceInterface::SourceState
51 GetReadyState(cricket::CaptureState state) { 51 GetReadyState(cricket::CaptureState state) {
52 switch (state) { 52 switch (state) {
53 case cricket::CS_STARTING: 53 case cricket::CS_STARTING:
54 return MediaSourceInterface::kInitializing; 54 return MediaSourceInterface::kInitializing;
55 case cricket::CS_RUNNING: 55 case cricket::CS_RUNNING:
56 return MediaSourceInterface::kLive; 56 return MediaSourceInterface::kLive;
57 case cricket::CS_FAILED: 57 case cricket::CS_FAILED:
58 case cricket::CS_NO_DEVICE:
59 case cricket::CS_STOPPED: 58 case cricket::CS_STOPPED:
60 return MediaSourceInterface::kEnded; 59 return MediaSourceInterface::kEnded;
61 case cricket::CS_PAUSED: 60 case cricket::CS_PAUSED:
62 return MediaSourceInterface::kMuted; 61 return MediaSourceInterface::kMuted;
63 default: 62 default:
64 ASSERT(false && "GetReadyState unknown state"); 63 ASSERT(false && "GetReadyState unknown state");
65 } 64 }
66 return MediaSourceInterface::kEnded; 65 return MediaSourceInterface::kEnded;
67 } 66 }
68 67
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 SetState(kEnded); 369 SetState(kEnded);
371 return; 370 return;
372 } 371 }
373 // Initialize hasn't succeeded until a successful state change has occurred. 372 // Initialize hasn't succeeded until a successful state change has occurred.
374 } 373 }
375 374
376 void VideoSource::Stop() { 375 void VideoSource::Stop() {
377 channel_manager_->StopVideoCapture(video_capturer_.get(), format_); 376 channel_manager_->StopVideoCapture(video_capturer_.get(), format_);
378 } 377 }
379 378
380 void VideoSource::Restart() { 379 void VideoSource::Restart() {
pthatcher1 2016/02/25 06:44:24 FYI, I think this is also never called.
perkj_webrtc 2016/02/25 10:45:49 Used by Java VideoSource. On android- glaznev want
381 if (!channel_manager_->StartVideoCapture(video_capturer_.get(), format_)) { 380 if (!channel_manager_->StartVideoCapture(video_capturer_.get(), format_)) {
382 SetState(kEnded); 381 SetState(kEnded);
383 return; 382 return;
384 } 383 }
385 for (auto* sink : sinks_) { 384 for (auto* sink : sinks_) {
386 channel_manager_->AddVideoSink(video_capturer_.get(), sink); 385 channel_manager_->AddVideoSink(video_capturer_.get(), sink);
387 } 386 }
388 } 387 }
389 388
390 void VideoSource::AddSink( 389 void VideoSource::AddSink(
(...skipping 21 matching lines...) Expand all
412 void VideoSource::SetState(SourceState new_state) { 411 void VideoSource::SetState(SourceState new_state) {
413 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. 412 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776.
414 // if (VERIFY(state_ != new_state)) { 413 // if (VERIFY(state_ != new_state)) {
415 if (state_ != new_state) { 414 if (state_ != new_state) {
416 state_ = new_state; 415 state_ = new_state;
417 FireOnChanged(); 416 FireOnChanged();
418 } 417 }
419 } 418 }
420 419
421 } // namespace webrtc 420 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/test/fakeperiodicvideocapturer.h ('k') | webrtc/media/base/capturemanager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698