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

Side by Side Diff: webrtc/video/video_capture_input.cc

Issue 1331833003: Remove unused event in ivideo_capture_input.cc. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_capture_input.h ('k') | no next file » | 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 26 matching lines...) Expand all
37 : capture_cs_(CriticalSectionWrapper::CreateCriticalSection()), 37 : capture_cs_(CriticalSectionWrapper::CreateCriticalSection()),
38 module_process_thread_(module_process_thread), 38 module_process_thread_(module_process_thread),
39 frame_callback_(frame_callback), 39 frame_callback_(frame_callback),
40 local_renderer_(local_renderer), 40 local_renderer_(local_renderer),
41 stats_proxy_(stats_proxy), 41 stats_proxy_(stats_proxy),
42 incoming_frame_cs_(CriticalSectionWrapper::CreateCriticalSection()), 42 incoming_frame_cs_(CriticalSectionWrapper::CreateCriticalSection()),
43 capture_thread_(ThreadWrapper::CreateThread(CaptureThreadFunction, 43 capture_thread_(ThreadWrapper::CreateThread(CaptureThreadFunction,
44 this, 44 this,
45 "CaptureThread")), 45 "CaptureThread")),
46 capture_event_(*EventWrapper::Create()), 46 capture_event_(*EventWrapper::Create()),
47 deliver_event_(*EventWrapper::Create()),
48 stop_(0), 47 stop_(0),
49 last_captured_timestamp_(0), 48 last_captured_timestamp_(0),
50 delta_ntp_internal_ms_( 49 delta_ntp_internal_ms_(
51 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds() - 50 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds() -
52 TickTime::MillisecondTimestamp()), 51 TickTime::MillisecondTimestamp()),
53 overuse_detector_(new OveruseFrameDetector(Clock::GetRealTimeClock(), 52 overuse_detector_(new OveruseFrameDetector(Clock::GetRealTimeClock(),
54 CpuOveruseOptions(), 53 CpuOveruseOptions(),
55 overuse_observer, 54 overuse_observer,
56 stats_proxy)) { 55 stats_proxy)) {
57 capture_thread_->Start(); 56 capture_thread_->Start();
58 capture_thread_->SetPriority(kHighPriority); 57 capture_thread_->SetPriority(kHighPriority);
59 module_process_thread_->RegisterModule(overuse_detector_.get()); 58 module_process_thread_->RegisterModule(overuse_detector_.get());
60 } 59 }
61 60
62 VideoCaptureInput::~VideoCaptureInput() { 61 VideoCaptureInput::~VideoCaptureInput() {
63 module_process_thread_->DeRegisterModule(overuse_detector_.get()); 62 module_process_thread_->DeRegisterModule(overuse_detector_.get());
64 63
65 // Stop the thread. 64 // Stop the thread.
66 rtc::AtomicOps::ReleaseStore(&stop_, 1); 65 rtc::AtomicOps::ReleaseStore(&stop_, 1);
67 capture_event_.Set(); 66 capture_event_.Set();
68 67
69 // Stop the camera input. 68 // Stop the camera input.
70 capture_thread_->Stop(); 69 capture_thread_->Stop();
71 delete &capture_event_; 70 delete &capture_event_;
72 delete &deliver_event_;
73 } 71 }
74 72
75 void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) { 73 void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) {
76 // TODO(pbos): Remove local rendering, it should be handled by the client code 74 // TODO(pbos): Remove local rendering, it should be handled by the client code
77 // if required. 75 // if required.
78 if (local_renderer_) 76 if (local_renderer_)
79 local_renderer_->RenderFrame(video_frame, 0); 77 local_renderer_->RenderFrame(video_frame, 0);
80 78
81 stats_proxy_->OnIncomingFrame(video_frame.width(), video_frame.height()); 79 stats_proxy_->OnIncomingFrame(video_frame.width(), video_frame.height());
82 80
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 153 }
156 // We're done! 154 // We're done!
157 if (capture_time != -1) { 155 if (capture_time != -1) {
158 overuse_detector_->FrameSent(capture_time); 156 overuse_detector_->FrameSent(capture_time);
159 } 157 }
160 return true; 158 return true;
161 } 159 }
162 160
163 } // namespace internal 161 } // namespace internal
164 } // namespace webrtc 162 } // namespace webrtc
OLDNEW
« 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