| 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 // MacOSX implementation of generic VideoCaptureDevice, using AVFoundation as | 5 // MacOSX implementation of generic VideoCaptureDevice, using AVFoundation as |
| 6 // native capture API. AVFoundation is available in versions 10.7 (Lion) and | 6 // native capture API. AVFoundation is available in versions 10.7 (Lion) and |
| 7 // later. | 7 // later. |
| 8 | 8 |
| 9 #ifndef MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 9 #ifndef MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| 10 #define MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 10 #define MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const VideoCaptureDeviceDescriptor& device_descriptor); | 58 const VideoCaptureDeviceDescriptor& device_descriptor); |
| 59 ~VideoCaptureDeviceMac() override; | 59 ~VideoCaptureDeviceMac() override; |
| 60 | 60 |
| 61 // VideoCaptureDevice implementation. | 61 // VideoCaptureDevice implementation. |
| 62 void AllocateAndStart( | 62 void AllocateAndStart( |
| 63 const VideoCaptureParams& params, | 63 const VideoCaptureParams& params, |
| 64 std::unique_ptr<VideoCaptureDevice::Client> client) override; | 64 std::unique_ptr<VideoCaptureDevice::Client> client) override; |
| 65 void StopAndDeAllocate() override; | 65 void StopAndDeAllocate() override; |
| 66 void TakePhoto(TakePhotoCallback callback) override; | 66 void TakePhoto(TakePhotoCallback callback) override; |
| 67 void GetPhotoCapabilities(GetPhotoCapabilitiesCallback callback) override; | 67 void GetPhotoCapabilities(GetPhotoCapabilitiesCallback callback) override; |
| 68 void SetPhotoOptions(mojom::PhotoSettingsPtr settings, |
| 69 SetPhotoOptionsCallback callback) override; |
| 68 | 70 |
| 69 bool Init(VideoCaptureApi capture_api_type); | 71 bool Init(VideoCaptureApi capture_api_type); |
| 70 | 72 |
| 71 // Called to deliver captured video frames. It's safe to call this method | 73 // Called to deliver captured video frames. It's safe to call this method |
| 72 // from any thread, including those controlled by AVFoundation. | 74 // from any thread, including those controlled by AVFoundation. |
| 73 void ReceiveFrame(const uint8_t* video_frame, | 75 void ReceiveFrame(const uint8_t* video_frame, |
| 74 int video_frame_length, | 76 int video_frame_length, |
| 75 const VideoCaptureFormat& frame_format, | 77 const VideoCaptureFormat& frame_format, |
| 76 int aspect_numerator, | 78 int aspect_numerator, |
| 77 int aspect_denominator, | 79 int aspect_denominator, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // VideoCaptureDeviceMac is destroyed. | 123 // VideoCaptureDeviceMac is destroyed. |
| 122 // NOTE: Weak pointers must be invalidated before all other member variables. | 124 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 123 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; | 125 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; |
| 124 | 126 |
| 125 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); | 127 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 } // namespace media | 130 } // namespace media |
| 129 | 131 |
| 130 #endif // MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 132 #endif // MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| OLD | NEW |