blob: fc7b4d8d03f37166221546992f299f0fc77b79e0 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
leozwang@webrtc.org1745e932012-03-01 16:30:40 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_
12#define MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "modules/video_capture/device_info_impl.h"
15#include "modules/video_capture/video_capture_impl.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016
Yves Gerey665174f2018-06-19 15:03:05 +020017namespace webrtc {
18namespace videocapturemodule {
19class DeviceInfoLinux : public DeviceInfoImpl {
20 public:
21 DeviceInfoLinux();
22 virtual ~DeviceInfoLinux();
23 virtual uint32_t NumberOfDevices();
24 virtual int32_t GetDeviceName(uint32_t deviceNumber,
25 char* deviceNameUTF8,
26 uint32_t deviceNameLength,
27 char* deviceUniqueIdUTF8,
28 uint32_t deviceUniqueIdUTF8Length,
29 char* productUniqueIdUTF8 = 0,
30 uint32_t productUniqueIdUTF8Length = 0);
31 /*
32 * Fills the membervariable _captureCapabilities with capabilites for the
33 * given device name.
34 */
35 virtual int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8);
36 virtual int32_t DisplayCaptureSettingsDialogBox(
37 const char* /*deviceUniqueIdUTF8*/,
38 const char* /*dialogTitleUTF8*/,
39 void* /*parentWindow*/,
40 uint32_t /*positionX*/,
41 uint32_t /*positionY*/) {
42 return -1;
43 }
44 int32_t FillCapabilities(int fd);
45 int32_t Init();
niklase@google.com470e71d2011-07-07 08:21:25 +000046
Yves Gerey665174f2018-06-19 15:03:05 +020047 private:
48 bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8);
niklase@google.com470e71d2011-07-07 08:21:25 +000049};
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000050} // namespace videocapturemodule
51} // namespace webrtc
Yves Gerey665174f2018-06-19 15:03:05 +020052#endif // MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_