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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 using SetPhotoOptionsCallback = | 320 using SetPhotoOptionsCallback = |
321 ScopedResultCallback<base::Callback<void(bool)>>; | 321 ScopedResultCallback<base::Callback<void(bool)>>; |
322 virtual void SetPhotoOptions(mojom::PhotoSettingsPtr settings, | 322 virtual void SetPhotoOptions(mojom::PhotoSettingsPtr settings, |
323 SetPhotoOptionsCallback callback); | 323 SetPhotoOptionsCallback callback); |
324 | 324 |
325 // Asynchronously takes a photo, possibly reconfiguring the capture objects | 325 // Asynchronously takes a photo, possibly reconfiguring the capture objects |
326 // and/or interrupting the capture flow. Runs |callback| on the thread | 326 // and/or interrupting the capture flow. Runs |callback| on the thread |
327 // where TakePhoto() is called, if the photo was successfully taken. | 327 // where TakePhoto() is called, if the photo was successfully taken. |
328 using TakePhotoCallback = ScopedResultCallback< | 328 using TakePhotoCallback = ScopedResultCallback< |
329 base::Callback<void(mojo::String, mojo::Array<uint8_t>)>>; | 329 base::Callback<void(const std::string&, const std::vector<uint8_t>&)>>; |
330 virtual void TakePhoto(TakePhotoCallback callback); | 330 virtual void TakePhoto(TakePhotoCallback callback); |
331 | 331 |
332 // Gets the power line frequency, either from the params if specified by the | 332 // Gets the power line frequency, either from the params if specified by the |
333 // user or from the current system time zone. | 333 // user or from the current system time zone. |
334 PowerLineFrequency GetPowerLineFrequency( | 334 PowerLineFrequency GetPowerLineFrequency( |
335 const VideoCaptureParams& params) const; | 335 const VideoCaptureParams& params) const; |
336 | 336 |
337 private: | 337 private: |
338 // Gets the power line frequency from the current system time zone if this is | 338 // Gets the power line frequency from the current system time zone if this is |
339 // defined, otherwise returns 0. | 339 // defined, otherwise returns 0. |
340 PowerLineFrequency GetPowerLineFrequencyForLocation() const; | 340 PowerLineFrequency GetPowerLineFrequencyForLocation() const; |
341 }; | 341 }; |
342 | 342 |
343 } // namespace media | 343 } // namespace media |
344 | 344 |
345 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ | 345 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |