1 /* 2 * Copyright 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_DESKTOP_CAPTURE_LINUX_WAYLAND_MOUSE_CURSOR_MONITOR_PIPEWIRE_H_ 12 #define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_MOUSE_CURSOR_MONITOR_PIPEWIRE_H_ 13 14 #include <memory> 15 16 #include "api/scoped_refptr.h" 17 #include "api/sequence_checker.h" 18 #include "modules/desktop_capture/desktop_capture_options.h" 19 #include "modules/desktop_capture/desktop_capture_types.h" 20 #include "modules/desktop_capture/linux/wayland/shared_screencast_stream.h" 21 #include "modules/desktop_capture/mouse_cursor.h" 22 #include "modules/desktop_capture/mouse_cursor_monitor.h" 23 #include "rtc_base/system/no_unique_address.h" 24 25 namespace webrtc { 26 27 class MouseCursorMonitorPipeWire : public MouseCursorMonitor { 28 public: 29 explicit MouseCursorMonitorPipeWire(const DesktopCaptureOptions& options); 30 ~MouseCursorMonitorPipeWire() override; 31 32 // MouseCursorMonitor: 33 void Init(Callback* callback, Mode mode) override; 34 void Capture() override; 35 36 DesktopCaptureOptions options_ RTC_GUARDED_BY(sequence_checker_); 37 Callback* callback_ RTC_GUARDED_BY(sequence_checker_) = nullptr; 38 Mode mode_ RTC_GUARDED_BY(sequence_checker_) = SHAPE_AND_POSITION; 39 RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_; 40 }; 41 42 } // namespace webrtc 43 44 #endif // MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_MOUSE_CURSOR_MONITOR_PIPEWIRE_H_ 45