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