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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // The returned Buffer will always be allocated with a memory size suitable | 239 // The returned Buffer will always be allocated with a memory size suitable |
240 // for holding a packed video frame with pixels of |format| format, of | 240 // for holding a packed video frame with pixels of |format| format, of |
241 // |dimensions| frame dimensions. It is permissible for |dimensions| to be | 241 // |dimensions| frame dimensions. It is permissible for |dimensions| to be |
242 // zero; in which case the returned Buffer does not guarantee memory | 242 // zero; in which case the returned Buffer does not guarantee memory |
243 // backing, but functions as a reservation for external input for the | 243 // backing, but functions as a reservation for external input for the |
244 // purposes of buffer throttling. | 244 // purposes of buffer throttling. |
245 // | 245 // |
246 // The output buffer stays reserved and mapped for use until the Buffer | 246 // The output buffer stays reserved and mapped for use until the Buffer |
247 // object is destroyed or returned. | 247 // object is destroyed or returned. |
248 virtual scoped_ptr<Buffer> ReserveOutputBuffer( | 248 virtual scoped_ptr<Buffer> ReserveOutputBuffer( |
249 media::VideoPixelFormat format, | 249 const gfx::Size& dimensions, |
250 const gfx::Size& dimensions) = 0; | 250 VideoPixelFormat format, |
| 251 VideoPixelStorage storage) = 0; |
251 | 252 |
252 // Captured new video data, held in |frame| or |buffer|, respectively for | 253 // Captured new video data, held in |frame| or |buffer|, respectively for |
253 // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer(). | 254 // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer(). |
254 // | 255 // |
255 // In both cases, as the frame is backed by a reservation returned by | 256 // In both cases, as the frame is backed by a reservation returned by |
256 // ReserveOutputBuffer(), delivery is guaranteed and will require no | 257 // ReserveOutputBuffer(), delivery is guaranteed and will require no |
257 // additional copies in the browser process. | 258 // additional copies in the browser process. |
258 virtual void OnIncomingCapturedBuffer( | 259 virtual void OnIncomingCapturedBuffer( |
259 scoped_ptr<Buffer> buffer, | 260 scoped_ptr<Buffer> buffer, |
260 const VideoCaptureFormat& frame_format, | 261 const VideoCaptureFormat& frame_format, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 int GetPowerLineFrequencyForLocation() const; | 303 int GetPowerLineFrequencyForLocation() const; |
303 | 304 |
304 protected: | 305 protected: |
305 static const int kPowerLine50Hz = 50; | 306 static const int kPowerLine50Hz = 50; |
306 static const int kPowerLine60Hz = 60; | 307 static const int kPowerLine60Hz = 60; |
307 }; | 308 }; |
308 | 309 |
309 } // namespace media | 310 } // namespace media |
310 | 311 |
311 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 312 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |