niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
leozwang@webrtc.org | 1745e93 | 2012-03-01 16:30:40 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #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.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "modules/video_capture/device_info_impl.h" |
| 15 | #include "modules/video_capture/video_capture_impl.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 16 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 17 | namespace webrtc { |
| 18 | namespace videocapturemodule { |
| 19 | class DeviceInfoLinux : public DeviceInfoImpl { |
| 20 | public: |
| 21 | DeviceInfoLinux(); |
Mirko Bonadei | 5aec1f6 | 2018-08-29 13:27:15 +0200 | [diff] [blame^] | 22 | ~DeviceInfoLinux() override; |
| 23 | uint32_t NumberOfDevices() override; |
| 24 | 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) override; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 31 | /* |
| 32 | * Fills the membervariable _captureCapabilities with capabilites for the |
| 33 | * given device name. |
| 34 | */ |
Mirko Bonadei | 5aec1f6 | 2018-08-29 13:27:15 +0200 | [diff] [blame^] | 35 | int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8) override; |
| 36 | int32_t DisplayCaptureSettingsDialogBox(const char* /*deviceUniqueIdUTF8*/, |
| 37 | const char* /*dialogTitleUTF8*/, |
| 38 | void* /*parentWindow*/, |
| 39 | uint32_t /*positionX*/, |
| 40 | uint32_t /*positionY*/) override; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 41 | int32_t FillCapabilities(int fd); |
Mirko Bonadei | 5aec1f6 | 2018-08-29 13:27:15 +0200 | [diff] [blame^] | 42 | int32_t Init() override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 44 | private: |
| 45 | bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 46 | }; |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 47 | } // namespace videocapturemodule |
| 48 | } // namespace webrtc |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 49 | #endif // MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ |