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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 class MEDIA_EXPORT Client { | 196 class MEDIA_EXPORT Client { |
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 ClientBuffer AsClientBuffer() = 0; | 205 virtual ClientBuffer AsClientBuffer() = 0; |
206 virtual base::SharedMemoryHandle AsPlatformHandle() = 0; | |
mcasas
2015/05/07 00:59:03
Can you use base::PlatformFile instead of base::Sh
kcwu
2015/05/08 14:42:43
Done.
I'm not sure my GpuMemoryBufferBufferHandle:
| |
206 }; | 207 }; |
207 | 208 |
208 virtual ~Client() {} | 209 virtual ~Client() {} |
209 | 210 |
210 // Captured a new video frame, data for which is pointed to by |data|. | 211 // Captured a new video frame, data for which is pointed to by |data|. |
211 // | 212 // |
212 // The format of the frame is described by |frame_format|, and is assumed to | 213 // The format of the frame is described by |frame_format|, and is assumed to |
213 // be tightly packed. This method will try to reserve an output buffer and | 214 // be tightly packed. This method will try to reserve an output buffer and |
214 // copy from |data| into the output buffer. If no output buffer is | 215 // copy from |data| into the output buffer. If no output buffer is |
215 // available, the frame will be silently dropped. | 216 // available, the frame will be silently dropped. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 int GetPowerLineFrequencyForLocation() const; | 296 int GetPowerLineFrequencyForLocation() const; |
296 | 297 |
297 protected: | 298 protected: |
298 static const int kPowerLine50Hz = 50; | 299 static const int kPowerLine50Hz = 50; |
299 static const int kPowerLine60Hz = 60; | 300 static const int kPowerLine60Hz = 60; |
300 }; | 301 }; |
301 | 302 |
302 } // namespace media | 303 } // namespace media |
303 | 304 |
304 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 305 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |