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

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

Issue 24079003: Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + implementation for Linux and Fake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed parameter device_name from GetDeviceSupportedFormats. Added explanation to VCD interface. Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 its own thread for 6 // V4L2 is used for capturing. V4L2 does not provide its 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_
(...skipping 12 matching lines...) Expand all
23 explicit VideoCaptureDeviceLinux(const Name& device_name); 23 explicit VideoCaptureDeviceLinux(const Name& device_name);
24 virtual ~VideoCaptureDeviceLinux(); 24 virtual ~VideoCaptureDeviceLinux();
25 25
26 // VideoCaptureDevice implementation. 26 // VideoCaptureDevice implementation.
27 virtual void Allocate(const VideoCaptureCapability& capture_format, 27 virtual void Allocate(const VideoCaptureCapability& capture_format,
28 EventHandler* observer) OVERRIDE; 28 EventHandler* observer) OVERRIDE;
29 virtual void Start() OVERRIDE; 29 virtual void Start() OVERRIDE;
30 virtual void Stop() OVERRIDE; 30 virtual void Stop() OVERRIDE;
31 virtual void DeAllocate() OVERRIDE; 31 virtual void DeAllocate() OVERRIDE;
32 virtual const Name& device_name() OVERRIDE; 32 virtual const Name& device_name() OVERRIDE;
33 virtual void GetDeviceSupportedFormats(
34 VideoCaptureFormats* capture_formats) OVERRIDE;
33 35
34 private: 36 private:
35 enum InternalState { 37 enum InternalState {
36 kIdle, // The device driver is opened but camera is not in use. 38 kIdle, // The device driver is opened but camera is not in use.
37 kAllocated, // The camera has been allocated and can be started. 39 kAllocated, // The camera has been allocated and can be started.
38 kCapturing, // Video is being captured. 40 kCapturing, // Video is being captured.
39 kError // Error accessing HW functions. 41 kError // Error accessing HW functions.
40 // User needs to recover by destroying the object. 42 // User needs to recover by destroying the object.
41 }; 43 };
42 44
(...skipping 26 matching lines...) Expand all
69 Buffer* buffer_pool_; 71 Buffer* buffer_pool_;
70 int buffer_pool_size_; // Number of allocated buffers. 72 int buffer_pool_size_; // Number of allocated buffers.
71 int timeout_count_; 73 int timeout_count_;
72 74
73 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux); 75 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux);
74 }; 76 };
75 77
76 } // namespace media 78 } // namespace media
77 79
78 #endif // MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ 80 #endif // MEDIA_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698