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 "webrtc/modules/video_capture/device_info_impl.h" 15 #include "webrtc/modules/video_capture/video_capture_impl.h" 16 17 namespace webrtc 18 { 19 namespace videocapturemodule 20 { 21 class DeviceInfoLinux: public DeviceInfoImpl 22 { 23 public: 24 DeviceInfoLinux(const int32_t id); 25 virtual ~DeviceInfoLinux(); 26 virtual uint32_t NumberOfDevices(); 27 virtual int32_t GetDeviceName( 28 uint32_t deviceNumber, 29 char* deviceNameUTF8, 30 uint32_t deviceNameLength, 31 char* deviceUniqueIdUTF8, 32 uint32_t deviceUniqueIdUTF8Length, 33 char* productUniqueIdUTF8=0, 34 uint32_t productUniqueIdUTF8Length=0); 35 /* 36 * Fills the membervariable _captureCapabilities with capabilites for the given device name. 37 */ 38 virtual int32_t CreateCapabilityMap (const char* deviceUniqueIdUTF8); 39 virtual int32_t DisplayCaptureSettingsDialogBox( 40 const char* /*deviceUniqueIdUTF8*/, 41 const char* /*dialogTitleUTF8*/, 42 void* /*parentWindow*/, 43 uint32_t /*positionX*/, 44 uint32_t /*positionY*/) { return -1;} 45 int32_t FillCapabilities(int fd); 46 int32_t 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_ 54