OLD | NEW |
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 // 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, depending on the OS | 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS |
10 // specific implementation. | 10 // specific implementation. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 public: | 197 public: |
198 // Memory buffer returned by Client::ReserveOutputBuffer(). | 198 // Memory buffer returned by Client::ReserveOutputBuffer(). |
199 class MEDIA_EXPORT Buffer { | 199 class MEDIA_EXPORT Buffer { |
200 public: | 200 public: |
201 virtual ~Buffer() = 0; | 201 virtual ~Buffer() = 0; |
202 virtual int id() const = 0; | 202 virtual int id() const = 0; |
203 virtual size_t size() const = 0; | 203 virtual size_t size() const = 0; |
204 virtual void* data() = 0; | 204 virtual void* data() = 0; |
205 virtual gfx::GpuMemoryBufferType GetType() = 0; | 205 virtual gfx::GpuMemoryBufferType GetType() = 0; |
206 virtual ClientBuffer AsClientBuffer() = 0; | 206 virtual ClientBuffer AsClientBuffer() = 0; |
| 207 virtual base::PlatformFile AsPlatformHandle() = 0; |
207 }; | 208 }; |
208 | 209 |
209 virtual ~Client() {} | 210 virtual ~Client() {} |
210 | 211 |
211 // Captured a new video frame, data for which is pointed to by |data|. | 212 // Captured a new video frame, data for which is pointed to by |data|. |
212 // | 213 // |
213 // The format of the frame is described by |frame_format|, and is assumed to | 214 // The format of the frame is described by |frame_format|, and is assumed to |
214 // be tightly packed. This method will try to reserve an output buffer and | 215 // be tightly packed. This method will try to reserve an output buffer and |
215 // copy from |data| into the output buffer. If no output buffer is | 216 // copy from |data| into the output buffer. If no output buffer is |
216 // available, the frame will be silently dropped. | 217 // available, the frame will be silently dropped. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 int GetPowerLineFrequencyForLocation() const; | 297 int GetPowerLineFrequencyForLocation() const; |
297 | 298 |
298 protected: | 299 protected: |
299 static const int kPowerLine50Hz = 50; | 300 static const int kPowerLine50Hz = 50; |
300 static const int kPowerLine60Hz = 60; | 301 static const int kPowerLine60Hz = 60; |
301 }; | 302 }; |
302 | 303 |
303 } // namespace media | 304 } // namespace media |
304 | 305 |
305 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 306 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |