| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // into AllocateAndStart. | 276 // into AllocateAndStart. |
| 277 // | 277 // |
| 278 // If deallocation is done asynchronously, then the device implementation must | 278 // If deallocation is done asynchronously, then the device implementation must |
| 279 // ensure that a subsequent AllocateAndStart() operation targeting the same ID | 279 // ensure that a subsequent AllocateAndStart() operation targeting the same ID |
| 280 // would be sequenced through the same task runner, so that deallocation | 280 // would be sequenced through the same task runner, so that deallocation |
| 281 // happens first. | 281 // happens first. |
| 282 virtual void StopAndDeAllocate() = 0; | 282 virtual void StopAndDeAllocate() = 0; |
| 283 | 283 |
| 284 // Gets the power line frequency, either from the params if specified by the | 284 // Gets the power line frequency, either from the params if specified by the |
| 285 // user or from the current system time zone. | 285 // user or from the current system time zone. |
| 286 int GetPowerLineFrequency(const VideoCaptureParams& params) const; | 286 PowerLineFrequency GetPowerLineFrequency( |
| 287 const VideoCaptureParams& params) const; |
| 287 | 288 |
| 288 private: | 289 private: |
| 289 // Gets the power line frequency from the current system time zone if this is | 290 // Gets the power line frequency from the current system time zone if this is |
| 290 // defined, otherwise returns 0. | 291 // defined, otherwise returns 0. |
| 291 int GetPowerLineFrequencyForLocation() const; | 292 PowerLineFrequency GetPowerLineFrequencyForLocation() const; |
| 292 }; | 293 }; |
| 293 | 294 |
| 294 } // namespace media | 295 } // namespace media |
| 295 | 296 |
| 296 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 297 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |