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

Side by Side Diff: media/video/capture/linux/video_capture_device_linux.h

Issue 8520033: Add OVERRIDE to media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Linux specific implementation of VideoCaptureDevice. 5 // Linux specific implementation of VideoCaptureDevice.
6 // V4L2 is used for capturing. V4L2 does not provide it's own thread for 6 // V4L2 is used for capturing. V4L2 does not provide it's own thread for
7 // capturing so this implementation uses a Chromium thread for fetching frames 7 // capturing so this implementation uses a Chromium thread for fetching frames
8 // from V4L2. 8 // from V4L2.
9 9
10 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ 10 #ifndef MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
11 #define MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ 11 #define MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "media/video/capture/video_capture_device.h" 16 #include "media/video/capture/video_capture_device.h"
17 17
18 namespace media { 18 namespace media {
19 19
20 class VideoCaptureDeviceLinux : public VideoCaptureDevice { 20 class VideoCaptureDeviceLinux : public VideoCaptureDevice {
21 public: 21 public:
22 explicit VideoCaptureDeviceLinux(const Name& device_name); 22 explicit VideoCaptureDeviceLinux(const Name& device_name);
23 virtual ~VideoCaptureDeviceLinux(); 23 virtual ~VideoCaptureDeviceLinux();
24 24
25 // VideoCaptureDevice implementation. 25 // VideoCaptureDevice implementation.
26 virtual void Allocate(int width, 26 virtual void Allocate(int width,
27 int height, 27 int height,
28 int frame_rate, 28 int frame_rate,
29 EventHandler* observer); 29 EventHandler* observer) OVERRIDE;
30 virtual void Start(); 30 virtual void Start() OVERRIDE;
31 virtual void Stop(); 31 virtual void Stop() OVERRIDE;
32 virtual void DeAllocate(); 32 virtual void DeAllocate() OVERRIDE;
33 virtual const Name& device_name(); 33 virtual const Name& device_name() OVERRIDE;
34 34
35 private: 35 private:
36 enum InternalState { 36 enum InternalState {
37 kIdle, // The device driver is opened but camera is not in use. 37 kIdle, // The device driver is opened but camera is not in use.
38 kAllocated, // The camera has been allocated and can be started. 38 kAllocated, // The camera has been allocated and can be started.
39 kCapturing, // Video is being captured. 39 kCapturing, // Video is being captured.
40 kError // Error accessing HW functions. 40 kError // Error accessing HW functions.
41 // User needs to recover by destroying the object. 41 // User needs to recover by destroying the object.
42 }; 42 };
43 43
(...skipping 27 matching lines...) Expand all
71 int buffer_pool_size_; // Number of allocated buffers. 71 int buffer_pool_size_; // Number of allocated buffers.
72 72
73 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux); 73 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux);
74 }; 74 };
75 75
76 } // namespace media 76 } // namespace media
77 77
78 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::VideoCaptureDeviceLinux); 78 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::VideoCaptureDeviceLinux);
79 79
80 #endif // MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ 80 #endif // MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
OLDNEW
« no previous file with comments | « media/video/capture/fake_video_capture_device.h ('k') | media/video/capture/win/video_capture_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698