This reverts commit 9b87037073f1811bcdae30967167f30b364e6879. Reason for revert: Causing compile failures that prevent rolling into chrome. See https://ci.chromium.org/p/chromium/builders/try/cast_shell_linux/726007 https://chromium-review.googlesource.com/c/chromium/src/+/2461647 Original change's description: > Improve screen sharing with PipeWire on Wayland > > Currently, sharing a screen or a window on Wayland opens unnecessary > preview dialog on Chromium side, which is then followed by a similar > dialog on xdg-desktop-portal side. The Chromium dialog is useless on > Wayland, as it doesn't show anything. This is because Chromium doesn't > have access to screen content as in case of X11 session. To fix this, we > want to avoid showing the preview dialog in case we find that we run on > Wayland and only pick a screen or a window from the dialog that comes > from xdg-desktop-portal. > > This patch splits BaseCapturerPipeWire class, moving portal related code > into XdgPortalBase, which does all the DBus communication and which is > supposed to be reused by BaseCapturerPipeWire when the user confirms > the dialog from xdg-desktop-portal. The XdgPortalBase is extended to > support multiple calls at once, where each call is identified by Id. > > Relevant change on Chromium side will be in a different review. > > Bug: chromium:682122 > Change-Id: If8afd36da66231eb154cdc00114908ac897ee4cf > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160649 > Commit-Queue: Tommi <tommi@webrtc.org> > Reviewed-by: Tommi <tommi@webrtc.org> > Reviewed-by: Erik Språng <sprang@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32342} TBR=mbonadei@webrtc.org,jamiewalch@chromium.org,tommi@webrtc.org,sprang@webrtc.org,tomas.popela@gmail.com,grulja@gmail.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:682122 Change-Id: I41518f795e34b84374bc8208b711cfeb0a070578 No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187352 Commit-Queue: Guido Urdaneta <guidou@webrtc.org> Reviewed-by: Guido Urdaneta <guidou@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32365}
43 lines
1.3 KiB
C++
43 lines
1.3 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 <memory>
|
|
|
|
#include "modules/desktop_capture/desktop_capture_options.h"
|
|
#include "modules/desktop_capture/desktop_capturer.h"
|
|
|
|
#if defined(WEBRTC_USE_PIPEWIRE)
|
|
#include "modules/desktop_capture/linux/window_capturer_pipewire.h"
|
|
#endif // defined(WEBRTC_USE_PIPEWIRE)
|
|
|
|
#if defined(WEBRTC_USE_X11)
|
|
#include "modules/desktop_capture/linux/window_capturer_x11.h"
|
|
#endif // defined(WEBRTC_USE_X11)
|
|
|
|
namespace webrtc {
|
|
|
|
// static
|
|
std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
|
|
const DesktopCaptureOptions& options) {
|
|
#if defined(WEBRTC_USE_PIPEWIRE)
|
|
if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
|
|
return WindowCapturerPipeWire::CreateRawWindowCapturer(options);
|
|
}
|
|
#endif // defined(WEBRTC_USE_PIPEWIRE)
|
|
|
|
#if defined(WEBRTC_USE_X11)
|
|
return WindowCapturerX11::CreateRawWindowCapturer(options);
|
|
#endif // defined(WEBRTC_USE_X11)
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace webrtc
|