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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // The returned Buffer will always be allocated with a memory size suitable | 238 // The returned Buffer will always be allocated with a memory size suitable |
239 // for holding a packed video frame with pixels of |format| format, of | 239 // for holding a packed video frame with pixels of |format| format, of |
240 // |dimensions| frame dimensions. It is permissible for |dimensions| to be | 240 // |dimensions| frame dimensions. It is permissible for |dimensions| to be |
241 // zero; in which case the returned Buffer does not guarantee memory | 241 // zero; in which case the returned Buffer does not guarantee memory |
242 // backing, but functions as a reservation for external input for the | 242 // backing, but functions as a reservation for external input for the |
243 // purposes of buffer throttling. | 243 // purposes of buffer throttling. |
244 // | 244 // |
245 // The output buffer stays reserved for use until the Buffer object is | 245 // The output buffer stays reserved for use until the Buffer object is |
246 // destroyed. | 246 // destroyed. |
247 virtual scoped_refptr<Buffer> ReserveOutputBuffer( | 247 virtual scoped_refptr<Buffer> ReserveOutputBuffer( |
248 media::VideoFrame::Format format, | 248 media::VideoPixelFormat format, |
249 const gfx::Size& dimensions) = 0; | 249 const gfx::Size& dimensions) = 0; |
250 | 250 |
251 // Captured a new video frame, held in |frame|. | 251 // Captured a new video frame, held in |frame|. |
252 // | 252 // |
253 // As the frame is backed by a reservation returned by | 253 // As the frame is backed by a reservation returned by |
254 // ReserveOutputBuffer(), delivery is guaranteed and will require no | 254 // ReserveOutputBuffer(), delivery is guaranteed and will require no |
255 // additional copies in the browser process. | 255 // additional copies in the browser process. |
256 virtual void OnIncomingCapturedVideoFrame( | 256 virtual void OnIncomingCapturedVideoFrame( |
257 const scoped_refptr<Buffer>& buffer, | 257 const scoped_refptr<Buffer>& buffer, |
258 const scoped_refptr<media::VideoFrame>& frame, | 258 const scoped_refptr<media::VideoFrame>& frame, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 int GetPowerLineFrequencyForLocation() const; | 292 int GetPowerLineFrequencyForLocation() const; |
293 | 293 |
294 protected: | 294 protected: |
295 static const int kPowerLine50Hz = 50; | 295 static const int kPowerLine50Hz = 50; |
296 static const int kPowerLine60Hz = 60; | 296 static const int kPowerLine60Hz = 60; |
297 }; | 297 }; |
298 | 298 |
299 } // namespace media | 299 } // namespace media |
300 | 300 |
301 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 301 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |