| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // additional copies in the browser process. | 240 // additional copies in the browser process. |
| 241 // See OnIncomingCapturedData for details of |reference_time| and | 241 // See OnIncomingCapturedData for details of |reference_time| and |
| 242 // |timestamp|. | 242 // |timestamp|. |
| 243 virtual void OnIncomingCapturedBuffer( | 243 virtual void OnIncomingCapturedBuffer( |
| 244 std::unique_ptr<Buffer> buffer, | 244 std::unique_ptr<Buffer> buffer, |
| 245 const VideoCaptureFormat& frame_format, | 245 const VideoCaptureFormat& frame_format, |
| 246 base::TimeTicks reference_time, | 246 base::TimeTicks reference_time, |
| 247 base::TimeDelta timestamp) = 0; | 247 base::TimeDelta timestamp) = 0; |
| 248 virtual void OnIncomingCapturedVideoFrame( | 248 virtual void OnIncomingCapturedVideoFrame( |
| 249 std::unique_ptr<Buffer> buffer, | 249 std::unique_ptr<Buffer> buffer, |
| 250 const scoped_refptr<VideoFrame>& frame, | 250 const scoped_refptr<VideoFrame>& frame) = 0; |
| 251 base::TimeTicks reference_time) = 0; | |
| 252 | 251 |
| 253 // Attempts to reserve the same Buffer provided in the last call to one of | 252 // Attempts to reserve the same Buffer provided in the last call to one of |
| 254 // the OnIncomingCapturedXXX() methods. This will fail if the content of the | 253 // the OnIncomingCapturedXXX() methods. This will fail if the content of the |
| 255 // Buffer has not been preserved, or if the |dimensions|, |format|, or | 254 // Buffer has not been preserved, or if the |dimensions|, |format|, or |
| 256 // |storage| disagree with how it was reserved via ReserveOutputBuffer(). | 255 // |storage| disagree with how it was reserved via ReserveOutputBuffer(). |
| 257 // When this operation fails, nullptr will be returned. | 256 // When this operation fails, nullptr will be returned. |
| 258 virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer( | 257 virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer( |
| 259 const gfx::Size& dimensions, | 258 const gfx::Size& dimensions, |
| 260 VideoPixelFormat format, | 259 VideoPixelFormat format, |
| 261 VideoPixelStorage storage) = 0; | 260 VideoPixelStorage storage) = 0; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 325 |
| 327 private: | 326 private: |
| 328 // Gets the power line frequency from the current system time zone if this is | 327 // Gets the power line frequency from the current system time zone if this is |
| 329 // defined, otherwise returns 0. | 328 // defined, otherwise returns 0. |
| 330 PowerLineFrequency GetPowerLineFrequencyForLocation() const; | 329 PowerLineFrequency GetPowerLineFrequencyForLocation() const; |
| 331 }; | 330 }; |
| 332 | 331 |
| 333 } // namespace media | 332 } // namespace media |
| 334 | 333 |
| 335 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ | 334 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |