mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00

It doesn't really make sense to try to create the X11 capturer if we are running under Wayland; nor does it make sense to create the PipeWire capturer if we are going to fail to actually start a stream with it. This change addresses both of these issues by exposing an IsSupported method on BaseCapturerPipeWire and checking that we are not running under Wayland before creating the X11 capturer. Bug: chromium:1374436 Change-Id: Ieb291307376010e084824124ea8fde065545337c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279163 Auto-Submit: Alexander Cooper <alcooper@chromium.org> Reviewed-by: Mark Foltz <mfoltz@chromium.org> Commit-Queue: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/main@{#38474}
23 lines
886 B
C++
23 lines
886 B
C++
/*
|
|
* Copyright 2022 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.
|
|
*/
|
|
|
|
#ifndef MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_PIPEWIRE_UTILS_H_
|
|
#define MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_PIPEWIRE_UTILS_H_
|
|
|
|
namespace webrtc {
|
|
|
|
// Prepare PipeWire so that it is ready to be used. If it needs to be dlopen'd
|
|
// this will do so. Note that this does not guarantee a PipeWire server is
|
|
// running nor does it establish a connection to one.
|
|
bool InitializePipeWire();
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // MODULES_DESKTOP_CAPTURE_LINUX_WAYLAND_PIPEWIRE_UTILS_H_
|