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

Unified Diff: webrtc/video/video_capture_input.cc

Issue 1487893004: Replace EventWrapper in video/, test/ and call/. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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
Index: webrtc/video/video_capture_input.cc
diff --git a/webrtc/video/video_capture_input.cc b/webrtc/video/video_capture_input.cc
index ac05e36c4098b238df0a667bbad1c053b8444dc2..a70ce364192bdd07232a37ccb5a98e6fed4dc9bc 100644
--- a/webrtc/video/video_capture_input.cc
+++ b/webrtc/video/video_capture_input.cc
@@ -43,7 +43,7 @@ VideoCaptureInput::VideoCaptureInput(
stats_proxy_(stats_proxy),
incoming_frame_cs_(CriticalSectionWrapper::CreateCriticalSection()),
encoder_thread_(EncoderThreadFunction, this, "EncoderThread"),
- capture_event_(EventWrapper::Create()),
+ capture_event_(false, false),
stop_(0),
last_captured_timestamp_(0),
delta_ntp_internal_ms_(
@@ -64,7 +64,7 @@ VideoCaptureInput::~VideoCaptureInput() {
// Stop the thread.
rtc::AtomicOps::ReleaseStore(&stop_, 1);
- capture_event_->Set();
+ capture_event_.Set();
encoder_thread_.Stop();
}
@@ -116,7 +116,7 @@ void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) {
TRACE_EVENT_ASYNC_BEGIN1("webrtc", "Video", video_frame.render_time_ms(),
"render_time", video_frame.render_time_ms());
- capture_event_->Set();
+ capture_event_.Set();
}
bool VideoCaptureInput::EncoderThreadFunction(void* obj) {
@@ -126,7 +126,7 @@ bool VideoCaptureInput::EncoderThreadFunction(void* obj) {
bool VideoCaptureInput::EncoderProcess() {
static const int kThreadWaitTimeMs = 100;
int64_t capture_time = -1;
- if (capture_event_->Wait(kThreadWaitTimeMs) == kEventSignaled) {
+ if (capture_event_.Wait(kThreadWaitTimeMs)) {
if (rtc::AtomicOps::AcquireLoad(&stop_))
return false;

Powered by Google App Engine
This is Rietveld 408576698