tor-browser

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

device_info_pipewire.h (2275B)


      1 /*
      2 *  Copyright (c) 2022 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_LINUX_DEVICE_INFO_PIPEWIRE_H_
     12 #define MODULES_VIDEO_CAPTURE_LINUX_DEVICE_INFO_PIPEWIRE_H_
     13 
     14 #include <cstdint>
     15 
     16 #include "api/scoped_refptr.h"
     17 #include "modules/video_capture/device_info_impl.h"
     18 #include "modules/video_capture/video_capture_options.h"
     19 #include "rtc_base/thread_annotations.h"
     20 
     21 namespace webrtc {
     22 namespace videocapturemodule {
     23 class DeviceInfoPipeWire : public DeviceInfoImpl {
     24 public:
     25  explicit DeviceInfoPipeWire(VideoCaptureOptions* options);
     26  ~DeviceInfoPipeWire() override;
     27  uint32_t NumberOfDevices() override;
     28  int32_t GetDeviceName(uint32_t deviceNumber,
     29                        char* deviceNameUTF8,
     30                        uint32_t deviceNameLength,
     31                        char* deviceUniqueIdUTF8,
     32                        uint32_t deviceUniqueIdUTF8Length,
     33                        char* productUniqueIdUTF8 = nullptr,
     34                        uint32_t productUniqueIdUTF8Length = 0,
     35                        pid_t* pid = 0,
     36                        bool* deviceIsPlaceholder = 0) override;
     37  /*
     38   * Fills the membervariable _captureCapabilities with capabilites for the
     39   * given device name.
     40   */
     41  int32_t CreateCapabilityMap(const char* deviceUniqueIdUTF8) override
     42      RTC_EXCLUSIVE_LOCKS_REQUIRED(_apiLock);
     43  int32_t DisplayCaptureSettingsDialogBox(const char* /*deviceUniqueIdUTF8*/,
     44                                          const char* /*dialogTitleUTF8*/,
     45                                          void* /*parentWindow*/,
     46                                          uint32_t /*positionX*/,
     47                                          uint32_t /*positionY*/) override;
     48  int32_t Init() override;
     49 
     50 private:
     51  webrtc::scoped_refptr<PipeWireSession> pipewire_session_;
     52 };
     53 }  // namespace videocapturemodule
     54 }  // namespace webrtc
     55 #endif  // MODULES_VIDEO_CAPTURE_LINUX_DEVICE_INFO_PIPEWIRE_H_