tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

placeholder_device_info.h (1921B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef DOM_MEDIA_SYSTEMSERVICES_VIDEO_ENGINE_PLACEHOLDER_DEVICE_INFO_H_
      8 #define DOM_MEDIA_SYSTEMSERVICES_VIDEO_ENGINE_PLACEHOLDER_DEVICE_INFO_H_
      9 
     10 #include "modules/video_capture/device_info_impl.h"
     11 #include "modules/video_capture/video_capture.h"
     12 #include "modules/video_capture/video_capture_impl.h"
     13 
     14 namespace mozilla {
     15 
     16 class PlaceholderDeviceInfo
     17    : public webrtc::videocapturemodule::DeviceInfoImpl {
     18 public:
     19  explicit PlaceholderDeviceInfo(bool aCameraPresent);
     20  ~PlaceholderDeviceInfo() override;
     21 
     22  uint32_t NumberOfDevices() override;
     23  int32_t GetDeviceName(uint32_t aDeviceNumber, char* aDeviceNameUTF8,
     24                        uint32_t aDeviceNameLength, char* aDeviceUniqueIdUTF8,
     25                        uint32_t aDeviceUniqueIdUTF8Length,
     26                        char* aProductUniqueIdUTF8 = nullptr,
     27                        uint32_t aProductUniqueIdUTF8Length = 0,
     28                        pid_t* aPid = nullptr,
     29                        bool* aDeviceIsPlaceholder = nullptr) override;
     30 
     31  int32_t CreateCapabilityMap(const char* aDeviceUniqueIdUTF8) override;
     32  int32_t DisplayCaptureSettingsDialogBox(const char* aDeviceUniqueIdUTF8,
     33                                          const char* aDialogTitleUTF8,
     34                                          void* aParentWindow,
     35                                          uint32_t aPositionX,
     36                                          uint32_t aPositionY) override;
     37  int32_t Init() override;
     38 
     39 private:
     40  const bool mCameraPresent;
     41 };
     42 
     43 }  // namespace mozilla
     44 
     45 #endif  // DOM_MEDIA_SYSTEMSERVICES_VIDEO_ENGINE_PLACEHOLDER_DEVICE_INFO_H_