mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-19 00:27:51 +01:00

Currently, when users want to use the screen sharing and are using the Wayland display server (the default on Fedora distribution), then it doesn't work, because the WebRTC only includes the X11 implementation. This change adds the support by using the PipeWire multimedia server. The PipeWire implementation in WebRTC stays in screen-capturer-pipewire.c and is guarded by the rtc_use_pipewire build flag that is automatically enabled on Linux. More information are included in the relevant commit messages. Tested on the current Chromium master and Firefox. The sysroot changes are requested in: https://chromium-review.googlesource.com/c/chromium/src/+/1258174 Co-authored-by: Jan Grulich <grulja@gmail.com> Co-authored-by: Eike Rathke <erathke@redhat.com> Change-Id: I212074a4bc437b99a77bf383266026c5bfae7c4a BUG=chromium:682122 Change-Id: I212074a4bc437b99a77bf383266026c5bfae7c4a Reviewed-on: https://webrtc-review.googlesource.com/c/103504 Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Brave Yao <braveyao@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25461}
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
/*
|
|
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "modules/desktop_capture/mouse_cursor_monitor.h"
|
|
|
|
#if defined(USE_X11)
|
|
#include "modules/desktop_capture/linux/mouse_cursor_monitor_x11.h"
|
|
#endif // defined(USE_X11)
|
|
|
|
namespace webrtc {
|
|
|
|
// static
|
|
MouseCursorMonitor* MouseCursorMonitor::CreateForWindow(
|
|
const DesktopCaptureOptions& options,
|
|
WindowId window) {
|
|
#if defined(USE_X11)
|
|
return MouseCursorMonitorX11::CreateForWindow(options, window);
|
|
#else
|
|
return nullptr;
|
|
#endif // defined(USE_X11)
|
|
}
|
|
|
|
// static
|
|
MouseCursorMonitor* MouseCursorMonitor::CreateForScreen(
|
|
const DesktopCaptureOptions& options,
|
|
ScreenId screen) {
|
|
#if defined(USE_X11)
|
|
return MouseCursorMonitorX11::CreateForScreen(options, screen);
|
|
#else
|
|
return nullptr;
|
|
#endif // defined(USE_X11)
|
|
}
|
|
|
|
// static
|
|
std::unique_ptr<MouseCursorMonitor> MouseCursorMonitor::Create(
|
|
const DesktopCaptureOptions& options) {
|
|
#if defined(USE_X11)
|
|
return MouseCursorMonitorX11::Create(options);
|
|
#else
|
|
return nullptr;
|
|
#endif // defined(USE_X11)
|
|
}
|
|
|
|
} // namespace webrtc
|