| 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 // OS X implementation of VideoCaptureDevice, using QTKit as native capture API. | 5 // OS X implementation of VideoCaptureDevice, using QTKit as native capture API. |
| 6 | 6 |
| 7 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 7 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| 8 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 8 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 explicit VideoCaptureDeviceMac(const Name& device_name); | 27 explicit VideoCaptureDeviceMac(const Name& device_name); |
| 28 virtual ~VideoCaptureDeviceMac(); | 28 virtual ~VideoCaptureDeviceMac(); |
| 29 | 29 |
| 30 // VideoCaptureDevice implementation. | 30 // VideoCaptureDevice implementation. |
| 31 virtual void Allocate(const VideoCaptureCapability& capture_format, | 31 virtual void Allocate(const VideoCaptureCapability& capture_format, |
| 32 VideoCaptureDevice::EventHandler* observer) OVERRIDE; | 32 VideoCaptureDevice::EventHandler* observer) OVERRIDE; |
| 33 virtual void Start() OVERRIDE; | 33 virtual void Start() OVERRIDE; |
| 34 virtual void Stop() OVERRIDE; | 34 virtual void Stop() OVERRIDE; |
| 35 virtual void DeAllocate() OVERRIDE; | 35 virtual void DeAllocate() OVERRIDE; |
| 36 virtual const Name& device_name() OVERRIDE; | 36 virtual const Name& device_name() OVERRIDE; |
| 37 virtual void GetDeviceSupportedFormats( |
| 38 VideoCaptureFormats* capture_formats) OVERRIDE; |
| 37 | 39 |
| 38 bool Init(); | 40 bool Init(); |
| 39 | 41 |
| 40 // Called to deliver captured video frames. | 42 // Called to deliver captured video frames. |
| 41 void ReceiveFrame(const uint8* video_frame, int video_frame_length, | 43 void ReceiveFrame(const uint8* video_frame, int video_frame_length, |
| 42 const VideoCaptureCapability& frame_info); | 44 const VideoCaptureCapability& frame_info); |
| 43 | 45 |
| 44 void ReceiveError(const std::string& reason); | 46 void ReceiveError(const std::string& reason); |
| 45 | 47 |
| 46 private: | 48 private: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 68 base::WeakPtr<VideoCaptureDeviceMac> weak_this_; | 70 base::WeakPtr<VideoCaptureDeviceMac> weak_this_; |
| 69 | 71 |
| 70 VideoCaptureDeviceQTKit* capture_device_; | 72 VideoCaptureDeviceQTKit* capture_device_; |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); | 74 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace media | 77 } // namespace media |
| 76 | 78 |
| 77 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ | 79 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ |
| OLD | NEW |