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

Unified Diff: webrtc/media/engine/webrtcvideocapturer.cc

Issue 3001443002: Removed unused async_invoker_ in WebRtcVideoCapturer (Closed)
Patch Set: Created 3 years, 4 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/media/engine/webrtcvideocapturer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideocapturer.cc
diff --git a/webrtc/media/engine/webrtcvideocapturer.cc b/webrtc/media/engine/webrtcvideocapturer.cc
index 3560098086fe8773d5fd4fa0aee9dec872865f78..9b872fba047bd4252a698e72adb682d04776664a 100644
--- a/webrtc/media/engine/webrtcvideocapturer.cc
+++ b/webrtc/media/engine/webrtcvideocapturer.cc
@@ -110,15 +110,13 @@ WebRtcVideoCapturer::WebRtcVideoCapturer()
: factory_(new WebRtcVcmFactory),
module_(nullptr),
captured_frames_(0),
- start_thread_(nullptr),
- async_invoker_(nullptr) {}
+ start_thread_(nullptr) {}
WebRtcVideoCapturer::WebRtcVideoCapturer(WebRtcVcmFactoryInterface* factory)
: factory_(factory),
module_(nullptr),
captured_frames_(0),
- start_thread_(nullptr),
- async_invoker_(nullptr) {}
+ start_thread_(nullptr) {}
WebRtcVideoCapturer::~WebRtcVideoCapturer() {}
@@ -256,8 +254,6 @@ CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) {
}
start_thread_ = rtc::Thread::Current();
- RTC_DCHECK(!async_invoker_);
- async_invoker_.reset(new rtc::AsyncInvoker());
captured_frames_ = 0;
SetCaptureFormat(&capture_format);
@@ -273,7 +269,6 @@ CaptureState WebRtcVideoCapturer::Start(const VideoFormat& capture_format) {
if (module_->StartCapture(cap) != 0) {
LOG(LS_ERROR) << "Camera '" << GetId() << "' failed to start";
module_->DeRegisterCaptureDataCallback();
- async_invoker_.reset();
SetCaptureFormat(nullptr);
start_thread_ = nullptr;
return CS_FAILED;
@@ -294,7 +289,6 @@ void WebRtcVideoCapturer::Stop() {
}
RTC_DCHECK(start_thread_);
RTC_DCHECK(start_thread_->IsCurrent());
- RTC_DCHECK(async_invoker_);
if (IsRunning()) {
// The module is responsible for OnIncomingCapturedFrame being called, if
// we stop it we will get no further callbacks.
@@ -308,10 +302,6 @@ void WebRtcVideoCapturer::Stop() {
<< captured_frames_ << " frames and dropping "
<< drop_ratio << "%";
- // Clear any pending async invokes (that OnIncomingCapturedFrame may have
- // caused).
- async_invoker_.reset();
-
SetCaptureFormat(NULL);
start_thread_ = nullptr;
SetCaptureState(CS_STOPPED);
@@ -337,7 +327,6 @@ void WebRtcVideoCapturer::OnFrame(
const webrtc::VideoFrame& sample) {
// This can only happen between Start() and Stop().
RTC_DCHECK(start_thread_);
- RTC_DCHECK(async_invoker_);
++captured_frames_;
// Log the size and pixel aspect ratio of the first captured frame.
« no previous file with comments | « webrtc/media/engine/webrtcvideocapturer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698