OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ | 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_ | 12 #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ |
13 | 13 |
14 #include "webrtc/modules/video_capture/device_info_impl.h" | 14 #include "webrtc/modules/video_capture/device_info_impl.h" |
15 #include "webrtc/modules/video_capture/video_capture_impl.h" | 15 #include "webrtc/modules/video_capture/video_capture_impl.h" |
16 | 16 |
17 namespace webrtc | 17 namespace webrtc |
18 { | 18 { |
19 namespace videocapturemodule | 19 namespace videocapturemodule |
20 { | 20 { |
21 class DeviceInfoLinux: public DeviceInfoImpl | 21 class DeviceInfoLinux: public DeviceInfoImpl |
22 { | 22 { |
23 public: | 23 public: |
24 DeviceInfoLinux(const int32_t id); | 24 DeviceInfoLinux(); |
25 virtual ~DeviceInfoLinux(); | 25 virtual ~DeviceInfoLinux(); |
26 virtual uint32_t NumberOfDevices(); | 26 virtual uint32_t NumberOfDevices(); |
27 virtual int32_t GetDeviceName( | 27 virtual int32_t GetDeviceName( |
28 uint32_t deviceNumber, | 28 uint32_t deviceNumber, |
29 char* deviceNameUTF8, | 29 char* deviceNameUTF8, |
30 uint32_t deviceNameLength, | 30 uint32_t deviceNameLength, |
31 char* deviceUniqueIdUTF8, | 31 char* deviceUniqueIdUTF8, |
32 uint32_t deviceUniqueIdUTF8Length, | 32 uint32_t deviceUniqueIdUTF8Length, |
33 char* productUniqueIdUTF8=0, | 33 char* productUniqueIdUTF8=0, |
34 uint32_t productUniqueIdUTF8Length=0); | 34 uint32_t productUniqueIdUTF8Length=0); |
35 /* | 35 /* |
36 * Fills the membervariable _captureCapabilities with capabilites for the giv
en device name. | 36 * Fills the membervariable _captureCapabilities with capabilites for the giv
en device name. |
37 */ | 37 */ |
38 virtual int32_t CreateCapabilityMap (const char* deviceUniqueIdUTF8); | 38 virtual int32_t CreateCapabilityMap (const char* deviceUniqueIdUTF8); |
39 virtual int32_t DisplayCaptureSettingsDialogBox( | 39 virtual int32_t DisplayCaptureSettingsDialogBox( |
40 const char* /*deviceUniqueIdUTF8*/, | 40 const char* /*deviceUniqueIdUTF8*/, |
41 const char* /*dialogTitleUTF8*/, | 41 const char* /*dialogTitleUTF8*/, |
42 void* /*parentWindow*/, | 42 void* /*parentWindow*/, |
43 uint32_t /*positionX*/, | 43 uint32_t /*positionX*/, |
44 uint32_t /*positionY*/) { return -1;} | 44 uint32_t /*positionY*/) { return -1;} |
45 int32_t FillCapabilities(int fd); | 45 int32_t FillCapabilities(int fd); |
46 int32_t Init(); | 46 int32_t Init(); |
47 private: | 47 private: |
48 | 48 |
49 bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8); | 49 bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8); |
50 }; | 50 }; |
51 } // namespace videocapturemodule | 51 } // namespace videocapturemodule |
52 } // namespace webrtc | 52 } // namespace webrtc |
53 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ | 53 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_ |
OLD | NEW |