| 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_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 9 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| 10 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 10 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 std::unique_ptr<VideoCaptureDevice::Client> client_; | 92 std::unique_ptr<VideoCaptureDevice::Client> client_; |
| 93 | 93 |
| 94 VideoCaptureFormat capture_format_; | 94 VideoCaptureFormat capture_format_; |
| 95 | 95 |
| 96 // Only read and write state_ from inside this loop. | 96 // Only read and write state_ from inside this loop. |
| 97 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 97 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 98 InternalState state_; | 98 InternalState state_; |
| 99 | 99 |
| 100 base::scoped_nsobject<VideoCaptureDeviceAVFoundation> capture_device_; | 100 base::scoped_nsobject<VideoCaptureDeviceAVFoundation> capture_device_; |
| 101 | 101 |
| 102 base::TimeDelta first_timestamp_; | |
| 103 base::TimeTicks first_aligned_timestamp_; | |
| 104 | |
| 105 // Used with Bind and PostTask to ensure that methods aren't called after the | 102 // Used with Bind and PostTask to ensure that methods aren't called after the |
| 106 // VideoCaptureDeviceMac is destroyed. | 103 // VideoCaptureDeviceMac is destroyed. |
| 107 // NOTE: Weak pointers must be invalidated before all other member variables. | 104 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 108 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; | 105 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; |
| 109 | 106 |
| 110 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); | 107 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); |
| 111 }; | 108 }; |
| 112 | 109 |
| 113 } // namespace media | 110 } // namespace media |
| 114 | 111 |
| 115 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 112 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| OLD | NEW |