| 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 either QTKit or | 5 // MacOSX implementation of generic VideoCaptureDevice, using either QTKit or |
| 6 // AVFoundation as native capture API. QTKit is used in OSX versions 10.6 and | 6 // AVFoundation as native capture API. QTKit is used in OSX versions 10.6 and |
| 7 // previous, and AVFoundation is used in the rest. | 7 // previous, and AVFoundation is used in the rest. |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 scoped_ptr<VideoCaptureDevice::Client> client_; | 65 scoped_ptr<VideoCaptureDevice::Client> client_; |
| 66 | 66 |
| 67 VideoCaptureFormat capture_format_; | 67 VideoCaptureFormat capture_format_; |
| 68 bool sent_frame_info_; | 68 bool sent_frame_info_; |
| 69 bool tried_to_square_pixels_; | 69 bool tried_to_square_pixels_; |
| 70 | 70 |
| 71 // Only read and write state_ from inside this loop. | 71 // Only read and write state_ from inside this loop. |
| 72 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 72 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 73 InternalState state_; | 73 InternalState state_; |
| 74 | 74 |
| 75 // Used with Bind and PostTask to ensure that methods aren't called | 75 id<PlatformVideoCapturingMac> capture_device_; |
| 76 // after the VideoCaptureDeviceMac is destroyed. | 76 |
| 77 // Used with Bind and PostTask to ensure that methods aren't called after the |
| 78 // VideoCaptureDeviceMac is destroyed. NOTE: This must always be last so it's |
| 79 // invalidated before other member variables might be accessed. |
| 77 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; | 80 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; |
| 78 base::WeakPtr<VideoCaptureDeviceMac> weak_this_; | |
| 79 | |
| 80 id<PlatformVideoCapturingMac> capture_device_; | |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); | 82 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace media | 85 } // namespace media |
| 86 | 86 |
| 87 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 87 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| OLD | NEW |