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 rtc::scoped_refptr<VideoCaptureModule> Create( | 27 static rtc::scoped_refptr<VideoCaptureModule> Create( |
28 const int32_t id, | |
29 const char* deviceUniqueIdUTF8); | 28 const char* deviceUniqueIdUTF8); |
30 | 29 |
31 // Create a video capture module object used for external capture. | 30 // Create a video capture module object used for external capture. |
32 // id - unique identifier of this video capture module object | 31 // id - unique identifier of this video capture module object |
33 // externalCapture - [out] interface to call when a new frame is captured. | 32 // externalCapture - [out] interface to call when a new frame is captured. |
34 static rtc::scoped_refptr<VideoCaptureModule> Create( | 33 static rtc::scoped_refptr<VideoCaptureModule> Create( |
35 const int32_t id, | |
36 VideoCaptureExternal*& externalCapture); | 34 VideoCaptureExternal*& externalCapture); |
37 | 35 |
38 static VideoCaptureModule::DeviceInfo* CreateDeviceInfo( | 36 static VideoCaptureModule::DeviceInfo* CreateDeviceInfo(); |
39 const int32_t id); | |
40 | 37 |
41 private: | 38 private: |
42 ~VideoCaptureFactory(); | 39 ~VideoCaptureFactory(); |
43 }; | 40 }; |
44 | 41 |
45 } // namespace webrtc | 42 } // namespace webrtc |
46 | 43 |
47 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ | 44 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ |
OLD | NEW |