device_info.h (2344B)
1 /* 2 * Copyright (c) 2013 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 MODULES_VIDEO_CAPTURE_OBJC_DEVICE_INFO_H_ 12 #define MODULES_VIDEO_CAPTURE_OBJC_DEVICE_INFO_H_ 13 14 #include "modules/video_capture/device_info_impl.h" 15 16 #include <map> 17 #include <string> 18 19 @class DeviceInfoIosObjC; 20 21 namespace webrtc::videocapturemodule { 22 class DeviceInfoIos : public DeviceInfoImpl { 23 public: 24 DeviceInfoIos(); 25 virtual ~DeviceInfoIos(); 26 27 // Implementation of DeviceInfoImpl. 28 int32_t Init() override; 29 uint32_t NumberOfDevices() override; 30 int32_t GetDeviceName(uint32_t deviceNumber, char* deviceNameUTF8, 31 uint32_t deviceNameLength, char* deviceUniqueIdUTF8, 32 uint32_t deviceUniqueIdUTF8Length, 33 char* productUniqueIdUTF8 = 0, 34 uint32_t productUniqueIdUTF8Length = 0, pid_t* pid = 0, 35 bool* deviceIsPlaceholder = 0) override; 36 37 int32_t NumberOfCapabilities(const char* deviceUniqueIdUTF8) override; 38 39 int32_t GetCapability(const char* deviceUniqueIdUTF8, 40 const uint32_t deviceCapabilityNumber, 41 VideoCaptureCapability& capability) override; 42 43 int32_t DisplayCaptureSettingsDialogBox(const char* deviceUniqueIdUTF8, 44 const char* dialogTitleUTF8, 45 void* parentWindow, 46 uint32_t positionX, 47 uint32_t positionY) override; 48 49 int32_t GetOrientation(const char* deviceUniqueIdUTF8, 50 VideoRotation& orientation) override; 51 52 int32_t CreateCapabilityMap(const char* device_unique_id_utf8) override 53 RTC_EXCLUSIVE_LOCKS_REQUIRED(_apiLock); 54 55 private: 56 std::map<std::string, VideoCaptureCapabilities> _capabilitiesMap; 57 DeviceInfoIosObjC* _captureInfo; 58 }; 59 60 } // namespace webrtc::videocapturemodule 61 62 #endif // MODULES_VIDEO_CAPTURE_OBJC_DEVICE_INFO_H_