blob: 86eb61efa1e21b16fbb1ad9e88e973414539801a [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
17namespace webrtc
18{
19namespace videocapturemodule
20{
21class DeviceInfoLinux: public DeviceInfoImpl
22{
23public:
nisseb29b9c82016-12-12 00:22:56 -080024 DeviceInfoLinux();
niklase@google.com470e71d2011-07-07 08:21:25 +000025 virtual ~DeviceInfoLinux();
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000026 virtual uint32_t NumberOfDevices();
27 virtual int32_t GetDeviceName(
28 uint32_t deviceNumber,
leozwang@webrtc.org1745e932012-03-01 16:30:40 +000029 char* deviceNameUTF8,
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000030 uint32_t deviceNameLength,
leozwang@webrtc.org1745e932012-03-01 16:30:40 +000031 char* deviceUniqueIdUTF8,
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000032 uint32_t deviceUniqueIdUTF8Length,
leozwang@webrtc.org1745e932012-03-01 16:30:40 +000033 char* productUniqueIdUTF8=0,
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000034 uint32_t productUniqueIdUTF8Length=0);
niklase@google.com470e71d2011-07-07 08:21:25 +000035 /*
36 * Fills the membervariable _captureCapabilities with capabilites for the given device name.
37 */
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000038 virtual int32_t CreateCapabilityMap (const char* deviceUniqueIdUTF8);
39 virtual int32_t DisplayCaptureSettingsDialogBox(
leozwang@webrtc.org1745e932012-03-01 16:30:40 +000040 const char* /*deviceUniqueIdUTF8*/,
41 const char* /*dialogTitleUTF8*/,
42 void* /*parentWindow*/,
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000043 uint32_t /*positionX*/,
44 uint32_t /*positionY*/) { return -1;}
fischman@webrtc.org69fc3152013-09-25 17:01:42 +000045 int32_t FillCapabilities(int fd);
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000046 int32_t Init();
niklase@google.com470e71d2011-07-07 08:21:25 +000047private:
48
49 bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8);
niklase@google.com470e71d2011-07-07 08:21:25 +000050};
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000051} // namespace videocapturemodule
52} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020053#endif // MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_