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

Unified Diff: webrtc/api/androidvideocapturer.cc

Issue 2104813003: AndroidVideoCapturer: Remove unused member variable (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/androidvideocapturer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidvideocapturer.cc
diff --git a/webrtc/api/androidvideocapturer.cc b/webrtc/api/androidvideocapturer.cc
index 30311859b967c5921c187b641a9ed42eeedcef40..22c75552fb1893a13a8386bdb469a418ca614f7b 100644
--- a/webrtc/api/androidvideocapturer.cc
+++ b/webrtc/api/androidvideocapturer.cc
@@ -22,8 +22,7 @@ namespace webrtc {
AndroidVideoCapturer::AndroidVideoCapturer(
const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate)
: running_(false),
- delegate_(delegate),
- current_state_(cricket::CS_STOPPED) {
+ delegate_(delegate) {
thread_checker_.DetachFromThread();
SetSupportedFormats(delegate_->GetSupportedFormats());
}
@@ -43,8 +42,7 @@ cricket::CaptureState AndroidVideoCapturer::Start(
running_ = true;
delegate_->Start(capture_format.width, capture_format.height, fps, this);
SetCaptureFormat(&capture_format);
- current_state_ = cricket::CS_STARTING;
- return current_state_;
+ return cricket::CS_STARTING;
}
void AndroidVideoCapturer::Stop() {
@@ -55,8 +53,7 @@ void AndroidVideoCapturer::Stop() {
SetCaptureFormat(NULL);
delegate_->Stop();
- current_state_ = cricket::CS_STOPPED;
- SetCaptureState(current_state_);
+ SetCaptureState(cricket::CS_STOPPED);
}
bool AndroidVideoCapturer::IsRunning() {
@@ -72,11 +69,8 @@ bool AndroidVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) {
void AndroidVideoCapturer::OnCapturerStarted(bool success) {
RTC_CHECK(thread_checker_.CalledOnValidThread());
- cricket::CaptureState new_state =
+ const cricket::CaptureState new_state =
success ? cricket::CS_RUNNING : cricket::CS_FAILED;
- if (new_state == current_state_)
- return;
- current_state_ = new_state;
SetCaptureState(new_state);
}
« no previous file with comments | « webrtc/api/androidvideocapturer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698