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 const VideoCaptureFormat& format) = 0; |
miu
2015/04/08 01:20:03
Seems like this interface change is unnecsessary a
mcasas
2015/04/08 22:07:06
No reason to bundle them but I changed
the first p
| |
249 const gfx::Size& dimensions) = 0; | |
250 | 249 |
251 // Captured a new video frame, held in |frame|. | 250 // Captured a new video frame, held in |frame|. |
252 // | 251 // |
253 // As the frame is backed by a reservation returned by | 252 // As the frame is backed by a reservation returned by |
254 // ReserveOutputBuffer(), delivery is guaranteed and will require no | 253 // ReserveOutputBuffer(), delivery is guaranteed and will require no |
255 // additional copies in the browser process. | 254 // additional copies in the browser process. |
256 virtual void OnIncomingCapturedVideoFrame( | 255 virtual void OnIncomingCapturedVideoFrame( |
257 const scoped_refptr<Buffer>& buffer, | 256 const scoped_refptr<Buffer>& buffer, |
258 const scoped_refptr<media::VideoFrame>& frame, | 257 const scoped_refptr<media::VideoFrame>& frame, |
259 const base::TimeTicks& timestamp) = 0; | 258 const base::TimeTicks& timestamp) = 0; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 int GetPowerLineFrequencyForLocation() const; | 291 int GetPowerLineFrequencyForLocation() const; |
293 | 292 |
294 protected: | 293 protected: |
295 static const int kPowerLine50Hz = 50; | 294 static const int kPowerLine50Hz = 50; |
296 static const int kPowerLine60Hz = 60; | 295 static const int kPowerLine60Hz = 60; |
297 }; | 296 }; |
298 | 297 |
299 } // namespace media | 298 } // namespace media |
300 | 299 |
301 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 300 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |