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

Unified Diff: webrtc/video/video_capture_input.cc

Issue 1332383002: Rename CaptureThread to EncodingThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: EncoderThreadFunction Created 5 years, 3 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/video/video_capture_input.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_capture_input.cc
diff --git a/webrtc/video/video_capture_input.cc b/webrtc/video/video_capture_input.cc
index 92d1c8fb98dbc65c7289732b8701c3d97d45ec61..25d408b4aa7cc34df5ce49a5c22b1a6cc5ebbfe2 100644
--- a/webrtc/video/video_capture_input.cc
+++ b/webrtc/video/video_capture_input.cc
@@ -40,10 +40,10 @@ VideoCaptureInput::VideoCaptureInput(ProcessThread* module_process_thread,
local_renderer_(local_renderer),
stats_proxy_(stats_proxy),
incoming_frame_cs_(CriticalSectionWrapper::CreateCriticalSection()),
- capture_thread_(ThreadWrapper::CreateThread(CaptureThreadFunction,
+ encoder_thread_(ThreadWrapper::CreateThread(EncoderThreadFunction,
this,
- "CaptureThread")),
- capture_event_(*EventWrapper::Create()),
+ "EncoderThread")),
+ capture_event_(EventWrapper::Create()),
stop_(0),
last_captured_timestamp_(0),
delta_ntp_internal_ms_(
@@ -53,8 +53,8 @@ VideoCaptureInput::VideoCaptureInput(ProcessThread* module_process_thread,
CpuOveruseOptions(),
overuse_observer,
stats_proxy)) {
- capture_thread_->Start();
- capture_thread_->SetPriority(kHighPriority);
+ encoder_thread_->Start();
+ encoder_thread_->SetPriority(kHighPriority);
module_process_thread_->RegisterModule(overuse_detector_.get());
}
@@ -63,11 +63,8 @@ VideoCaptureInput::~VideoCaptureInput() {
// Stop the thread.
rtc::AtomicOps::ReleaseStore(&stop_, 1);
- capture_event_.Set();
-
- // Stop the camera input.
- capture_thread_->Stop();
- delete &capture_event_;
+ capture_event_->Set();
+ encoder_thread_->Stop();
}
void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) {
@@ -118,17 +115,17 @@ 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::CaptureThreadFunction(void* obj) {
- return static_cast<VideoCaptureInput*>(obj)->CaptureProcess();
+bool VideoCaptureInput::EncoderThreadFunction(void* obj) {
+ return static_cast<VideoCaptureInput*>(obj)->EncoderProcess();
}
-bool VideoCaptureInput::CaptureProcess() {
+bool VideoCaptureInput::EncoderProcess() {
static const int kThreadWaitTimeMs = 100;
int64_t capture_time = -1;
- if (capture_event_.Wait(kThreadWaitTimeMs) == kEventSignaled) {
+ if (capture_event_->Wait(kThreadWaitTimeMs) == kEventSignaled) {
if (rtc::AtomicOps::AcquireLoad(&stop_))
return false;
« no previous file with comments | « webrtc/video/video_capture_input.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698