This reverts commit 3a285224b62b04fc84ce027b0306bcf9ef26041f. Reason for revert: Still breaking downstream projects due to not using forward headers. I will talk to Mark separately about the usage. Original change's description: > Reland "Linux capturers: organize X11 and Wayland implementations into separate folders" > > Bug: webrtc:13429 > Change-Id: I6e88de4f7ebcb64076312d83ac2c79db24f85ad8 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239841 > Commit-Queue: Mark Foltz <mfoltz@chromium.org> > Reviewed-by: Mark Foltz <mfoltz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#35481} TBR=grulja@gmail.com,mfoltz@chromium.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com Change-Id: I1f75e3d89495f2a9a31d0f4406a3efdf0d95f74a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:13429 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240064 Owners-Override: Christoffer Jansson <jansson@google.com> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Christoffer Jansson <jansson@google.com> Cr-Commit-Position: refs/heads/main@{#35484}
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/base_capturer_pipewire.h"
|
|
#endif // defined(WEBRTC_USE_PIPEWIRE)
|
|
|
|
#if defined(WEBRTC_USE_X11)
|
|
#include "modules/desktop_capture/linux/screen_capturer_x11.h"
|
|
#endif // defined(WEBRTC_USE_X11)
|
|
|
|
namespace webrtc {
|
|
|
|
// static
|
|
std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
|
|
const DesktopCaptureOptions& options) {
|
|
#if defined(WEBRTC_USE_PIPEWIRE)
|
|
if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
|
|
return BaseCapturerPipeWire::CreateRawCapturer(options);
|
|
}
|
|
#endif // defined(WEBRTC_USE_PIPEWIRE)
|
|
|
|
#if defined(WEBRTC_USE_X11)
|
|
return ScreenCapturerX11::CreateRawScreenCapturer(options);
|
|
#else
|
|
return nullptr;
|
|
#endif // defined(WEBRTC_USE_X11)
|
|
}
|
|
|
|
} // namespace webrtc
|