blob: c219a2a0ce3bedeb2b2e7277e37ddbd8773f5add [file] [log] [blame]
wu@webrtc.orgea899222011-10-11 17:13:51 +00001/*
leozwang@webrtc.org1745e932012-03-01 16:30:40 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
wu@webrtc.orgea899222011-10-11 17:13:51 +00003 *
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
Henrik Kjellander5dda80a2015-11-12 12:46:09 +010014#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_
15#define WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_
wu@webrtc.orgea899222011-10-11 17:13:51 +000016
Henrik Kjellander5dda80a2015-11-12 12:46:09 +010017#include "webrtc/modules/video_capture/video_capture.h"
wu@webrtc.orgea899222011-10-11 17:13:51 +000018
19namespace webrtc {
20
21class 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
Peter Boström1d194412016-03-21 16:44:31 +010027 static rtc::scoped_refptr<VideoCaptureModule> Create(
Peter Boström1d194412016-03-21 16:44:31 +010028 const char* deviceUniqueIdUTF8);
wu@webrtc.orgea899222011-10-11 17:13:51 +000029
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.
Peter Boström1d194412016-03-21 16:44:31 +010033 static rtc::scoped_refptr<VideoCaptureModule> Create(
Peter Boström1d194412016-03-21 16:44:31 +010034 VideoCaptureExternal*& externalCapture);
wu@webrtc.orgea899222011-10-11 17:13:51 +000035
nisseb29b9c82016-12-12 00:22:56 -080036 static VideoCaptureModule::DeviceInfo* CreateDeviceInfo();
wu@webrtc.orgea899222011-10-11 17:13:51 +000037
wu@webrtc.orgea899222011-10-11 17:13:51 +000038 private:
39 ~VideoCaptureFactory();
40};
41
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000042} // namespace webrtc
wu@webrtc.orgea899222011-10-11 17:13:51 +000043
Henrik Kjellander5dda80a2015-11-12 12:46:09 +010044#endif // WEBRTC_MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_