| OLD | NEW |
| 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 // VideoCaptureDevice is the abstract base class for realizing video capture | 5 // VideoCaptureDevice is the abstract base class for realizing video capture |
| 6 // device support in Chromium. It provides the interface for OS dependent | 6 // device support in Chromium. It provides the interface for OS dependent |
| 7 // implementations. | 7 // implementations. |
| 8 // The class is created and functions are invoked on a thread owned by | 8 // The class is created and functions are invoked on a thread owned by |
| 9 // VideoCaptureManager. Capturing is done on other threads depended on the OS | 9 // VideoCaptureManager. Capturing is done on other threads depended on the OS |
| 10 // specific implementation. | 10 // specific implementation. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // Color formats from camera. | 36 // Color formats from camera. |
| 37 enum Format { | 37 enum Format { |
| 38 kColorUnknown, // Color format not set. | 38 kColorUnknown, // Color format not set. |
| 39 kI420, | 39 kI420, |
| 40 kYUY2, | 40 kYUY2, |
| 41 kUYVY, | 41 kUYVY, |
| 42 kRGB24, | 42 kRGB24, |
| 43 kARGB, | 43 kARGB, |
| 44 kMJPEG, // Currently only supported on Windows. | 44 kMJPEG, // Currently only supported on Windows. |
| 45 kNV21, |
| 46 kYV12, |
| 45 }; | 47 }; |
| 46 | 48 |
| 47 // Describes the format a camera capture video in. | 49 // Describes the format a camera capture video in. |
| 48 struct Capability { | 50 struct Capability { |
| 49 Capability() | 51 Capability() |
| 50 : width(0), | 52 : width(0), |
| 51 height(0), | 53 height(0), |
| 52 frame_rate(0), | 54 frame_rate(0), |
| 53 color(kColorUnknown) {} | 55 color(kColorUnknown) {} |
| 54 int width; | 56 int width; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // state it was when created. | 104 // state it was when created. |
| 103 virtual void DeAllocate() = 0; | 105 virtual void DeAllocate() = 0; |
| 104 | 106 |
| 105 // Get the name of the capture device. | 107 // Get the name of the capture device. |
| 106 virtual const Name& device_name() = 0; | 108 virtual const Name& device_name() = 0; |
| 107 }; | 109 }; |
| 108 | 110 |
| 109 } // namespace media | 111 } // namespace media |
| 110 | 112 |
| 111 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 113 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |