| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 // This file contains interfaces used for creating the VideoCaptureModule | 11 // This file contains interfaces used for creating the VideoCaptureModule |
| 12 // and DeviceInfo. | 12 // and DeviceInfo. |
| 13 | 13 |
| 14 #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ | 14 #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ |
| 15 #define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ | 15 #define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ |
| 16 | 16 |
| 17 #include "webrtc/modules/video_capture/video_capture.h" | 17 #include "webrtc/modules/video_capture/video_capture.h" |
| 18 | 18 |
| 19 namespace webrtc { | 19 namespace webrtc { |
| 20 | 20 |
| 21 class VideoCaptureFactory { | 21 class VideoCaptureFactory { |
| 22 public: | 22 public: |
| 23 // Create a video capture module object | 23 // Create a video capture module object |
| 24 // id - unique identifier of this video capture module object. | 24 // id - unique identifier of this video capture module object. |
| 25 // deviceUniqueIdUTF8 - name of the device. | 25 // deviceUniqueIdUTF8 - name of the device. |
| 26 // Available names can be found by using GetDeviceName | 26 // Available names can be found by using GetDeviceName |
| 27 static VideoCaptureModule* Create(const int32_t id, | 27 static rtc::scoped_refptr<VideoCaptureModule> Create( |
| 28 const char* deviceUniqueIdUTF8); | 28 const int32_t id, |
| 29 const char* deviceUniqueIdUTF8); |
| 29 | 30 |
| 30 // Create a video capture module object used for external capture. | 31 // Create a video capture module object used for external capture. |
| 31 // id - unique identifier of this video capture module object | 32 // id - unique identifier of this video capture module object |
| 32 // externalCapture - [out] interface to call when a new frame is captured. | 33 // externalCapture - [out] interface to call when a new frame is captured. |
| 33 static VideoCaptureModule* Create(const int32_t id, | 34 static rtc::scoped_refptr<VideoCaptureModule> Create( |
| 34 VideoCaptureExternal*& externalCapture); | 35 const int32_t id, |
| 36 VideoCaptureExternal*& externalCapture); |
| 35 | 37 |
| 36 static VideoCaptureModule::DeviceInfo* CreateDeviceInfo( | 38 static VideoCaptureModule::DeviceInfo* CreateDeviceInfo( |
| 37 const int32_t id); | 39 const int32_t id); |
| 38 | 40 |
| 39 private: | 41 private: |
| 40 ~VideoCaptureFactory(); | 42 ~VideoCaptureFactory(); |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 } // namespace webrtc | 45 } // namespace webrtc |
| 44 | 46 |
| 45 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ | 47 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ |
| OLD | NEW |