andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 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 | #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ |
| 13 | |
| 14 | #include "../video_capture_impl.h" |
| 15 | #include "../device_info_impl.h" |
| 16 | |
| 17 | namespace webrtc |
| 18 | { |
| 19 | namespace videocapturemodule |
| 20 | { |
| 21 | class DeviceInfoLinux: public DeviceInfoImpl |
| 22 | { |
| 23 | public: |
| 24 | DeviceInfoLinux(const WebRtc_Word32 id); |
| 25 | virtual ~DeviceInfoLinux(); |
| 26 | virtual WebRtc_UWord32 NumberOfDevices(); |
| 27 | virtual WebRtc_Word32 GetDeviceName( |
| 28 | WebRtc_UWord32 deviceNumber, |
| 29 | char* deviceNameUTF8, |
| 30 | WebRtc_UWord32 deviceNameLength, |
| 31 | char* deviceUniqueIdUTF8, |
| 32 | WebRtc_UWord32 deviceUniqueIdUTF8Length, |
| 33 | char* productUniqueIdUTF8=0, |
| 34 | WebRtc_UWord32 productUniqueIdUTF8Length=0); |
| 35 | /* |
| 36 | * Fills the membervariable _captureCapabilities with capabilites for the given device name. |
| 37 | */ |
| 38 | virtual WebRtc_Word32 CreateCapabilityMap (const char* deviceUniqueIdUTF8); |
| 39 | virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox( |
| 40 | const char* /*deviceUniqueIdUTF8*/, |
| 41 | const char* /*dialogTitleUTF8*/, |
| 42 | void* /*parentWindow*/, |
| 43 | WebRtc_UWord32 /*positionX*/, |
| 44 | WebRtc_UWord32 /*positionY*/) { return -1;} |
| 45 | WebRtc_Word32 FillCapabilityMap(int fd); |
| 46 | WebRtc_Word32 Init(); |
| 47 | private: |
| 48 | |
| 49 | bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8); |
| 50 | }; |
| 51 | } // namespace videocapturemodule |
| 52 | } // namespace webrtc |
| 53 | #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ |