obs-studio/cmake/Modules
Georges Basile Stavracas Neto c2f8b2058b linux-capture: Add PipeWire-based capture
Add a new Linux capture based on PipeWire [1] and the Desktop portal [2].

This new capture starts by asking the Desktop portal for a screencapture session.
There are quite a few D-Bus calls involved in this, but the key points are:

 1. A connection to org.freedesktop.portal.ScreenCast is estabilished, and the
    available cursor modes are updated.

 2. CreateSession() is called. This is the first step of the negotiation.

 3. SelectSources() is called. This is when a system dialog pops up asking the
    user to either select a monitor (desktop capture) or a window (window capture).

 4. Start() is called. This signals the compositor that it can setup a PipeWire
    stream, and start sending buffers.

The reply to this fourth call gives OBS Studio the PipeWire fd, and the id of the
PipeWire node where the buffers are being sent to. This allows creating a consumer
PipeWire stream, and receive the buffers.

Metadata cursor is always preferred, but on the lack of it, we ask the stream for
an embedded cursor (i.e. the cursor is drawn at the buffer, and OBS Studio has no
control over it.)

Window capturing is implemented as a crop operation on the buffer. Compositors
can send big buffers, and a crop rectangle, and this is used to paint a subregion
of the buffer in the scene.

The new capture is only loaded when running on EGL, since it depends on EGL to
call gs_texture_create_from_dmabuf().

[1] https://pipewire.org/
[2] https://github.com/flatpak/xdg-desktop-portal/
2021-03-29 17:00:31 -03:00
..
CheckForPthreads.c cmake: Properly check for Threading support 2014-09-26 22:52:30 -07:00
CopyMSVCBins.cmake cmake: Fix some Qt files not being logged in CMake output 2021-03-10 20:05:50 -08:00
FindAppKit.cmake Fix AppKit find module 2014-09-15 14:42:18 -07:00
FindCXX11.cmake Include FindPackageHandleStandardArgs.cmake in every find module using it 2014-08-21 16:38:49 +02:00
FindEGL.cmake deps-glad: Add EGL 2021-02-01 19:03:14 -03:00
FindFFmpeg.cmake docs/sphinx: Fix various typos 2019-10-14 17:19:38 -07:00
FindFontconfig.cmake Fix fontconfig cmake module 2014-09-15 14:42:01 -07:00
FindFreetype.cmake cmake: Fix dependency cmake search paths 2015-07-13 14:39:03 -07:00
FindGio.cmake build: Include gio-unix-2.0 2021-03-29 17:00:31 -03:00
FindIconv.cmake cmake: Refactor growing list of library locations 2014-09-27 09:40:45 -07:00
FindJack.cmake Initial obs-studio jack support 2015-01-25 20:42:02 +01:00
FindJansson.cmake cmake: Fix dependency cmake search paths 2015-07-13 14:39:03 -07:00
FindLibcurl.cmake CI: Fix macOS 10.13 crashes due to unsupported library symbols 2020-12-19 18:48:38 -08:00
FindLibfdk.cmake cmake: Fix finding libfdk header path 2020-10-02 09:26:00 -07:00
FindLibrnnoise.cmake obs-filters: Add option to use RNNoise for noise reduction 2020-08-18 11:25:21 -07:00
FindLibspeexdsp.cmake cmake: Add module to find libspeexdsp 2016-07-25 20:17:13 -07:00
FindLibsysinfo.cmake cmake: Add module to find libsysinfo on FreeBSD 2015-05-04 22:37:17 +02:00
FindLibv4l2.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
FindLibVLC.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
FindLibx264.cmake cmake: Add FFmpeg/x264 include header path suffix 2015-08-12 04:21:26 -07:00
FindLuajit.cmake cmake: Add luajit 2.1 support to build 2018-08-18 10:38:21 -04:00
FindMbedTLS.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
FindOSS.cmake plugins: Add oss-audio plugin 2020-05-02 17:38:27 +08:00
FindPipeWire.cmake linux-capture: Add PipeWire-based capture 2021-03-29 17:00:31 -03:00
FindPythonDeps.cmake cmake: Search for Python 3.4 2018-01-21 14:27:55 +02:00
FindRSSDK.cmake cmake: Add module to find RSSDK 2016-11-19 03:04:44 -08:00
FindSndio.cmake Add sndio support (#3715) 2020-11-14 11:58:55 -08:00
FindSwigDeps.cmake CI: Update build script to use pre-built SWIG and QT dependencies 2020-07-10 01:01:32 +02:00
FindThreads.cmake cmake: Properly check for Threading support 2014-09-26 22:52:30 -07:00
FindUDev.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
FindVulkan.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
FindWayland.cmake libobs: Add a Wayland platform 2021-02-09 09:39:04 -03:00
FindX11_XCB.cmake Move from libX11/GLX to XCB/libX11/GLX. 2014-12-19 19:23:08 -08:00
FindXCB.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
FindZLIB.cmake cmake: Fix warnings and normalize variables/errors 2020-05-21 18:45:16 -07:00
IDLFileHelper.cmake cmake: Add macro to compile .tlb files via midl 2016-11-19 03:04:45 -08:00
ObsCpack.cmake Display license in MSI installer 2016-09-28 12:06:35 -04:00
ObsHelpers.cmake cmake: Add function for installing data from abs path 2020-09-06 17:46:03 -07:00
WIX.template.in Move CPack win32 generator from NSIS to WIX 2014-02-02 22:38:21 +01:00