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

Side by Side Diff: webrtc/modules/video_capture/linux/video_capture_linux.h

Issue 1476453002: Clean up PlatformThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IsRunning DCHECK 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 unified diff | Download patch
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 21 matching lines...) Expand all
32 virtual int32_t CaptureSettings(VideoCaptureCapability& settings); 32 virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
33 33
34 private: 34 private:
35 enum {kNoOfV4L2Bufffers=4}; 35 enum {kNoOfV4L2Bufffers=4};
36 36
37 static bool CaptureThread(void*); 37 static bool CaptureThread(void*);
38 bool CaptureProcess(); 38 bool CaptureProcess();
39 bool AllocateVideoBuffers(); 39 bool AllocateVideoBuffers();
40 bool DeAllocateVideoBuffers(); 40 bool DeAllocateVideoBuffers();
41 41
42 rtc::scoped_ptr<PlatformThread> _captureThread; 42 // TODO(pbos): Stop using scoped_ptr and resetting the thread.
43 rtc::scoped_ptr<rtc::PlatformThread> _captureThread;
43 CriticalSectionWrapper* _captureCritSect; 44 CriticalSectionWrapper* _captureCritSect;
44 45
45 int32_t _deviceId; 46 int32_t _deviceId;
46 int32_t _deviceFd; 47 int32_t _deviceFd;
47 48
48 int32_t _buffersAllocatedByDevice; 49 int32_t _buffersAllocatedByDevice;
49 int32_t _currentWidth; 50 int32_t _currentWidth;
50 int32_t _currentHeight; 51 int32_t _currentHeight;
51 int32_t _currentFrameRate; 52 int32_t _currentFrameRate;
52 bool _captureStarted; 53 bool _captureStarted;
53 RawVideoType _captureVideoType; 54 RawVideoType _captureVideoType;
54 struct Buffer 55 struct Buffer
55 { 56 {
56 void *start; 57 void *start;
57 size_t length; 58 size_t length;
58 }; 59 };
59 Buffer *_pool; 60 Buffer *_pool;
60 }; 61 };
61 } // namespace videocapturemodule 62 } // namespace videocapturemodule
62 } // namespace webrtc 63 } // namespace webrtc
63 64
64 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_ 65 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_VIDEO_CAPTURE_LINUX_H_
OLDNEW
« no previous file with comments | « webrtc/modules/utility/source/process_thread_impl.cc ('k') | webrtc/modules/video_capture/linux/video_capture_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698