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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // ReserveOutputBuffer() + OnIncomingCapturedVideoFrame(), or all of them. | 193 // ReserveOutputBuffer() + OnIncomingCapturedVideoFrame(), or all of them. |
194 // All clients must implement OnError(). | 194 // All clients must implement OnError(). |
195 class MEDIA_EXPORT Client { | 195 class MEDIA_EXPORT Client { |
196 public: | 196 public: |
197 // Memory buffer returned by Client::ReserveOutputBuffer(). | 197 // Memory buffer returned by Client::ReserveOutputBuffer(). |
198 class Buffer : public base::RefCountedThreadSafe<Buffer> { | 198 class Buffer : public base::RefCountedThreadSafe<Buffer> { |
199 public: | 199 public: |
200 virtual int id() const = 0; | 200 virtual int id() const = 0; |
201 virtual void* data() const = 0; | 201 virtual void* data() const = 0; |
202 virtual size_t size() const = 0; | 202 virtual size_t size() const = 0; |
| 203 virtual base::SharedMemoryHandle handle() const = 0; |
203 | 204 |
204 protected: | 205 protected: |
205 friend class base::RefCountedThreadSafe<Buffer>; | 206 friend class base::RefCountedThreadSafe<Buffer>; |
206 virtual ~Buffer() {} | 207 virtual ~Buffer() {} |
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 // |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 int GetPowerLineFrequencyForLocation() const; | 292 int GetPowerLineFrequencyForLocation() const; |
292 | 293 |
293 protected: | 294 protected: |
294 static const int kPowerLine50Hz = 50; | 295 static const int kPowerLine50Hz = 50; |
295 static const int kPowerLine60Hz = 60; | 296 static const int kPowerLine60Hz = 60; |
296 }; | 297 }; |
297 | 298 |
298 } // namespace media | 299 } // namespace media |
299 | 300 |
300 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 301 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |