Table of Contents#
Overview#
LizardByte has the full documentation hosted on Read the Docs.
About#
Sunshine is a self-hosted game stream host for Moonlight. Offering low latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from the local server or any mobile device.
System Requirements#
Warning
This table is a work in progress. Do not purchase hardware based on this.
Minimum Requirements
GPU |
AMD: VCE 1.0 or higher, see: obs-amd hardware support |
Intel: VAAPI-compatible, see: VAAPI hardware support |
|
Nvidia: NVENC enabled cards, see: nvenc support matrix |
|
CPU |
AMD: Ryzen 3 or higher |
Intel: Core i3 or higher |
|
RAM |
4GB or more |
OS |
Windows: 10+ (Windows Server does not support virtual gamepads) |
macOS: 12+ |
|
Linux/Debian: 11 (bullseye) |
|
Linux/Fedora: 38+ |
|
Linux/Ubuntu: 22.04+ (jammy) |
|
Network |
Host: 5GHz, 802.11ac |
Client: 5GHz, 802.11ac |
4k Suggestions
GPU |
AMD: Video Coding Engine 3.1 or higher |
Intel: HD Graphics 510 or higher |
|
Nvidia: GeForce GTX 1080 or higher |
|
CPU |
AMD: Ryzen 5 or higher |
Intel: Core i5 or higher |
|
Network |
Host: CAT5e ethernet or better |
Client: CAT5e ethernet or better |
HDR Suggestions
GPU |
AMD: Video Coding Engine 3.4 or higher |
Intel: UHD Graphics 730 or higher |
|
Nvidia: Pascal-based GPU (GTX 10-series) or higher |
|
CPU |
AMD: todo |
Intel: todo |
|
Network |
Host: CAT5e ethernet or better |
Client: CAT5e ethernet or better |
Integrations#
Support#
Our support methods are listed in our LizardByte Docs.
Downloads#
Stats#
Setup#
The recommended method for running Sunshine is to use the binaries bundled with the latest release.
Binaries#
Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows. Binaries can be found in the latest release.
Tip
Some third party packages also exist. See Third Party Packages. No support will be provided for third party packages!
Install#
Warning
The Docker images are not recommended for most users. No support will be provided!
Docker images are available on Dockerhub.io and ghcr.io.
See Docker for additional information.
CUDA Compatibility
CUDA is used for NVFBC capture.
Tip
See CUDA GPUS to cross reference Compute Capability to your GPU.
Package |
CUDA Version |
Min Driver |
CUDA Compute Capabilities |
---|---|---|---|
sunshine.AppImage |
11.8.0 |
450.80.02 |
35;50;52;60;61;62;70;75;80;86;90 |
sunshine.pkg.tar.zst |
11.8.0 |
450.80.02 |
35;50;52;60;61;62;70;75;80;86;90 |
sunshine_{arch}.flatpak |
12.0.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-debian-bookworm-{arch}.deb |
12.0.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-debian-bullseye-{arch}.deb |
11.8.0 |
450.80.02 |
35;50;52;60;61;62;70;75;80;86;90 |
sunshine-fedora-38-{arch}.rpm |
12.4.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-fedora-39-{arch}.rpm |
12.4.0 |
525.60.13 |
50;52;60;61;62;70;75;80;86;90 |
sunshine-ubuntu-22.04-{arch}.deb |
11.8.0 |
450.80.02 |
35;50;52;60;61;62;70;75;80;86;90 |
sunshine-ubuntu-24.04-{arch}.deb |
11.8.0 |
450.80.02 |
35;50;52;60;61;62;70;75;80;86;90 |
Caution
Use distro-specific packages instead of the AppImage if they are available.
According to AppImageLint the supported distro matrix of the AppImage is below.
✔ Debian bullseye
✔ Debian bookworm
✔ Debian trixie
✖ Debian sid
✔ Ubuntu mantic
✔ Ubuntu lunar
✔ Ubuntu jammy
✔ Ubuntu focal
✖ Ubuntu bionic
✖ Ubuntu xenial
✖ Ubuntu trusty
✖ CentOS 7
Download
sunshine.AppImage
to your home directory.cd ~ wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.AppImage
Open terminal and run the following code.
./sunshine.AppImage --install
- Start:
./sunshine.AppImage --install && ./sunshine.AppImage
- Uninstall:
./sunshine.AppImage --remove
Open terminal and run the following code.
wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst pacman -U --noconfirm sunshine.pkg.tar.zst
- Uninstall:
pacman -R sunshine
Download
sunshine-{distro}-{distro-version}-{arch}.deb
and run the following code.sudo apt install -f ./sunshine-{distro}-{distro-version}-{arch}.deb
Note
The
{distro-version}
is the version of the distro we built the package on. The{arch}
is the architecture of your operating system.Tip
You can double click the deb file to see details about the package and begin installation.
- Uninstall:
sudo apt remove sunshine
Caution
Use distro-specific packages instead of the Flatpak if they are available.
Important
The instructions provided here are for the version supplied in the latest release, which does not necessarily match the version in the Flathub repository!
Install Flatpak as required.
Download
sunshine_{arch}.flatpak
and run the following code.Note
Be sure to replace
{arch}
with the architecture for your operating system.- System level (recommended)
flatpak install --system ./sunshine_{arch}.flatpak
- User level
flatpak install --user ./sunshine_{arch}.flatpak
- Additional installation (required)
flatpak run --command=additional-install.sh dev.lizardbyte.sunshine
- Start:
- X11 and NVFBC capture (X11 Only)
flatpak run dev.lizardbyte.sunshine
- KMS capture (Wayland & X11)
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') \ flatpak run dev.lizardbyte.sunshine
- Uninstall:
flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine flatpak uninstall --delete-data dev.lizardbyte.sunshine
Add rpmfusion repositories by running the following code.
sudo dnf install \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Download
sunshine-{distro}-{distro-version}-{arch}.rpm
and run the following code.sudo dnf install ./sunshine-{distro}-{distro-version}-{arch}.rpm
Note
The
{distro-version}
is the version of the distro we built the package on. The{arch}
is the architecture of your operating system.Tip
You can double click the rpm file to see details about the package and begin installation.
- Uninstall:
sudo dnf remove sunshine
The deb, rpm, zst, Flatpak and AppImage packages should handle these steps automatically. Third party packages may not.
Sunshine needs access to uinput to create mouse and gamepad events.
- Create and reload udev rules for uinput.
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \ sudo tee /etc/udev/rules.d/60-sunshine.rules sudo udevadm control --reload-rules sudo udevadm trigger sudo modprobe uinput
- Enable permissions for KMS capture.
Warning
Capture of most Wayland-based desktop environments will fail unless this step is performed.
Note
cap_sys_admin
may as well be root, except you don’t need to be root to run it. It is necessary to allow Sunshine to use KMS capture.- Enable
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
- Disable (for Xorg/X11 only)
sudo setcap -r $(readlink -f $(which sunshine))
Optionally, configure autostart service
filename:
~/.config/systemd/user/sunshine.service
- contents:
[Unit] Description=Sunshine self-hosted game stream host for Moonlight. StartLimitIntervalSec=500 StartLimitBurst=5 [Service] ExecStart=<see table> Restart=on-failure RestartSec=5s #Flatpak Only #ExecStop=flatpak kill dev.lizardbyte.sunshine [Install] WantedBy=graphical-session.target
package
ExecStart
Auto Configured
aur
/usr/bin/sunshine
✔
deb
/usr/bin/sunshine
✔
rpm
/usr/bin/sunshine
✔
AppImage
~/sunshine.AppImage
✔
Flatpak
flatpak run dev.lizardbyte.sunshine
✔
- Start once
systemctl --user start sunshine
- Start on boot
systemctl --user enable sunshine
- Reboot
sudo reboot now
Important
Sunshine on macOS is experimental. Gamepads do not work.
Install Homebrew
Update the Homebrew sources and install Sunshine.
brew tap LizardByte/homebrew brew install sunshine
Install MacPorts
Update the Macports sources.
sudo nano /opt/local/etc/macports/sources.conf
- Add this line, replacing your username, below the line that starts with
rsync
. file:///Users/<username>/ports
Ctrl+x
, thenY
to exit and save changes.- Add this line, replacing your username, below the line that starts with
Download and install by running the following code.
mkdir -p ~/ports/multimedia/sunshine cd ~/ports/multimedia/sunshine curl -OL https://github.com/LizardByte/Sunshine/releases/latest/download/Portfile cd ~/ports portindex sudo port install sunshine
The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone.
Optionally, install service
sudo port load Sunshine
- Uninstall:
sudo port uninstall sunshine
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use Soundflower or BlackHole.
Note
Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key.
Caution
Gamepads are not currently supported.
Download and install
sunshine-windows-installer.exe
Attention
You should carefully select or unselect the options you want to install. Do not blindly install or enable features.
To uninstall, find Sunshine in the list here and select “Uninstall” from the overflow menu. Different versions of Windows may provide slightly different steps for uninstall.
Warning
By using this package instead of the installer, performance will be reduced. This package is not recommended for most users. No support will be provided!
Download and extract
sunshine-windows-portable.zip
Open command prompt as administrator
Firewall rules
- Install:
cd /d {path to extracted directory} scripts/add-firewall-rule.bat
- Uninstall:
cd /d {path to extracted directory} scripts/delete-firewall-rule.bat
Virtual Gamepad Support
- Install:
cd /d {path to extracted directory} scripts/install-gamepad.bat
- Uninstall:
cd /d {path to extracted directory} scripts/uninstall-gamepad.bat
Windows service
- Install:
cd /d {path to extracted directory} scripts/install-service.bat scripts/autostart-service.bat
- Uninstall:
cd /d {path to extracted directory} scripts/uninstall-service.bat
To uninstall, delete the extracted directory which contains the sunshine.exe
file.
Usage#
If Sunshine is not installed/running as a service, then start sunshine with the following command, unless a start command is listed in the specified package install instructions above.
Note
A service is a process that runs in the background. This is the default when installing Sunshine from the Windows installer. Running multiple instances of Sunshine is not advised.
- Basic usage
sunshine
- Specify config file
sunshine <directory of conf file>/sunshine.conf
Note
You do not need to specify a config file. If no config file is entered the default location will be used.
Attention
The configuration file specified will be created if it doesn’t exist.
- Start Sunshine over SSH (Linux/X11)
Assuming you are already logged into the host, you can use this command
ssh <user>@<ip_address> 'export DISPLAY=:0; sunshine'
If you are logged into the host with only a tty (teletypewriter), you can use
startx
to start the X server prior to executing sunshine. You nay need to addsleep
betweenstartx
andsunshine
to allow more time for the display to be ready.ssh <user>@<ip_address> 'startx &; export DISPLAY=:0; sunshine'
Tip
You could also utilize the
~/.bash_profile
or~/.bashrc
files to setup theDISPLAY
variable.See also
See Remote SSH Headless Setup on how to setup a headless streaming server without autologin and dummy plugs (X11 + NVidia GPUs)
Configure Sunshine in the web ui
The web ui is available on https://localhost:47990 by default. You may replace localhost with your internal ip address.
Attention
Ignore any warning given by your browser about “insecure website”. This is due to the SSL certificate being self signed.
Caution
If running for the first time, make sure to note the username and password that you created.
Add games and applications.
Adjust any configuration settings as needed.
In Moonlight, you may need to add the PC manually.
When Moonlight requests for you insert the pin:
Login to the web ui
Go to “PIN” in the Navbar
Type in your PIN and press Enter, you should get a Success Message
In Moonlight, select one of the Applications listed
Network#
The Sunshine user interface will be available on port 47990 by default.
Warning
Exposing ports to the internet can be dangerous. Do this at your own risk.
Arguments#
To get a list of available arguments run the following:
sunshine --help
./sunshine.AppImage --help
flatpak run --command=sunshine dev.lizardbyte.Sunshine --help
Shortcuts#
All shortcuts start with CTRL + ALT + SHIFT
, just like Moonlight
CTRL + ALT + SHIFT + N
- Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight)CTRL + ALT + SHIFT + F1/F12
- Switch to different monitor for Streaming
Application List#
Applications should be configured via the web UI.
A basic understanding of working directories and commands is required.
You can use Environment variables in place of values
$(HOME)
will be replaced by the value of$HOME
$$
will be replaced by$
, e.g.$$(HOME)
will be become$(HOME)
env
- Adds or overwrites Environment variables for the commands/applications run by Sunshine"Variable name":"Variable value"
apps
- The list of applicationsAdvanced users may want to edit the application list manually. The format is
json
.- Example
json
application: { "cmd": "command to open app", "detached": [ "some-command", "another-command" ], "image-path": "/full-path/to/png-image", "name": "An App", "output": "/full-path/to/command-log-file", "prep-cmd": [ { "do": "some-command", "undo": "undo-that-command" } ], "working-dir": "/full-path/to/working-directory" }
cmd
- The main applicationdetached
- A list of commands to be run and forgotten aboutIf not specified, a process is started that sleeps indefinitely
image-path
- The full path to the cover art image to use.name
- The name of the application/gameoutput
- The file where the output of the command is storedauto-detach
- Specifies whether the app should be treated as detached if it exits quicklywait-all
- Specifies whether to wait for all processes to terminate rather than just the initial processexit-timeout
- Specifies how long to wait in seconds for the process to gracefully exit (default: 5 seconds)prep-cmd
- A list of commands to be run before/after the applicationIf any of the prep-commands fail, starting the application is aborted
do
- Run before the applicationIf it fails, all
undo
commands of the previously succeededdo
commands are run
undo
- Run after the application has terminatedFailures of
undo
commands are ignored
working-dir
- The working directory to use. If not specified, Sunshine will use the application directory.
- Example
For more examples see app examples.
Considerations#
On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display. If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games on that display.
When an application is started, if there is an application already running, it will be terminated.
When the application has been shutdown, the stream shuts down as well.
For example, if you attempt to run
steam
as acmd
instead ofdetached
the stream will immediately fail. This is due to the method in which the steam process is executed. Other applications may behave similarly.This does not apply to
detached
applications.
The “Desktop” app works the same as any other application except it has no commands. It does not start an application, instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with the name “Desktop” and “desktop.png” as the image path.
For the Linux flatpak you must prepend commands with
flatpak-spawn --host
.
HDR Support#
Streaming HDR content is officially supported on Windows hosts and experimentally supported for Linux hosts.
General HDR support information and requirements:
HDR must be activated in the host OS, which may require an HDR-capable display or EDID emulator dongle connected to your host PC.
You must also enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR (and probably overexposed if your host is HDR).
A good HDR experience relies on proper HDR display calibration both in the OS and in game. HDR calibration can differ significantly between client and host displays.
You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client’s display.
Some GPUs video encoders can produce lower image quality or encoding performance when streaming in HDR compared to SDR.
Additional information:
HDR streaming is supported for Intel, AMD, and NVIDIA GPUs that support encoding HEVC Main 10 or AV1 10-bit profiles.
We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming.
Older games that use NVIDIA-specific NVAPI HDR rather than native Windows HDR support may not display properly in HDR.
HDR streaming is supported for Intel and AMD GPUs that support encoding HEVC Main 10 or AV1 10-bit profiles using VAAPI.
The KMS capture backend is required for HDR capture. Other capture methods, like NvFBC or X11, do not support HDR.
You will need a desktop environment with a compositor that supports HDR rendering, such as Gamescope or KDE Plasma 6.
Tutorials and Guides#
Tutorial videos are available here.
Guides are available here.
Community!
Tutorials and Guides are community generated. Want to contribute? Reach out to us on our discord server.
Docker#
Important note#
Starting with v0.18.0, tag names have changed. You may no longer use latest
, master
, vX.X.X
.
Build your own containers#
This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not intended to use as a standalone container at this point, and should be considered experimental.
ARG SUNSHINE_VERSION=latest
ARG SUNSHINE_OS=ubuntu-22.04
FROM lizardbyte/sunshine:${SUNSHINE_VERSION}-${SUNSHINE_OS}
# install Steam, Wayland, etc.
ENTRYPOINT steam && sunshine
SUNSHINE_VERSION#
latest
,master
,vX.X.X
nightly
commit hash
SUNSHINE_OS#
Sunshine images are available with the following tag suffixes, based on their respective base images.
archlinux
debian-bullseye
fedora-36
fedora-37
ubuntu-20.04
ubuntu-22.04
Where used#
This is a list of docker projects using Sunshine. Something missing? Let us know about it!
Port and Volume mappings#
Examples are below of the required mappings. The configuration file will be saved to /config
in the container.
Using docker run#
Create and run the container (substitute your <values>
):
docker run -d \
--device /dev/dri/ \
--name=<image_name> \
--restart=unless-stopped \
-e PUID=<uid> \
-e PGID=<gid> \
-e TZ=<timezone> \
-v <path to data>:/config \
-p 47984-47990:47984-47990/tcp \
-p 48010:48010 \
-p 47998-48000:47998-48000/udp \
<image>
Using docker-compose#
Create a docker-compose.yml
file with the following contents (substitute your <values>
):
version: '3'
services:
<image_name>:
image: <image>
container_name: sunshine
restart: unless-stopped
volumes:
- <path to data>:/config
environment:
- PUID=<uid>
- PGID=<gid>
- TZ=<timezone>
ports:
- "47984-47990:47984-47990/tcp"
- "48010:48010"
- "47998-48000:47998-48000/udp"
Using podman run#
Create and run the container (substitute your <values>
):
podman run -d \
--device /dev/dri/ \
--name=<image_name> \
--restart=unless-stopped \
--userns=keep-id \
-e PUID=<uid> \
-e PGID=<gid> \
-e TZ=<timezone> \
-v <path to data>:/config \
-p 47984-47990:47984-47990/tcp \
-p 48010:48010 \
-p 47998-48000:47998-48000/udp \
<image>
Parameters#
You must substitute the <values>
with your own settings.
Parameters are split into two halves separated by a colon. The left side represents the host and the right side the container.
Example: -p external:internal
- This shows the port mapping from internal to external of the container.
Therefore -p 47990:47990
would expose port 47990
from inside the container to be accessible from the host’s IP on
port 47990
(e.g. http://<host_ip>:47990
). The internal port must be 47990
, but the external port may be changed
(e.g. -p 8080:47990
). All the ports listed in the docker run
and docker-compose
examples are required.
Parameter |
Function |
Example Value |
Required |
---|---|---|---|
|
Web UI Port |
|
True |
|
Volume mapping |
|
True |
|
User ID |
|
False |
|
Group ID |
|
False |
|
Lookup TZ value |
|
False |
User / Group Identifiers:#
When using data volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this issue you can specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify.
In this instance PUID=1001
and PGID=1001
. To find yours use id user as below:
$ id dockeruser
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image.
Supported Architectures#
Specifying lizardbyte/sunshine:latest-<SUNSHINE_OS>
or ghcr.io/lizardbyte/sunshine:latest-<SUNSHINE_OS>
should
retrieve the correct image for your architecture.
The architectures supported by these images are shown in the table below.
tag suffix |
amd64/x86_64 |
arm64/aarch64 |
---|---|---|
archlinux |
✅ |
❌ |
debian-bookworm |
✅ |
✅ |
debian-bullseye |
✅ |
✅ |
fedora-38 |
✅ |
✅ |
fedora-39 |
✅ |
✅ |
ubuntu-20.04 |
✅ |
✅ |
ubuntu-22.04 |
✅ |
✅ |
Third Party Packages#
Danger
These packages are not maintained by LizardByte. Use at your own risk.
AUR#
Chocolatey#
nixpkgs#
Scoop#
Solus#
Guides#
Collection of guides written by the community!
App Examples#
Since not all applications behave the same, we decided to create some examples to help you get started adding games and applications to Sunshine.
Attention
Throughout these examples, any fields not shown are left blank. You can enhance your experience by
adding an image or a log file (via the Output
field).
Note
When a working directory is not specified, it defaults to the folder where the target application resides.
Common Examples#
Desktop#
Field |
Value |
Application Name |
|
Image |
|
Steam Big Picture#
Note
Steam is launched as a detached command because Steam starts with a process that self updates itself and the original process is killed.
Application Name |
|
Detached Commands |
|
Image |
|
Application Name |
|
Detached Commands |
|
Image |
|
Application Name |
|
Command |
|
Image |
|
Epic Game Store game#
Note
Using URI method will be the most consistent between various games.
URI (Epic)#
Application Name |
|
Command |
|
Binary (Epic w/ working directory)#
Application Name |
|
Command |
|
Working Directory |
|
Binary (Epic w/o working directory)#
Application Name |
|
Command |
|
Steam game#
Note
Using URI method will be the most consistent between various games.
URI (Steam)#
Application Name |
|
Detached Commands |
|
Application Name |
|
Detached Commands |
|
Application Name |
|
Command |
|
Binary (Steam w/ working directory)#
Application Name |
|
Command |
|
Working Directory |
|
Application Name |
|
Command |
|
Working Directory |
|
Application Name |
|
Command |
|
Working Directory |
|
Binary (Steam w/o working directory)#
Application Name |
|
Command |
|
Application Name |
|
Command |
|
Application Name |
|
Command |
|
Prep Commands#
Changing Resolution and Refresh Rate#
Command Preparations |
Do: |
Undo: |
Hint
The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions.
- You can update the
Do
command to this: bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
- The
set-custom-res.sh
will have this content: #!/bin/bash # Get params and set any defaults width=${1:-1920} height=${2:-1080} refresh_rate=${3:-60} # You may need to adjust the scaling differently so the UI/text isn't too small / big scale=${4:-0.55} # Get the name of the active display display_output=$(xrandr | grep " connected" | awk '{ print $1 }') # Get the modeline info from the 2nd row in the cvt output modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2') xrandr_mode_str=${modeline//Modeline \"*\" /} mode_alias="${width}x${height}" echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}" xrandr --newmode ${mode_alias} ${xrandr_mode_str} xrandr --addmode ${display_output} ${mode_alias} # Reset scaling xrandr --output ${display_output} --scale 1 # Apply new xrandr mode xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale} # Optional reset your wallpaper to fit to new resolution # xwallpaper --zoom /path/to/wallpaper.png
Command Preparations |
Do: |
Undo: |
Command Preparations |
Do: |
Undo: |
Command Preparations |
Do: |
Undo: |
- The
set-custom-res.sh
will have this content: #!/bin/bash # Get params and set any defaults width=${1:-1920} height=${2:-1080} output=${3:-HDMI-1} nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }"
Note
This example uses the displayplacer tool to change the resolution. This tool can be installed following instructions in their GitHub repository.
Command Preparations |
Do: |
Undo: |
Note
This example uses the QRes tool to change the resolution and refresh rate. This tool can be downloaded from their SourceForge repository.
Command Preparations |
Do: |
Undo: |
Additional Considerations#
Attention
Because Flatpak packages run in a sandboxed environment and do not normally have access to the
host, the Flatpak of Sunshine requires commands to be prefixed with flatpak-spawn --host
.
Elevating Commands (Windows)
If you’ve installed Sunshine as a service (default), you can specify if a command should be elevated with administrative privileges. Simply enable the elevated option in the WEB UI, or add it to the JSON configuration. This is an option for both prep-cmd and regular commands and will launch the process with the current user without a UAC prompt.
Note
It is important to write the values “true” and “false” as string values, not as the typical true/false values in most JSON.
- Example
{ "name": "Game With AntiCheat that Requires Admin", "output": "", "cmd": "ping 127.0.0.1", "exclude-global-prep-cmd": "false", "elevated": "true", "prep-cmd": [ { "do": "powershell.exe -command \"Start-Streaming\"", "undo": "powershell.exe -command \"Stop-Streaming\"", "elevated": "false" } ], "image-path": "" }
Linux#
Collection of Sunshine Linux host guides.
How to not stream Discord call audio#
Set your normal Sound Output volume to 100%
Start Sunshine
Set Sound Output to sink-sunshine-stereo (if it isn’t automatic)
In Discord - Right Click - Deafen - Select your normal Output Device
This is also where you will need to adjust output volume for Discord calls
Open qpwgraph
Connect sunshine [sunshine-record] to your normal Output Device
Drag monitor_FL to playback_FL
Drag monitor_FR to playback_FR
Remote SSH Headless Setup#
This is a guide to setup remote SSH into host to startup X server and sunshine without physical login and dummy plug. The virtual display is accelerated by the NVidia GPU using the TwinView configuration.
Attention
This guide is specific for Xorg and NVidia GPUs. I start the X server using the startx
command.
I also only tested this on an Artix runit init system on LAN.
I didn’t have to do anything special with pulseaudio (pipewire untested).
Keep your monitors plugged in until the Checkpoint step
Tip
Prior to editing any system configurations, you should make a copy of the original file. This will allow you to use it for reference or revert your changes easily.
The Big Picture#
Once you are done, you will need to perform these 3 steps:
Turn on the host machine
Start sunshine on remote host with a script that:
Edits permissions of
/dev/uinput
(added sudo config to execute script with no password prompt)Starts X server with
startx
on virtual displayStarts
Sunshine
Startup Moonlight on the client of interest and connect to host
Hint
As an alternative to SSH…
Step 2 can be replaced with autologin and starting sunshine as a service or putting
sunshine &
in your .xinitrc
file if you start your X server with startx
.
In this case, the workaround for /dev/uinput
permissions is not needed because the udev rule would be triggered
for “physical” login. See Linux Setup. I personally think autologin compromises the
security of the PC, so I went with the remote SSH route. I use the PC more than for gaming, so I don’t need a
virtual display everytime I turn on the PC (E.g running updates, config changes, file/media server).
First we will setup the host and then the SSH Client (Which may not be the same as the machine running the moonlight client)
Host Setup#
We will be setting up:
Static IP Setup#
Setup static IP Address for host. For LAN connections you can use DHCP reservation within your assigned range. e.g. 192.168.x.x. This will allow you to ssh to the host consistently, so the assigned IP address does not change. It is preferred to set this through your router config.
SSH Server Setup#
Note
Most distros have OpenSSH already installed. If it is not present, install OpenSSH using your package manager.
sudo apt update
sudo apt install openssh-server
sudo pacman -S openssh
# Install openssh-<other_init> if you are not using SystemD
# e.g. sudo pacman -S openssh-runit
sudo apk update
sudo apk add openssh
- CentOS/RHEL 7
sudo yum install openssh-server
- CentOS/Fedora/RHEL 8
sudo dnf install openssh-server
Next make sure the OpenSSH daemon is enabled to run when the system starts.
sudo systemctl enable sshd.service
sudo systemctl start sshd.service # Starts the service now
sudo systemctl status sshd.service # See if the service is running
sudo ln -s /etc/runit/sv/sshd /run/runit/service # Enables the OpenSSH daemon to run when system starts
sudo sv start sshd # Starts the service now
sudo sv status sshd # See if the service is running
rc-update add sshd # Enables service
rc-status # List services to verify sshd is enabled
rc-service sshd start # Starts the service now
Disabling PAM in sshd
I noticed when the ssh session is disconnected for any reason, pulseaudio
would disconnect.
This is due to PAM handling sessions. When running dmesg
, I noticed elogind
would say removed user session.
In this Gentoo Forums post,
someone had a similar issue. Starting the X server in the background and exiting out of the console would cause your
session to be removed.
Caution
According to this article disabling PAM increases security, but reduces certain functionality in terms of session handling. Do so at your own risk!
Edit the sshd_config
file with the following to disable PAM.
usePAM no
After making changes to the sshd_config
, restart the sshd service for changes to take effect.
Tip
Run the command to check the ssh configuration prior to restarting the sshd service.
sudo sshd -t -f /etc/ssh/sshd_config
An incorrect configuration will prevent the sshd service from starting, which might mean losing SSH access to the server.
sudo systemctl restart sshd.service
sudo sv restart sshd
sudo rc-service sshd restart
Virtual Display Setup#
As an alternative to a dummy dongle, you can use this config to create a virtual display.
Important
This is only available for NVidia GPUs using Xorg.
Hint
Use xrandr
to see name of your active display output. Usually it starts with DP
or HDMI
. For me, it is DP-0
.
Put this name for the ConnectedMonitor
option under the Device
section.
xrandr | grep " connected" | awk '{ print $1 }'
Section "ServerLayout"
Identifier "TwinLayout"
Screen 0 "metaScreen" 0 0
EndSection
Section "Monitor"
Identifier "Monitor0"
Option "Enable" "true"
EndSection
Section "Device"
Identifier "Card0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "MetaModes" "1920x1080"
Option "ConnectedMonitor" "DP-0"
Option "ModeValidation" "NoDFPNativeResolutionCheck,NoVirtualSizeCheck,NoMaxPClkCheck,NoHorizSyncCheck,NoVertRefreshCheck,NoWidthAlignmentCheck"
EndSection
Section "Screen"
Identifier "metaScreen"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "True"
SubSection "Display"
Modes "1920x1080"
EndSubSection
EndSection
Note
The ConnectedMonitor
tricks the GPU into thinking a monitor is connected,
even if there is none actually connected! This allows a virtual display to be created that is accelerated with
your GPU! The ModeValidation
option disables valid resolution checks, so you can choose any
resolution on the host!
References
Uinput Permissions Workaround#
Steps
We can use chown
to change the permissions from a script. Since this requires sudo
,
we will need to update the sudo configuration to execute this without being prompted for a password.
Create a
sunshine-setup.sh
script to update permissions on/dev/uinput
. Since we aren’t logged into the host, the udev rule doesn’t apply.Update user sudo configuration
/etc/sudoers.d/<user>
to allow thesunshine-setup.sh
script to be executed withsudo
.
Note
After I setup the udev rule to get access to /dev/uinput
,
I noticed when I sshed into the host without physical login, the ACL permissions on /dev/uinput
were not changed.
So I asked reddit.
I discovered that SSH sessions are not the same as a physical login.
I suppose it’s not possible for SSH to trigger a udev rule or create a physical login session.
Setup Script
This script will take care of any preconditions prior to starting up sunshine.
- Run the following to create a script named something like
sunshine-setup.sh
: echo "chown $(id -un):$(id -gn) /dev/uinput" > sunshine-setup.sh &&\ chmod +x sunshine-setup.sh
(Optional) To Ensure ethernet is being used for streaming,
you can block WiFi with rfkill
.
- Run this command to append the rfkill block command to the script:
echo "rfkill block $(rfkill list | grep "Wireless LAN" \ | sed 's/^\([[:digit:]]\).*/\1/')" >> sunshine-setup.sh
Sudo Configuration
We will manually change the permissions of /dev/uinput
using chown
.
You need to use sudo
to make this change, so add/update the entry in /etc/sudoers.d/${USER}
Danger
Do so at your own risk! It is more secure to give sudo and no password prompt to a single script, than a generic executable like chown.
Warning
Be very careful of messing this config up. If you make a typo, YOU LOSE THE ABILITY TO USE SUDO.
Fortunately, your system is not borked, you will need to login as root to fix the config.
You may want to setup a backup user / SSH into the host as root to fix the config if this happens.
Otherwise you will need to plug your machine back into a monitor and login as root to fix this.
To enable root login over SSH edit your SSHD config, and add PermitRootLogin yes
, and restart the SSH server.
First make a backup of your
/etc/sudoers.d/${USER}
file.sudo cp /etc/sudoers.d/${USER} /etc/sudoers.d/${USER}.backup
cd
to the parent dir of thesunshine-setup.sh
script.Execute the following to update your sudoer config file.
echo "${USER} ALL=(ALL:ALL) ALL, NOPASSWD: $(pwd)/sunshine-setup.sh" \ | sudo tee /etc/sudoers.d/${USER}
These changes allow the script to use sudo without being prompted with a password.
e.g. sudo $(pwd)/sunshine-setup.sh
Stream Launcher Script#
This is the main entrypoint script that will run the sunshine-setup.sh
script, start up X server, and Sunshine.
The client will call this script that runs on the host via ssh.
Sunshine Startup Script
This guide will refer to this script as ~/scripts/sunshine.sh
.
The setup script will be referred as ~/scripts/sunshine-setup.sh
#!/bin/bash
export DISPLAY=:0
# Check existing X server
ps -e | grep X >/dev/null
[[ ${?} -ne 0 ]] && {
echo "Starting X server"
startx &>/dev/null &
[[ ${?} -eq 0 ]] && {
echo "X server started successfully"
} || echo "X server failed to start"
} || echo "X server already running"
# Check if sunshine is already running
ps -e | grep -e .*sunshine$ >/dev/null
[[ ${?} -ne 0 ]] && {
sudo ~/scripts/sunshine-setup.sh
echo "Starting Sunshine!"
sunshine > /dev/null &
[[ ${?} -eq 0 ]] && {
echo "Sunshine started successfully"
} || echo "Sunshine failed to start"
} || echo "Sunshine is already running"
# Add any other Programs that you want to startup automatically
# e.g.
# steam &> /dev/null &
# firefox &> /dev/null &
# kdeconnect-app &> /dev/null &
SSH Client Setup#
We will be setting up:
SSH Key Authentication Setup#
Setup your SSH keys with
ssh-keygen
and usessh-copy-id
to authorize remote login to your host. Runssh <user>@<ip_address>
to login to your host. SSH keys automate login so you don’t need to input your password!Optionally setup a
~/.ssh/config
file to simplify thessh
commandHost <some_alias> Hostname <ip_address> User <username> IdentityFile ~/.ssh/<your_private_key>
Now you can use
ssh <some_alias>
.ssh <some_alias> <commands/script>
will execute the command or script on the remote host.
Checkpoint#
As a sanity check, let’s make sure your setup is working so far!
Test Steps
With your monitor still plugged into your Sunshine host PC:
ssh <alias>
~/scripts/sunshine.sh
nvidia-smi
You should see the sunshine and Xorg processing running:
nvidia-smi
Output:
+---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce RTX 3070 Off | 00000000:01:00.0 On | N/A | | 30% 46C P2 45W / 220W | 549MiB / 8192MiB | 2% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+ +---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1393 G /usr/lib/Xorg 86MiB | | 0 N/A N/A 1440 C+G sunshine 293MiB | +---------------------------------------------------------------------------------------+
Check
/dev/uinput
permissionsls -l /dev/uinput
Output:
crw------- 1 <user> <primary_group> 10, 223 Aug 29 17:31 /dev/uinput
Connect to Sunshine host from a moonlight client
Now kill X and sunshine by running pkill X
on the host,
unplug your monitors from your GPU, and repeat steps 1 - 5.
You should get the same result.
With this setup you don’t need to modify the Xorg config regardless if monitors are plugged in or not.
pkill X
SSH Client Script (Optional)#
At this point you have a working setup! For convenience I created this bash script to automate the
startup of the X server and Sunshine on the host.
This can be run on Unix systems, or on Windows using the git-bash
or any bash shell.
For Android/iOS you can install Linux emulators, e.g. Userland
for Android and ISH
for iOS.
The neat part is that you can execute one script to launch Sunshine from your phone or tablet!
#!/bin/bash
ssh_args="<user>@192.168.X.X" # Or use alias set in ~/.ssh/config
check_ssh(){
result=1
# Note this checks infinitely, you could update this to have a max # of retries
while [[ $result -ne 0 ]]
do
echo "checking host..."
ssh $ssh_args "exit 0" 2>/dev/null
result=$?
[[ $result -ne 0 ]] && {
echo "Failed to ssh to $ssh_args, with exit code $result"
}
sleep 3
done
echo "Host is ready for streaming!"
}
start_stream(){
echo "Starting sunshine server on host..."
echo "Start moonlight on your client of choice"
# -f runs ssh in the background
ssh -f $ssh_args "~/scripts/sunshine.sh &"
}
check_ssh
start_stream
exit_code=${?}
sleep 3
exit ${exit_code}
Next Steps#
Congrats you can now stream your desktop headless! When trying this the first time, keep your monitors close by incase something isn’t working right.
If you have any feedback and any suggestions, feel free to make a post on Discord!
See also
Now that you have a virtual display, you may want to automate changing the resolution and refresh rate prior to connecting to an app. See Changing Resolution and Refresh Rate for more information.
Advanced Usage#
Sunshine will work with the default settings for most users. In some cases you may want to configure Sunshine further.
Performance Tips#
In Windows, enabling Enhanced Sync in AMD’s settings may help reduce the latency by an additional frame. This applies to amfenc and libx264.
Enabling Fast Sync in Nvidia settings may help reduce latency.
Configuration#
The default location for the configuration file is listed below. You can use another location if you choose, by passing in the full configuration file path as the first argument when you start Sunshine.
The default location of the apps.json
is the same as the configuration file. You can use a custom
location by modifying the configuration file.
Default File Location
Value |
Description |
---|---|
Docker |
/config/ |
Linux |
~/.config/sunshine/ |
macOS |
~/.config/sunshine/ |
Windows |
%ProgramFiles%\Sunshine\config |
- Example
sunshine ~/sunshine_config.conf
Although it is recommended to use the configuration UI, it is possible manually configure sunshine by editing the conf file in a text editor. Use the examples as reference.
General#
locale#
- Description
The locale used for Sunshine’s user interface.
Choices
Value |
Description |
---|---|
de |
German |
en |
English |
en_GB |
English (UK) |
en_US |
English (United States) |
es |
Spanish |
fr |
French |
it |
Italian |
ja |
Japanese |
pt |
Portuguese |
ru |
Russian |
sv |
Swedish |
zh |
Chinese (Simplified) |
- Default
en
- Example
locale = en
sunshine_name#
- Description
The name displayed by Moonlight
- Default
PC hostname
- Example
sunshine_name = Sunshine
min_log_level#
- Description
The minimum log level printed to standard out.
Choices
Value |
Description |
---|---|
verbose |
verbose logging |
debug |
debug logging |
info |
info logging |
warning |
warning logging |
error |
error logging |
fatal |
fatal logging |
none |
no logging |
- Default
info
- Example
min_log_level = info
channels#
- Description
Sunshine can support multiple clients streaming simultaneously, at the cost of higher CPU and GPU usage.
Note
All connected clients share control of the same streaming session.
Warning
Some hardware encoders may have limitations that reduce performance with multiple streams.
- Default
1
- Example
channels = 1
global_prep_cmd#
- Description
A list of commands to be run before/after all applications. If any of the prep-commands fail, starting the application is aborted.
- Default
[]
- Example
global_prep_cmd = [{"do":"nircmd.exe setdisplay 1280 720 32 144","undo":"nircmd.exe setdisplay 2560 1440 32 144"}]
Input#
controller#
- Description
Whether to allow controller input from the client.
- Example
controller = enabled
gamepad#
- Description
The type of gamepad to emulate on the host.
Caution
Applies to Windows only.
Choices
Value |
Description |
---|---|
auto |
Selected based on information from client |
x360 |
Xbox 360 controller |
ds4 |
DualShock 4 controller (PS4) |
- Default
auto
- Example
gamepad = auto
ds4_back_as_touchpad_click#
- Description
Hint
Only applies when gamepad is set to ds4 manually. Unused in other gamepad modes.
Allow Select/Back inputs to also trigger DS4 touchpad click. Useful for clients looking to emulate touchpad click on Xinput devices.
- Default
enabled
- Example
ds4_back_as_touchpad_click = enabled
motion_as_ds4#
- Description
Hint
Only applies when gamepad is set to auto.
If a client reports that a connected gamepad has motion sensor support, emulate it on the host as a DS4 controller.
When disabled, motion sensors will not be taken into account during gamepad type selection.
- Default
enabled
- Example
motion_as_ds4 = enabled
touchpad_as_ds4#
- Description
Hint
Only applies when gamepad is set to auto.
If a client reports that a connected gamepad has a touchpad, emulate it on the host as a DS4 controller.
When disabled, touchpad presence will not be taken into account during gamepad type selection.
- Default
enabled
- Example
touchpad_as_ds4 = enabled
keyboard#
- Description
Whether to allow keyboard input from the client.
- Example
keyboard = enabled
key_repeat_delay#
- Description
The initial delay, in milliseconds, before repeating keys. Controls how fast keys will repeat themselves.
- Default
500
- Example
key_repeat_delay = 500
key_repeat_frequency#
- Description
How often keys repeat every second.
Tip
This configurable option supports decimals.
- Default
24.9
- Example
key_repeat_frequency = 24.9
always_send_scancodes#
- Description
Sending scancodes enhances compatibility with games and apps but may result in incorrect keyboard input from certain clients that aren’t using a US English keyboard layout.
Enable if keyboard input is not working at all in certain applications.
Disable if keys on the client are generating the wrong input on the host.
Caution
Applies to Windows only.
- Default
enabled
- Example
always_send_scancodes = enabled
key_rightalt_to_key_win#
- Description
It may be possible that you cannot send the Windows Key from Moonlight directly. In those cases it may be useful to make Sunshine think the Right Alt key is the Windows key.
- Default
disabled
- Example
key_rightalt_to_key_win = enabled
mouse#
- Description
Whether to allow mouse input from the client.
- Example
mouse = enabled
high_resolution_scrolling#
- Description
When enabled, Sunshine will pass through high resolution scroll events from Moonlight clients.
This can be useful to disable for older applications that scroll too fast with high resolution scroll events.
- Default
enabled
- Example
high_resolution_scrolling = enabled
native_pen_touch#
- Description
When enabled, Sunshine will pass through native pen/touch events from Moonlight clients.
This can be useful to disable for older applications without native pen/touch support.
- Default
enabled
- Example
native_pen_touch = enabled
keybindings#
- Description
Sometimes it may be useful to map keybindings. Wayland won’t allow clients to capture the Win Key for example.
Tip
Hint
keybindings needs to have a multiple of two elements.
- Default
[ 0x10, 0xA0, 0x11, 0xA2, 0x12, 0xA4 ]
- Example
keybindings = [ 0x10, 0xA0, 0x11, 0xA2, 0x12, 0xA4, 0x4A, 0x4B ]
Note
This option is not available in the UI. A PR would be welcome.
Audio/Video#
audio_sink#
- Description
The name of the audio sink used for audio loopback.
Tip
To find the name of the audio sink follow these instructions.
- Linux + pulseaudio
pacmd list-sinks | grep "name:"
- Linux + pipewire
pactl info | grep Source # in some causes you'd need to use the `Sink` device, if `Source` doesn't work, so try: pactl info | grep Sink
- macOS
Sunshine can only access microphones on macOS due to system limitations. To stream system audio use Soundflower or BlackHole.
- Windows
tools\audio-info.exe
Tip
If you have multiple audio devices with identical names, use the Device ID instead.
Tip
If you want to mute the host speakers, use virtual_sink instead.
- Default
Sunshine will select the default audio device.
- Examples
- Linux
audio_sink = alsa_output.pci-0000_09_00.3.analog-stereo
- macOS
audio_sink = BlackHole 2ch
- Windows
audio_sink = Speakers (High Definition Audio Device)
virtual_sink#
- Description
The audio device that’s virtual, like Steam Streaming Speakers. This allows Sunshine to stream audio, while muting the speakers.
Tip
See audio_sink!
Tip
These are some options for virtual sound devices.
Stream Streaming Speakers (Linux, macOS, Windows)
Steam must be installed.
Enable install_steam_audio_drivers or use Steam Remote Play at least once to install the drivers.
Virtual Audio Cable (macOS, Windows)
- Example
virtual_sink = Steam Streaming Speakers
install_steam_audio_drivers#
- Description
Installs the Steam Streaming Speakers driver (if Steam is installed) to support surround sound and muting host audio.
Tip
This option is only supported on Windows.
- Default
enabled
- Example
install_steam_audio_drivers = enabled
adapter_name#
- Description
Select the video card you want to stream.
Tip
To find the name of the appropriate values follow these instructions.
- Linux + VA-API
Unlike with amdvce and nvenc, it doesn’t matter if video encoding is done on a different GPU.
ls /dev/dri/renderD* # to find all devices capable of VAAPI # replace ``renderD129`` with the device from above to lists the name and capabilities of the device vainfo --display drm --device /dev/dri/renderD129 | \ grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
To be supported by Sunshine, it needs to have at the very minimum:
VAProfileH264High : VAEntrypointEncSlice
Todo
macOS
- Windows
tools\dxgi-info.exe
Note
For hybrid graphics systems, DXGI reports the outputs are connected to whichever graphics adapter that the application is configured to use, so it’s not a reliable indicator of how the display is physically connected.
- Default
Sunshine will select the default video card.
- Examples
- Linux
adapter_name = /dev/dri/renderD128
Todo
macOS
- Windows
adapter_name = Radeon RX 580 Series
output_name#
- Description
Select the display number you want to stream.
Tip
To find the name of the appropriate values follow these instructions.
- Linux
During Sunshine startup, you should see the list of detected monitors:
Info: Detecting connected monitors Info: Detected monitor 0: DVI-D-0, connected: false Info: Detected monitor 1: HDMI-0, connected: true Info: Detected monitor 2: DP-0, connected: true Info: Detected monitor 3: DP-1, connected: false Info: Detected monitor 4: DVI-D-1, connected: false
You need to use the value before the colon in the output, e.g.
1
.
Todo
macOS
- Windows
tools\dxgi-info.exe
- Default
Sunshine will select the default display.
- Examples
- Linux
output_name = 0
Todo
macOS
- Windows
output_name = \\.\DISPLAY1
resolutions#
- Description
The resolutions advertised by Sunshine.
Note
Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested resolution is supported.
- Default
[ 352x240, 480x360, 858x480, 1280x720, 1920x1080, 2560x1080, 3440x1440, 1920x1200, 3840x2160, 3840x1600, ]
- Example
resolutions = [ 352x240, 480x360, 858x480, 1280x720, 1920x1080, 2560x1080, 3440x1440, 1920x1200, 3840x2160, 3840x1600, ]
fps#
- Description
The fps modes advertised by Sunshine.
Note
Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested fps is supported.
- Default
[10, 30, 60, 90, 120]
- Example
fps = [10, 30, 60, 90, 120]
Network#
upnp#
- Description
Sunshine will attempt to open ports for streaming over the internet.
Choices
Value |
Description |
---|---|
on |
enable UPnP |
off |
disable UPnP |
- Default
disabled
- Example
upnp = on
address_family#
- Description
Set the address family that Sunshine will use.
Value |
Description |
---|---|
ipv4 |
IPv4 only |
both |
IPv4+IPv6 |
- Default
ipv4
- Example
address_family = both
port#
- Description
Set the family of ports used by Sunshine. Changing this value will offset other ports per the table below.
Port Description |
Default Port |
Difference from config port |
---|---|---|
HTTPS |
47984 TCP |
-5 |
HTTP |
47989 TCP |
0 |
Web |
47990 TCP |
+1 |
RTSP |
48010 TCP |
+21 |
Video |
47998 UDP |
+9 |
Control |
47999 UDP |
+10 |
Audio |
48000 UDP |
+11 |
Mic (unused) |
48002 UDP |
+13 |
Attention
Custom ports may not be supported by all Moonlight clients.
- Default
47989
- Range
1029-65514
- Example
port = 47989
origin_web_ui_allowed#
- Description
The origin of the remote endpoint address that is not denied for HTTPS Web UI.
Choices
Value |
Description |
---|---|
pc |
Only localhost may access the web ui |
lan |
Only LAN devices may access the web ui |
wan |
Anyone may access the web ui |
- Default
lan
- Example
origin_web_ui_allowed = lan
external_ip#
- Description
If no external IP address is given, Sunshine will attempt to automatically detect external ip-address.
- Default
Automatic
- Example
external_ip = 123.456.789.12
lan_encryption_mode#
- Description
This determines when encryption will be used when streaming over your local network.
Warning
Encryption can reduce streaming performance, particularly on less powerful hosts and clients.
Choices
Value |
Description |
---|---|
0 |
encryption will not be used |
1 |
encryption will be used if the client supports it |
2 |
encryption is mandatory and unencrypted connections are rejected |
- Default
0
- Example
lan_encryption_mode = 0
wan_encryption_mode#
- Description
This determines when encryption will be used when streaming over the Internet.
Warning
Encryption can reduce streaming performance, particularly on less powerful hosts and clients.
Choices
Value |
Description |
---|---|
0 |
encryption will not be used |
1 |
encryption will be used if the client supports it |
2 |
encryption is mandatory and unencrypted connections are rejected |
- Default
1
- Example
wan_encryption_mode = 1
ping_timeout#
- Description
How long to wait, in milliseconds, for data from Moonlight before shutting down the stream.
- Default
10000
- Example
ping_timeout = 10000
Config Files#
file_apps#
- Description
The application configuration file path. The file contains a json formatted list of applications that can be started by Moonlight.
- Default
OS and package dependent
- Example
file_apps = apps.json
credentials_file#
- Description
The file where user credentials for the UI are stored.
- Default
sunshine_state.json
- Example
credentials_file = sunshine_state.json
log_path#
- Description
The path where the sunshine log is stored.
- Default
sunshine.log
- Example
log_path = sunshine.log
pkey#
- Description
The private key used for the web UI and Moonlight client pairing. For best compatibility, this should be an RSA-2048 private key.
Warning
Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits.
- Default
credentials/cakey.pem
- Example
pkey = /dir/pkey.pem
cert#
- Description
The certificate used for the web UI and Moonlight client pairing. For best compatibility, this should have an RSA-2048 public key.
Warning
Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits.
- Default
credentials/cacert.pem
- Example
cert = /dir/cert.pem
file_state#
- Description
The file where current state of Sunshine is stored.
- Default
sunshine_state.json
- Example
file_state = sunshine_state.json
Advanced#
fec_percentage#
- Description
Percentage of error correcting packets per data packet in each video frame.
Warning
Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage.
- Default
20
- Range
1-255
- Example
fec_percentage = 20
qp#
- Description
Quantization Parameter. Some devices don’t support Constant Bit Rate. For those devices, QP is used instead.
Warning
Higher value means more compression, but less quality.
- Default
28
- Example
qp = 28
min_threads#
- Description
Minimum number of CPU threads used for encoding.
Note
Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest value that can reliably encode at your desired streaming settings on your hardware.
- Default
2
- Example
min_threads = 2
hevc_mode#
- Description
Allows the client to request HEVC Main or HEVC Main10 video streams.
Warning
HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding.
Choices
Value |
Description |
---|---|
0 |
advertise support for HEVC based on encoder capabilities (recommended) |
1 |
do not advertise support for HEVC |
2 |
advertise support for HEVC Main profile |
3 |
advertise support for HEVC Main and Main10 (HDR) profiles |
- Default
0
- Example
hevc_mode = 2
av1_mode#
- Description
Allows the client to request AV1 Main 8-bit or 10-bit video streams.
Warning
AV1 is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding.
Choices
Value |
Description |
---|---|
0 |
advertise support for AV1 based on encoder capabilities (recommended) |
1 |
do not advertise support for AV1 |
2 |
advertise support for AV1 Main 8-bit profile |
3 |
advertise support for AV1 Main 8-bit and 10-bit (HDR) profiles |
- Default
0
- Example
av1_mode = 2
capture#
- Description
Force specific screen capture method.
Caution
Applies to Linux only.
Choices
Value |
Description |
---|---|
nvfbc |
Use NVIDIA Frame Buffer Capture to capture direct to GPU memory. This is usually the fastest method for NVIDIA cards. For GeForce cards it will only work with drivers patched with nvidia-patch or nvlax. |
wlr |
Capture for wlroots based Wayland compositors via DMA-BUF. |
kms |
DRM/KMS screen capture from the kernel. This requires that sunshine has cap_sys_admin capability. See Linux Setup. |
x11 |
Uses XCB. This is the slowest and most CPU intensive so should be avoided if possible. |
- Default
Automatic. Sunshine will use the first capture method available in the order of the table above.
- Example
capture = kms
encoder#
- Description
Force a specific encoder.
Choices
Value |
Description |
---|---|
nvenc |
For NVIDIA graphics cards |
quicksync |
For Intel graphics cards |
amdvce |
For AMD graphics cards |
software |
Encoding occurs on the CPU |
- Default
Sunshine will use the first encoder that is available.
- Example
encoder = nvenc
NVIDIA NVENC Encoder#
nvenc_preset#
- Description
NVENC encoder performance preset. Higher numbers improve compression (quality at given bitrate) at the cost of increased encoding latency. Recommended to change only when limited by network or decoder, otherwise similar effect can be accomplished by increasing bitrate.
Note
This option only applies when using NVENC encoder.
Choices
Value |
Description |
---|---|
1 |
P1 (fastest) |
2 |
P2 |
3 |
P3 |
4 |
P4 |
5 |
P5 |
6 |
P6 |
7 |
P7 (slowest) |
- Default
1
- Example
nvenc_preset = 1
nvenc_twopass#
- Description
Enable two-pass mode in NVENC encoder. This allows to detect more motion vectors, better distribute bitrate across the frame and more strictly adhere to bitrate limits. Disabling it is not recommended since this can lead to occasional bitrate overshoot and subsequent packet loss.
Note
This option only applies when using NVENC encoder.
Choices
Value |
Description |
---|---|
disabled |
One pass (fastest) |
quarter_res |
Two passes, first pass at quarter resolution (faster) |
full_res |
Two passes, first pass at full resolution (slower) |
- Default
quarter_res
- Example
nvenc_twopass = quarter_res
nvenc_spatial_aq#
- Description
Assign higher QP values to flat regions of the video. Recommended to enable when streaming at lower bitrates.
Note
This option only applies when using NVENC encoder.
Choices
Value |
Description |
---|---|
disabled |
Don’t enable Spatial AQ (faster) |
enabled |
Enable Spatial AQ (slower) |
- Default
disabled
- Example
nvenc_spatial_aq = disabled
nvenc_vbv_increase#
- Description
Single-frame VBV/HRD percentage increase. By default sunshine uses single-frame VBV/HRD, which means any encoded video frame size is not expected to exceed requested bitrate divided by requested frame rate. Relaxing this restriction can be beneficial and act as low-latency variable bitrate, but may also lead to packet loss if the network doesn’t have buffer headroom to handle bitrate spikes. Maximum accepted value is 400, which corresponds to 5x increased encoded video frame upper size limit.
Note
This option only applies when using NVENC encoder.
Warning
Can lead to network packet loss.
- Default
0
- Range
0-400
- Example
nvenc_vbv_increase = 0
nvenc_realtime_hags#
- Description
Use realtime gpu scheduling priority in NVENC when hardware accelerated gpu scheduling (HAGS) is enabled in Windows. Currently NVIDIA drivers may freeze in encoder when HAGS is enabled, realtime priority is used and VRAM utilization is close to maximum. Disabling this option lowers the priority to high, sidestepping the freeze at the cost of reduced capture performance when the GPU is heavily loaded.
Note
This option only applies when using NVENC encoder.
Caution
Applies to Windows only.
Choices
Value |
Description |
---|---|
disabled |
Use high priority |
enabled |
Use realtime priority |
- Default
enabled
- Example
nvenc_realtime_hags = enabled
nvenc_latency_over_power#
- Description
Adaptive P-State algorithm which NVIDIA drivers employ doesn’t work well with low latency streaming, so sunshine requests high power mode explicitly.
Note
This option only applies when using NVENC encoder.
Warning
Disabling it is not recommended since this can lead to significantly increased encoding latency.
Caution
Applies to Windows only.
Choices
Value |
Description |
---|---|
disabled |
Sunshine doesn’t change GPU power preferences (not recommended) |
enabled |
Sunshine requests high power mode explicitly |
- Default
enabled
- Example
nvenc_latency_over_power = enabled
nvenc_opengl_vulkan_on_dxgi#
- Description
Sunshine can’t capture fullscreen OpenGL and Vulkan programs at full frame rate unless they present on top of DXGI. This is system-wide setting that is reverted on sunshine program exit.
Note
This option only applies when using NVENC encoder.
Caution
Applies to Windows only.
Choices
Value |
Description |
---|---|
disabled |
Sunshine leaves global Vulkan/OpenGL present method unchanged |
enabled |
Sunshine changes global Vulkan/OpenGL present method to “Prefer layered on DXGI Swapchain” |
- Default
enabled
- Example
nvenc_opengl_vulkan_on_dxgi = enabled
nvenc_h264_cavlc#
- Description
Prefer CAVLC entropy coding over CABAC in H.264 when using NVENC. CAVLC is outdated and needs around 10% more bitrate for same quality, but provides slightly faster decoding when using software decoder.
Note
This option only applies when using H.264 format with NVENC encoder.
Choices
Value |
Description |
---|---|
disabled |
Prefer CABAC |
enabled |
Prefer CAVLC |
- Default
disabled
- Example
nvenc_h264_cavlc = disabled
Intel QuickSync Encoder#
qsv_preset#
- Description
The encoder preset to use.
Note
This option only applies when using quicksync encoder.
Choices
Value |
Description |
---|---|
veryfast |
fastest (lowest quality) |
faster |
faster (lower quality) |
fast |
fast (low quality) |
medium |
medium (default) |
slow |
slow (good quality) |
slower |
slower (better quality) |
veryslow |
slowest (best quality) |
- Default
medium
- Example
qsv_preset = medium
qsv_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using H264 with quicksync encoder.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
context adaptive binary arithmetic coding - higher quality |
cavlc |
context adaptive variable-length coding - faster decode |
- Default
auto
- Example
qsv_coder = auto
qsv_slow_hevc#
- Description
This options enables use of HEVC on older Intel GPUs that only support low power encoding for H.264.
Caution
Streaming performance may be significantly reduced when this option is enabled.
- Default
disabled
- Example
qsv_slow_hevc = disabled
AMD AMF Encoder#
amd_usage#
- Description
The encoder usage profile is used to set the base set of encoding parameters.
Note
This option only applies when using amdvce encoder.
Note
The other AMF options that follow will override a subset of the settings applied by your usage profile, but there are hidden parameters set in usage profiles that cannot be overridden elsewhere.
Choices
Value |
Description |
---|---|
transcoding |
transcoding (slowest) |
webcam |
webcam (slow) |
lowlatency_high_quality |
low latency, high quality (fast) |
lowlatency |
low latency (faster) |
ultralowlatency |
ultra low latency (fastest) |
- Default
ultralowlatency
- Example
amd_usage = ultralowlatency
amd_rc#
- Description
The encoder rate control.
Note
This option only applies when using amdvce encoder.
Warning
The ‘vbr_latency’ option generally works best, but some bitrate overshoots may still occur. Enabling HRD allows all bitrate based rate controls to better constrain peak bitrate, but may result in encoding artifacts depending on your card.
Choices
Value |
Description |
---|---|
cqp |
constant qp mode |
cbr |
constant bitrate |
vbr_latency |
variable bitrate, latency constrained |
vbr_peak |
variable bitrate, peak constrained |
- Default
vbr_latency
- Example
amd_rc = vbr_latency
amd_enforce_hrd#
- Description
Enable Hypothetical Reference Decoder (HRD) enforcement to help constrain the target bitrate.
Note
This option only applies when using amdvce encoder.
Warning
HRD is known to cause encoding artifacts or negatively affect encoding quality on certain cards.
Choices
Value |
Description |
---|---|
enabled |
enable HRD |
disabled |
disable HRD |
- Default
disabled
- Example
amd_enforce_hrd = disabled
amd_quality#
- Description
The quality profile controls the tradeoff between speed and quality of encoding.
Note
This option only applies when using amdvce encoder.
Choices
Value |
Description |
---|---|
speed |
prefer speed |
balanced |
balanced |
quality |
prefer quality |
- Default
balanced
- Example
amd_quality = balanced
amd_preanalysis#
- Description
Preanalysis can increase encoding quality at the cost of latency.
Note
This option only applies when using amdvce encoder.
- Default
disabled
- Example
amd_preanalysis = disabled
amd_vbaq#
- Description
Variance Based Adaptive Quantization (VBAQ) can increase subjective visual quality by prioritizing allocation of more bits to smooth areas compared to more textured areas.
Note
This option only applies when using amdvce encoder.
- Default
enabled
- Example
amd_vbaq = enabled
amd_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using H264 with amdvce encoder.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
context adaptive variable-length coding - higher quality |
cavlc |
context adaptive binary arithmetic coding - faster decode |
- Default
auto
- Example
amd_coder = auto
VideoToolbox Encoder#
vt_coder#
- Description
The entropy encoding to use.
Note
This option only applies when using macOS.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
cabac |
|
cavlc |
- Default
auto
- Example
vt_coder = auto
vt_software#
- Description
Force Video Toolbox to use software encoding.
Note
This option only applies when using macOS.
Choices
Value |
Description |
---|---|
auto |
let ffmpeg decide |
disabled |
disable software encoding |
allowed |
allow software encoding |
forced |
force software encoding |
- Default
auto
- Example
vt_software = auto
vt_realtime#
- Description
Realtime encoding.
Note
This option only applies when using macOS.
Warning
Disabling realtime encoding might result in a delayed frame encoding or frame drop.
- Default
enabled
- Example
vt_realtime = enabled
Software Encoder#
sw_preset#
- Description
The encoder preset to use.
Note
This option only applies when using software encoder.
Note
From FFmpeg.
A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.
Use the slowest preset that you have patience for.
Choices
Value |
Description |
---|---|
ultrafast |
fastest |
superfast |
|
veryfast |
|
faster |
|
fast |
|
medium |
|
slow |
|
slower |
|
veryslow |
slowest |
- Default
superfast
- Example
sw_preset = superfast
sw_tune#
- Description
The tuning preset to use.
Note
This option only applies when using software encoder.
Note
From FFmpeg.
You can optionally use -tune to change settings based upon the specifics of your input.
Choices
Value |
Description |
---|---|
film |
use for high quality movie content; lowers deblocking |
animation |
good for cartoons; uses higher deblocking and more reference frames |
grain |
preserves the grain structure in old, grainy film material |
stillimage |
good for slideshow-like content |
fastdecode |
allows faster decoding by disabling certain filters |
zerolatency |
good for fast encoding and low-latency streaming |
- Default
zerolatency
- Example
sw_tune = zerolatency
GameStream#
Nvidia announced that their GameStream service for Nvidia Games clients will be discontinued in February 2023. Luckily, Sunshine performance is now on par with Nvidia GameStream. Many users have even reported that Sunshine outperforms GameStream, so rest assured that Sunshine will be equally performant moving forward.
Migration#
We have developed a simple migration tool to help you migrate your GameStream games and apps to Sunshine automatically.
Please check out our GSMS project if you’re interested in an automated
migration option. GSMS offers the ability to migrate your custom and auto-detected games and apps. The
working directory, command, and image are all set in Sunshine’s apps.json
file. The box-art image is also copied
to a specified directory.
Internet Streaming#
If you are using the Moonlight Internet Hosting Tool, you can remove it from your system when you migrate to Sunshine. To stream over the Internet with Sunshine and a UPnP-capable router, enable the UPnP option in the Sunshine Web UI.
Note
Running Sunshine together with versions of the Moonlight Internet Hosting Tool prior to v5.6 will cause UPnP port forwarding to become unreliable. Either uninstall the tool entirely or update it to v5.6 or later.
Limitations#
Sunshine does have some limitations, as compared to Nvidia GameStream.
Automatic game/application list.
Changing game settings automatically, to optimize streaming.
General#
Forgotten Credentials#
- If you forgot your credentials to the web UI, try this.
sunshine --creds {new-username} {new-password}
./sunshine.AppImage --creds {new-username} {new-password}
flatpak run --command=sunshine dev.lizardbyte.Sunshine --creds {new-username} {new-password}
Web UI Access#
- Can’t access the web UI?
Check firewall rules.
Nvidia issues#
- NvFBC, NvENC, or general issues with Nvidia graphics card.
Consumer grade Nvidia cards are software limited to a specific number of encodes. See Video Encode and Decode GPU Support Matrix for more info.
You can usually bypass the restriction with a driver patch. See Keylase’s Linux or Windows patches for more guidance.
Linux#
Hardware Encoding fails#
Due to legal concerns, Mesa has disabled hardware decoding and encoding by default.
Error: Could not open codec [h264_vaapi]: Function not implemented
If you see the above error in the Sunshine logs, compiling Mesa manually, may be required. See the official Mesa3D Compiling and Installing documentation for instructions.
Important
You must re-enable the disabled encoders. You can do so, by passing the following argument to the build system. You may also want to enable decoders, however that is not required for Sunshine and is not covered here.
-Dvideo-codecs=h264enc,h265enc
Note
Other build options are listed in the meson options file.
KMS Streaming fails#
- If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
sudo setcap -r $(readlink -f $(which sunshine))
Gamescope compatibility#
Some users have reported stuttering issues when streaming games running within Gamescope.
macOS#
Dynamic session lookup failed#
- If you get this error:
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
- Try this.
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Windows#
No gamepad detected#
Verify that you’ve installed Nefarius Virtual Gamepad.
Permission denied#
Since Sunshine runs as a service on Windows, it may not have the same level of access that your regular user account has. You may get permission denied errors when attempting to launch a game or application from a non system drive.
You will need to modify the security permissions on your disk. Ensure that user/principal SYSTEM has full permissions on the disk.
Build#
Sunshine binaries are built using CMake. Cross compilation is not supported. That means the binaries must be built on the target operating system and architecture.
Building Locally#
Clone#
- Ensure git is installed and run the following:
git clone https://github.com/lizardbyte/sunshine.git --recurse-submodules cd sunshine && mkdir build && cd build
Compile#
See the section specific to your OS.
Remote Build#
It may be beneficial to build remotely in some cases. This will enable easier building on different operating systems.
Fork the project
Activate workflows
Trigger the CI workflow manually
Download the artifacts/binaries from the workflow run summary
Linux#
Requirements#
Debian Bullseye/Bookworm#
End of Life (Bullseye): July, 2024 End of Life (Bookworm): TBD
- Install Requirements
sudo apt update && sudo apt install \ build-essential \ cmake \ libayatana-appindicator3-dev \ libboost-filesystem-dev \ libboost-locale-dev \ libboost-log-dev \ libboost-program-options-dev \ libcap-dev \ # KMS libcurl4-openssl-dev \ libdrm-dev \ # KMS libevdev-dev \ libminiupnpc-dev \ libmfx-dev \ # x86_64 only libnotify-dev \ libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libva-dev \ # VA-API libvdpau-dev \ libwayland-dev \ # Wayland libx11-dev \ # X11 libxcb-shm0-dev \ # X11 libxcb-xfixes0-dev \ # X11 libxcb1-dev \ # X11 libxfixes-dev \ # X11 libxrandr-dev \ # X11 libxtst-dev \ # X11 nodejs \ npm \ nvidia-cuda-dev \ # Cuda, NvFBC nvidia-cuda-toolkit # Cuda, NvFBC
Fedora 38, 39#
- Install Requirements
sudo dnf update && \ sudo dnf group install "Development Tools" && \ sudo dnf install \ boost-devel \ cmake \ gcc \ gcc-c++ \ intel-mediasdk-devel \ # x86_64 only libappindicator-gtk3-devel \ libcap-devel \ libcurl-devel \ libdrm-devel \ libevdev-devel \ libnotify-devel \ libva-devel \ # VA-API libvdpau-devel \ libX11-devel \ # X11 libxcb-devel \ # X11 libXcursor-devel \ # X11 libXfixes-devel \ # X11 libXi-devel \ # X11 libXinerama-devel \ # X11 libXrandr-devel \ # X11 libXtst-devel \ # X11 mesa-libGL-devel \ miniupnpc-devel \ npm \ numactl-devel \ openssl-devel \ opus-devel \ pulseaudio-libs-devel \ rpm-build \ # if you want to build an RPM binary package wget \ # necessary for cuda install with `run` file which # necessary for cuda install with `run` file
Ubuntu 22.04#
- Install Requirements
sudo apt update && sudo apt install \ build-essential \ cmake \ libappindicator3-dev \ libboost-filesystem-dev \ libboost-locale-dev \ libboost-log-dev \ libboost-program-options-dev \ libcap-dev \ # KMS libcurl4-openssl-dev \ libdrm-dev \ # KMS libevdev-dev \ libminiupnpc-dev \ libmfx-dev \ # x86_64 only libnotify-dev \ libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libva-dev \ # VA-API libwayland-dev \ # Wayland libx11-dev \ # X11 libxcb-shm0-dev \ # X11 libxcb-xfixes0-dev \ # X11 libxcb1-dev \ # X11 libxfixes-dev \ # X11 libxrandr-dev \ # X11 libxtst-dev \ # X11 nodejs \ npm \ nvidia-cuda-dev \ # CUDA, NvFBC nvidia-cuda-toolkit # CUDA, NvFBC
Ubuntu 24.04#
- Install Requirements
sudo apt update && sudo apt install \ build-essential \ cmake \ gcc-11 \ g++-11 \ libappindicator3-dev \ libboost-filesystem-dev \ libboost-locale-dev \ libboost-log-dev \ libboost-program-options-dev \ libcap-dev \ # KMS libcurl4-openssl-dev \ libdrm-dev \ # KMS libevdev-dev \ libminiupnpc-dev \ libmfx-dev \ # x86_64 only libnotify-dev \ libnuma-dev \ libopus-dev \ libpulse-dev \ libssl-dev \ libva-dev \ # VA-API libwayland-dev \ # Wayland libx11-dev \ # X11 libxcb-shm0-dev \ # X11 libxcb-xfixes0-dev \ # X11 libxcb1-dev \ # X11 libxfixes-dev \ # X11 libxrandr-dev \ # X11 libxtst-dev \ # X11 nodejs \ npm \ nvidia-cuda-dev \ # CUDA, NvFBC nvidia-cuda-toolkit # CUDA, NvFBC
- Update gcc alias
update-alternatives --install \ /usr/bin/gcc gcc /usr/bin/gcc-11 100 \ --slave /usr/bin/g++ g++ /usr/bin/g++-11 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-11 \ --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11
CUDA#
If the version of CUDA available from your distro is not adequate, manually install CUDA.
Tip
The version of CUDA you use will determine compatibility with various GPU generations. At the time of writing, the recommended version to use is CUDA ~11.8. See CUDA compatibility for more info.
Select the appropriate run file based on your desired CUDA version and architecture according to CUDA Toolkit Archive.
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \
--progress=bar:force:noscroll -q --show-progress -O ./cuda.run
chmod a+x ./cuda.run
./cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
rm ./cuda.run
Build#
Attention
Ensure you are in the build directory created during the clone step earlier before continuing.
cmake ..
make -j ${nproc}
cpack -G DEB # optionally, create a deb package
cpack -G RPM # optionally, create a rpm package
macOS#
Requirements#
macOS Big Sur and Xcode 12.5+
Use either MacPorts or Homebrew
MacPorts#
- Install Requirements
sudo port install avahi boost180 cmake curl doxygen graphviz libopus miniupnpc npm9 pkgconfig python311 py311-pip
Homebrew#
- Install Requirements
brew install boost cmake doxygen graphviz miniupnpc node opus pkg-config python@3.11
- If there are issues with an SSL header that is not found:
pushd /usr/local/include ln -s ../opt/openssl/include/openssl . popd
pushd /opt/homebrew/include ln -s ../opt/openssl/include/openssl . popd
Build#
Attention
Ensure you are in the build directory created during the clone step earlier before continuing.
cmake ..
make -j $(sysctl -n hw.ncpu)
cpack -G DragNDrop # optionally, create a macOS dmg package
- If cmake fails complaining to find Boost, try to set the path explicitly.
cmake -DBOOST_ROOT=[boost path] ..
, e.g.,cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.80 ..
Windows#
Requirements#
First you need to install MSYS2, then startup “MSYS2 MinGW 64-bit” and execute the following codes.
- Update all packages:
pacman -Suy
- Install dependencies:
pacman -S \ base-devel \ cmake \ diffutils \ doxygen \ gcc \ git \ make \ mingw-w64-x86_64-binutils \ mingw-w64-x86_64-boost \ mingw-w64-x86_64-cmake \ mingw-w64-x86_64-curl \ mingw-w64-x86_64-graphviz \ mingw-w64-x86_64-miniupnpc \ mingw-w64-x86_64-nlohmann-json \ mingw-w64-x86_64-nodejs \ mingw-w64-x86_64-onevpl \ mingw-w64-x86_64-openssl \ mingw-w64-x86_64-opus \ mingw-w64-x86_64-rust \ mingw-w64-x86_64-toolchain \ python \ python-pip
Build#
Attention
Ensure you are in the build directory created during the clone step earlier before continuing.
cmake -G "MinGW Makefiles" ..
mingw32-make -j$(nproc)
cpack -G NSIS # optionally, create a windows installer
cpack -G ZIP # optionally, create a windows standalone package
Contributing#
Read our contribution guide in our organization level docs.
Web UI#
The Web UI uses Vite as its build system, to handle the integration of the NPM libraries.
The HTML pages used by the Web UI are found in src_assets/common/assets/web
.
EJS is used as a templating system for the pages (check template_header.html
and template_header_main.html
).
The Style System is provided by Bootstrap.
The JS framework used by the more interactive pages is Vue.
Building#
Sunshine already builds the UI as part of its build process, but you can make faster changes by starting vite manually.
npm run dev
Localization#
Sunshine and related LizardByte projects are being localized into various languages. The default language is en (English).
CrowdIn#
The translations occur on CrowdIn. Anyone is free to contribute to localization there.
- Translations Basics
The brand names LizardByte and Sunshine should never be translated.
Other brand names should never be translated. Examples:
AMD
Nvidia
- CrowdIn Integration
How does it work?
When a change is made to sunshine source code, a workflow generates new translation templates that get pushed to CrowdIn automatically.
When translations are updated on CrowdIn, a push gets made to the l10n_nightly branch and a PR is made against the nightly branch. Once PR is merged, all updated translations are part of the project and will be included in the next release.
Extraction#
Sunshine uses Vue I18n for localizing the UI. The following is a simple example of how to use it.
- Add the string to src_assets/common/assets/web/public/assets/locale/en.json, in English.
{ "index": { "welcome": "Hello, Sunshine!" } }
Note
The json keys should be sorted alphabetically. You can use jsonabc to sort the keys.
Attention
Due to the integration with Crowdin, it is important to only add strings to the en.json file, and to not modify any other language files. After the PR is merged, the translations can take place on CrowdIn. Once the translations are complete, a PR will be made to merge the translations into Sunshine.
- Use the string in a Vue component.
<template> <div> <p>{{ $t('index.welcome') }}</p> </div> </template>
Tip
More formatting examples can be found in the Vue I18n guide.
There should be minimal cases where strings need to be extracted from C++ source code; however it may be necessary in some situations. For example the system tray icon could be localized as it is user interfacing.
- Wrap the string to be extracted in a function as shown.
#include <boost/locale.hpp> #include <string> std::string msg = boost::locale::translate("Hello world!");
Tip
More examples can be found in the documentation for boost locale.
Warning
This is for information only. Contributors should never include manually updated template files, or manually compiled language files in Pull Requests.
Strings are automatically extracted from the code to the locale/sunshine.po template file. The generated file is used by CrowdIn to generate language specific template files. The file is generated using the .github/workflows/localize.yml workflow and is run on any push event into the nightly branch. Jobs are only run if any of the following paths are modified.
- 'src/**'
When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is required for this, along with the python dependencies in the ./scripts/requirements.txt file. Additionally, xgettext must be installed.
- Extract, initialize, and update
python ./scripts/_locale.py --extract --init --update
- Compile
python ./scripts/_locale.py --compile
Attention
Due to the integration with Crowdin, it is important to not include any extracted or compiled files in Pull Requests. The files are automatically generated and updated by the workflow. Once the PR is merged, the translations can take place on CrowdIn. Once the translations are complete, a PR will be made to merge the translations into Sunshine.
Testing#
Clang Format#
Source code is tested against the .clang-format file for linting errors. The workflow file responsible for clang format testing is .github/workflows/cpp-clang-format-lint.yml.
- Test clang-format locally.
find ./ -iname *.cpp -o -iname *.h -iname *.m -iname *.mm | xargs clang-format -i
Sphinx#
Sunshine uses Sphinx for documentation building. Sphinx, along with other required python dependencies are included in the ./docs/requirements.txt file. Python is required to build sphinx docs. Installation and setup of python will not be covered here.
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from Doxygen downloads. Ensure that the doxygen executable is in your path.
See also
Sphinx is configured to use the graphviz extension. To obtain the dot executable from the Graphviz library, see the library’s downloads section.
The config file for Sphinx is docs/source/conf.py. This is already included in the repo and should not be modified.
The config file for Doxygen is docs/Doxyfile. This is already included in the repo and should not be modified.
- Test with Sphinx
cd docs make html
Alternatively
cd docs sphinx-build -b html source build
- Lint with rstcheck
rstcheck -r .
- Check formatting with rstfmt
rstfmt --check --diff -w 120 .
- Format inplace with rstfmt
rstfmt -w 120 .
Unit Testing#
Sunshine uses Google Test for unit testing. Google Test is included in the repo as a submodule. The test sources are located in the ./tests directory.
The tests need to be compiled into an executable, and then run. The tests are built using the normal build process, but can be disabled by setting the BUILD_TESTS CMake option to OFF.
To run the tests, execute the following command from the build directory:
pushd tests
./test_sunshine
popd
pushd tests
./test_sunshine
popd
pushd tests
test_sunshine.exe
popd
To see all available options, run the tests with the –help option.
pushd tests
./test_sunshine --help
popd
pushd tests
./test_sunshine --help
popd
pushd tests
test_sunshine.exe --help
popd
Some tests rely on Python to run. CMake will search for Python and enable the docs tests if it is found, otherwise cmake will fail. You can manually disable the tests by setting the TESTS_ENABLE_PYTHON_TESTS CMake option to OFF.
Tip
See the googletest FAQ for more information on how to use Google Test.
We use gcovr to generate code coverage reports, and Codecov to analyze the reports for all PRs and commits.
Codecov will fail a PR if the total coverage is reduced too much, or if not enough of the diff is covered by tests. In some cases, the code cannot be covered when running the tests inside of GitHub runners. For example, any test that needs access to the GPU will not be able to run. In these cases, the coverage can be omitted by adding comments to the code. See the gcovr documentation for more information.
Even if your changes cannot be covered in the CI, we still encourage you to write the tests for them. This will allow maintainers to run the tests locally.
Legal#
Attention
This documentation is for informational purposes only and is not intended as legal advice. If you have any legal questions or concerns about using Sunshine, we recommend consulting with a lawyer.
Sunshine is licensed under the GPL-3.0 license, which allows for free use and modification of the software. The full text of the license can be reviewed here.
Commercial Use#
Sunshine can be used in commercial applications without any limitations. This means that businesses and organizations can use Sunshine to create and sell products or services without needing to seek permission or pay a fee.
However, it is important to note that the GPL-3.0 license does not grant any rights to distribute or sell the encoders contained within Sunshine. If you plan to sell access to Sunshine as part of their distribution, you are responsible for obtaining the necessary licenses to do so. This may include obtaining a license from the Motion Picture Experts Group (MPEG-LA) and/or any other necessary licensing requirements.
In summary, while Sunshine is free to use, it is the user’s responsibility to ensure compliance with all applicable licensing requirements when redistributing the software as part of a commercial offering. If you have any questions or concerns about using Sunshine in a commercial setting, we recommend consulting with a lawyer.
Source Code#
We are in process of improving the source code documentation. Code should be documented using Doxygen syntax. Some examples exist in main.h and main.cpp. In order for documentation within the code to appear in the rendered docs, the definition of the object must be in a header file, although the documentation itself can (and should) be in the source file.
Example Documentation Blocks#
file.h
// functions
int main(int argc, char *argv[]);
file.cpp (with markdown)
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
*
* EXAMPLES:
* ```cpp
* main(1, const char* args[] = {"hello", "markdown", nullptr});
* ```
*/
int main(int argc, char *argv[]) {
// do stuff
}
file.cpp (with ReStructuredText)
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
* @rst
* EXAMPLES:
*
* .. code-block:: cpp
* main(1, const char* args[] = {"hello", "rst", nullptr});
* @endrst
*/
int main(int argc, char *argv[]) {
// do stuff
}
Source#
audio#
Include dependency graph for audio.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="atomic" tooltip="atomic"]
"6" [label="functional" tooltip="functional"]
"2" [label="thread_safe.h" tooltip="thread_safe.h"]
"17" [label="variant" tooltip="variant"]
"14" [label="string" tooltip="string"]
"7" [label="map" tooltip="map"]
"10" [label="utility.h" tooltip="utility.h"]
"15" [label="string_view" tooltip="string_view"]
"5" [label="condition_variable" tooltip="condition_variable"]
"13" [label="optional" tooltip="optional"]
"9" [label="vector" tooltip="vector"]
"1" [label="src/audio.h" tooltip="src/audio.h" fillcolor="#BFBFBF"]
"3" [label="array" tooltip="array"]
"8" [label="mutex" tooltip="mutex"]
"16" [label="type_traits" tooltip="type_traits"]
"11" [label="algorithm" tooltip="algorithm"]
"12" [label="memory" tooltip="memory"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
"2" -> "6" [dir=forward tooltip="include"]
"2" -> "7" [dir=forward tooltip="include"]
"2" -> "8" [dir=forward tooltip="include"]
"2" -> "9" [dir=forward tooltip="include"]
"2" -> "10" [dir=forward tooltip="include"]
"10" -> "11" [dir=forward tooltip="include"]
"10" -> "5" [dir=forward tooltip="include"]
"10" -> "12" [dir=forward tooltip="include"]
"10" -> "8" [dir=forward tooltip="include"]
"10" -> "13" [dir=forward tooltip="include"]
"10" -> "14" [dir=forward tooltip="include"]
"10" -> "15" [dir=forward tooltip="include"]
"10" -> "16" [dir=forward tooltip="include"]
"10" -> "17" [dir=forward tooltip="include"]
"10" -> "9" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "10" [dir=forward tooltip="include"]
}](_images/graphviz-3e4da2d4dc70e8863a68e47b008e22c46bdae8ab.png)
This graph shows which files directly or indirectly include audio.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"5" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"3" [label="src/stream.h" tooltip="src/stream.h"]
"1" [label="src/audio.h" tooltip="src/audio.h" fillcolor="#BFBFBF"]
"2" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"4" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"3" -> "4" [dir=back tooltip="include"]
"3" -> "5" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-46f9c9b140e7895721f0ad851eada9564f5ea21c.png)
todo
cbs#
Include dependency graph for cbs.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"11" [label="variant" tooltip="variant"]
"8" [label="string" tooltip="string"]
"2" [label="utility.h" tooltip="utility.h"]
"9" [label="string_view" tooltip="string_view"]
"4" [label="condition_variable" tooltip="condition_variable"]
"7" [label="optional" tooltip="optional"]
"12" [label="vector" tooltip="vector"]
"6" [label="mutex" tooltip="mutex"]
"10" [label="type_traits" tooltip="type_traits"]
"3" [label="algorithm" tooltip="algorithm"]
"5" [label="memory" tooltip="memory"]
"1" [label="src/cbs.h" tooltip="src/cbs.h" fillcolor="#BFBFBF"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
"2" -> "6" [dir=forward tooltip="include"]
"2" -> "7" [dir=forward tooltip="include"]
"2" -> "8" [dir=forward tooltip="include"]
"2" -> "9" [dir=forward tooltip="include"]
"2" -> "10" [dir=forward tooltip="include"]
"2" -> "11" [dir=forward tooltip="include"]
"2" -> "12" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
}](_images/graphviz-f6dc5e2a980cc97ad6cb189f6e07bc9f2134eeb3.png)
This graph shows which files directly or indirectly include cbs.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="src/cbs.cpp" tooltip="src/cbs.cpp"]
"3" [label="src/video.cpp" tooltip="src/video.cpp"]
"1" [label="src/cbs.h" tooltip="src/cbs.h" fillcolor="#BFBFBF"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-12e765e5e75269e16bc57bb59559579d8322648a.png)
todo
config#
Include dependency graph for config.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"8" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"5" [label="string" tooltip="string"]
"2" [label="bitset" tooltip="bitset"]
"4" [label="optional" tooltip="optional"]
"7" [label="vector" tooltip="vector"]
"1" [label="src/config.h" tooltip="src/config.h" fillcolor="#BFBFBF"]
"6" [label="unordered_map" tooltip="unordered_map"]
"3" [label="chrono" tooltip="chrono"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "6" [dir=forward tooltip="include"]
"1" -> "7" [dir=forward tooltip="include"]
"1" -> "8" [dir=forward tooltip="include"]
}](_images/graphviz-3c98b7dbd73b9f28eb8c7ee70c33955248fc26b8.png)
This graph shows which files directly or indirectly include config.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"30" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"47" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"43" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"22" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"36" [label="src/platform/linux/publish.cpp" tooltip="src/platform/linux/publish.cpp"]
"48" [label="src/platform/windows/publish.cpp" tooltip="src/platform/windows/publish.cpp"]
"29" [label="src/stream.h" tooltip="src/stream.h"]
"23" [label="src/platform/macos/display.mm" tooltip="src/platform/macos/display.mm"]
"19" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"10" [label="src/input.h" tooltip="src/input.h"]
"34" [label="src/platform/linux/wayland.h" tooltip="src/platform/linux/wayland.h"]
"44" [label="src/platform/macos/publish.cpp" tooltip="src/platform/macos/publish.cpp"]
"15" [label="src/nvenc/nvenc_base.h" tooltip="src/nvenc/nvenc_base.h"]
"6" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"51" [label="src/upnp.h" tooltip="src/upnp.h"]
"38" [label="src/platform/linux/x11grab.h" tooltip="src/platform/linux/x11grab.h"]
"21" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"39" [label="src/platform/macos/av_img_t.h" tooltip="src/platform/macos/av_img_t.h"]
"11" [label="src/platform/linux/input.cpp" tooltip="src/platform/linux/input.cpp"]
"50" [label="src/process.h" tooltip="src/process.h"]
"25" [label="src/platform/windows/display.h" tooltip="src/platform/windows/display.h"]
"32" [label="src/platform/linux/audio.cpp" tooltip="src/platform/linux/audio.cpp"]
"3" [label="src/config.cpp" tooltip="src/config.cpp"]
"27" [label="src/platform/windows/display_base.cpp" tooltip="src/platform/windows/display_base.cpp"]
"24" [label="src/platform/macos/nv12_zero_device.cpp" tooltip="src/platform/macos/nv12_zero_device.cpp"]
"42" [label="src/platform/macos/input.cpp" tooltip="src/platform/macos/input.cpp"]
"8" [label="src/network.cpp" tooltip="src/network.cpp"]
"46" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"7" [label="src/input.cpp" tooltip="src/input.cpp"]
"18" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"28" [label="src/platform/windows/display_vram.cpp" tooltip="src/platform/windows/display_vram.cpp"]
"1" [label="src/config.h" tooltip="src/config.h" fillcolor="#BFBFBF"]
"40" [label="src/platform/macos/nv12_zero_device.h" tooltip="src/platform/macos/nv12_zero_device.h"]
"9" [label="src/platform/common.h" tooltip="src/platform/common.h"]
"5" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"13" [label="src/video.h" tooltip="src/video.h"]
"35" [label="src/platform/linux/wayland.cpp" tooltip="src/platform/linux/wayland.cpp"]
"17" [label="src/platform/linux/graphics.cpp" tooltip="src/platform/linux/graphics.cpp"]
"31" [label="src/nvenc/nvenc_utils.h" tooltip="src/nvenc/nvenc_utils.h"]
"37" [label="src/platform/linux/vaapi.h" tooltip="src/platform/linux/vaapi.h"]
"49" [label="src/process.cpp" tooltip="src/process.cpp"]
"4" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"2" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"12" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"26" [label="src/platform/windows/display_ram.cpp" tooltip="src/platform/windows/display_ram.cpp"]
"14" [label="src/main.cpp" tooltip="src/main.cpp"]
"33" [label="src/platform/linux/graphics.h" tooltip="src/platform/linux/graphics.h"]
"16" [label="src/video.cpp" tooltip="src/video.cpp"]
"45" [label="src/platform/windows/audio.cpp" tooltip="src/platform/windows/audio.cpp"]
"20" [label="src/platform/linux/vaapi.cpp" tooltip="src/platform/linux/vaapi.cpp"]
"41" [label="src/platform/macos/microphone.mm" tooltip="src/platform/macos/microphone.mm"]
"29" -> "12" [dir=back tooltip="include"]
"29" -> "30" [dir=back tooltip="include"]
"10" -> "7" [dir=back tooltip="include"]
"10" -> "11" [dir=back tooltip="include"]
"10" -> "12" [dir=back tooltip="include"]
"10" -> "13" [dir=back tooltip="include"]
"10" -> "16" [dir=back tooltip="include"]
"34" -> "18" [dir=back tooltip="include"]
"34" -> "19" [dir=back tooltip="include"]
"34" -> "35" [dir=back tooltip="include"]
"34" -> "21" [dir=back tooltip="include"]
"15" -> "16" [dir=back tooltip="include"]
"51" -> "14" [dir=back tooltip="include"]
"51" -> "30" [dir=back tooltip="include"]
"38" -> "22" [dir=back tooltip="include"]
"39" -> "23" [dir=back tooltip="include"]
"39" -> "40" [dir=back tooltip="include"]
"50" -> "4" [dir=back tooltip="include"]
"50" -> "6" [dir=back tooltip="include"]
"50" -> "14" [dir=back tooltip="include"]
"50" -> "49" [dir=back tooltip="include"]
"50" -> "12" [dir=back tooltip="include"]
"25" -> "26" [dir=back tooltip="include"]
"25" -> "27" [dir=back tooltip="include"]
"25" -> "28" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"1" -> "32" [dir=back tooltip="include"]
"1" -> "19" [dir=back tooltip="include"]
"1" -> "11" [dir=back tooltip="include"]
"1" -> "20" [dir=back tooltip="include"]
"1" -> "22" [dir=back tooltip="include"]
"1" -> "23" [dir=back tooltip="include"]
"1" -> "41" [dir=back tooltip="include"]
"1" -> "45" [dir=back tooltip="include"]
"1" -> "27" [dir=back tooltip="include"]
"1" -> "46" [dir=back tooltip="include"]
"1" -> "28" [dir=back tooltip="include"]
"1" -> "48" [dir=back tooltip="include"]
"1" -> "49" [dir=back tooltip="include"]
"1" -> "50" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
"1" -> "30" [dir=back tooltip="include"]
"1" -> "16" [dir=back tooltip="include"]
"40" -> "23" [dir=back tooltip="include"]
"40" -> "24" [dir=back tooltip="include"]
"9" -> "2" [dir=back tooltip="include"]
"9" -> "3" [dir=back tooltip="include"]
"9" -> "4" [dir=back tooltip="include"]
"9" -> "5" [dir=back tooltip="include"]
"9" -> "6" [dir=back tooltip="include"]
"9" -> "10" [dir=back tooltip="include"]
"9" -> "7" [dir=back tooltip="include"]
"9" -> "31" [dir=back tooltip="include"]
"9" -> "32" [dir=back tooltip="include"]
"9" -> "33" [dir=back tooltip="include"]
"9" -> "19" [dir=back tooltip="include"]
"9" -> "11" [dir=back tooltip="include"]
"9" -> "36" [dir=back tooltip="include"]
"9" -> "20" [dir=back tooltip="include"]
"9" -> "37" [dir=back tooltip="include"]
"9" -> "35" [dir=back tooltip="include"]
"9" -> "21" [dir=back tooltip="include"]
"9" -> "38" [dir=back tooltip="include"]
"9" -> "39" [dir=back tooltip="include"]
"9" -> "22" [dir=back tooltip="include"]
"9" -> "23" [dir=back tooltip="include"]
"9" -> "41" [dir=back tooltip="include"]
"9" -> "42" [dir=back tooltip="include"]
"9" -> "43" [dir=back tooltip="include"]
"9" -> "40" [dir=back tooltip="include"]
"9" -> "44" [dir=back tooltip="include"]
"9" -> "45" [dir=back tooltip="include"]
"9" -> "25" [dir=back tooltip="include"]
"9" -> "27" [dir=back tooltip="include"]
"9" -> "46" [dir=back tooltip="include"]
"9" -> "47" [dir=back tooltip="include"]
"9" -> "48" [dir=back tooltip="include"]
"9" -> "49" [dir=back tooltip="include"]
"9" -> "50" [dir=back tooltip="include"]
"9" -> "51" [dir=back tooltip="include"]
"9" -> "13" [dir=back tooltip="include"]
"9" -> "16" [dir=back tooltip="include"]
"13" -> "14" [dir=back tooltip="include"]
"13" -> "15" [dir=back tooltip="include"]
"13" -> "17" [dir=back tooltip="include"]
"13" -> "18" [dir=back tooltip="include"]
"13" -> "19" [dir=back tooltip="include"]
"13" -> "20" [dir=back tooltip="include"]
"13" -> "21" [dir=back tooltip="include"]
"13" -> "22" [dir=back tooltip="include"]
"13" -> "23" [dir=back tooltip="include"]
"13" -> "24" [dir=back tooltip="include"]
"13" -> "25" [dir=back tooltip="include"]
"13" -> "27" [dir=back tooltip="include"]
"13" -> "28" [dir=back tooltip="include"]
"13" -> "29" [dir=back tooltip="include"]
"13" -> "16" [dir=back tooltip="include"]
"31" -> "28" [dir=back tooltip="include"]
"37" -> "19" [dir=back tooltip="include"]
"37" -> "21" [dir=back tooltip="include"]
"37" -> "22" [dir=back tooltip="include"]
"33" -> "17" [dir=back tooltip="include"]
"33" -> "18" [dir=back tooltip="include"]
"33" -> "19" [dir=back tooltip="include"]
"33" -> "20" [dir=back tooltip="include"]
"33" -> "34" [dir=back tooltip="include"]
"33" -> "35" [dir=back tooltip="include"]
"33" -> "22" [dir=back tooltip="include"]
}](_images/graphviz-39ed79e0ba07e94a89c7a085df64896631476382.png)
todo
-
namespace config#
Variables
-
constexpr int ENCRYPTION_MODE_MANDATORY = 2#
-
constexpr int ENCRYPTION_MODE_NEVER = 0#
-
constexpr int ENCRYPTION_MODE_OPPORTUNISTIC = 1#
-
struct audio_t#
-
struct input_t#
Public Members
-
bool always_send_scancodes#
-
std::chrono::milliseconds back_button_timeout#
-
bool controller#
-
bool ds4_back_as_touchpad_click#
-
std::string gamepad#
-
bool high_resolution_scrolling#
-
std::chrono::milliseconds key_repeat_delay#
-
std::chrono::duration<double> key_repeat_period#
-
std::unordered_map<int, int> keybindings#
-
bool keyboard#
-
bool motion_as_ds4#
-
bool mouse#
-
bool native_pen_touch#
-
bool touchpad_as_ds4#
-
bool always_send_scancodes#
-
struct nvhttp_t#
-
struct prep_cmd_t#
-
struct stream_t#
-
struct sunshine_t#
Collaboration diagram for config::sunshine_t:
Public Members
-
std::string address_family#
-
struct config::sunshine_t::cmd_t cmd#
-
std::string config_file#
-
std::string credentials_file#
-
std::string locale#
-
std::string log_file#
-
int min_log_level#
-
std::string password#
-
std::uint16_t port#
-
std::vector<prep_cmd_t> prep_cmds#
-
std::string salt#
-
std::string username#
-
struct cmd_t#
-
std::string address_family#
-
struct video_t#
Collaboration diagram for config::video_t:
Public Members
-
std::string adapter_name#
-
int amd_coder#
-
std::optional<int> amd_enforce_hrd#
-
std::optional<int> amd_preanalysis#
-
std::optional<int> amd_quality_av1#
-
std::optional<int> amd_quality_h264#
-
std::optional<int> amd_quality_hevc#
-
std::optional<int> amd_rc_av1#
-
std::optional<int> amd_rc_h264#
-
std::optional<int> amd_rc_hevc#
-
std::optional<int> amd_usage_av1#
-
std::optional<int> amd_usage_h264#
-
std::optional<int> amd_usage_hevc#
-
std::optional<int> amd_vbaq#
-
int aq#
-
int av1_mode#
-
std::string capture#
-
std::string encoder#
-
int h264_coder#
-
int hevc_mode#
-
int min_threads#
-
int multipass#
-
nvenc::nvenc_config nv#
-
bool nv_opengl_vulkan_on_dxgi#
-
bool nv_realtime_hags#
-
bool nv_sunshine_high_power_mode#
-
std::string output_name#
-
int preset#
-
int qp#
-
std::optional<int> qsv_cavlc#
-
std::optional<int> qsv_preset#
-
bool qsv_slow_hevc#
-
std::optional<int> svtav1_preset#
-
std::string sw_preset#
-
std::string sw_tune#
-
int vbv_percentage_increase#
-
int vt_allow_sw#
-
int vt_coder#
-
int vt_realtime#
-
int vt_require_sw#
-
std::string adapter_name#
-
namespace flag#
-
constexpr int ENCRYPTION_MODE_MANDATORY = 2#
confighttp#
Include dependency graph for confighttp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"6" [label="atomic" tooltip="atomic"]
"2" [label="functional" tooltip="functional"]
"4" [label="thread_safe.h" tooltip="thread_safe.h"]
"17" [label="variant" tooltip="variant"]
"3" [label="string" tooltip="string"]
"8" [label="map" tooltip="map"]
"11" [label="utility.h" tooltip="utility.h"]
"15" [label="string_view" tooltip="string_view"]
"7" [label="condition_variable" tooltip="condition_variable"]
"14" [label="optional" tooltip="optional"]
"1" [label="src/confighttp.h" tooltip="src/confighttp.h" fillcolor="#BFBFBF"]
"10" [label="vector" tooltip="vector"]
"5" [label="array" tooltip="array"]
"9" [label="mutex" tooltip="mutex"]
"16" [label="type_traits" tooltip="type_traits"]
"12" [label="algorithm" tooltip="algorithm"]
"13" [label="memory" tooltip="memory"]
"4" -> "5" [dir=forward tooltip="include"]
"4" -> "6" [dir=forward tooltip="include"]
"4" -> "7" [dir=forward tooltip="include"]
"4" -> "2" [dir=forward tooltip="include"]
"4" -> "8" [dir=forward tooltip="include"]
"4" -> "9" [dir=forward tooltip="include"]
"4" -> "10" [dir=forward tooltip="include"]
"4" -> "11" [dir=forward tooltip="include"]
"11" -> "12" [dir=forward tooltip="include"]
"11" -> "7" [dir=forward tooltip="include"]
"11" -> "13" [dir=forward tooltip="include"]
"11" -> "9" [dir=forward tooltip="include"]
"11" -> "14" [dir=forward tooltip="include"]
"11" -> "3" [dir=forward tooltip="include"]
"11" -> "15" [dir=forward tooltip="include"]
"11" -> "16" [dir=forward tooltip="include"]
"11" -> "17" [dir=forward tooltip="include"]
"11" -> "10" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
}](_images/graphviz-666c2c4af19e3326d5cde5a286c40fdb3495c9d5.png)
This graph shows which files directly or indirectly include confighttp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"5" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"1" [label="src/confighttp.h" tooltip="src/confighttp.h" fillcolor="#BFBFBF"]
"3" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"4" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
}](_images/graphviz-8227dcadee2a8ff6b6484037c22b0889ec9e5f47.png)
todo
Defines
-
WEB_DIR#
Variables
-
const std::map<std::string, std::string> mime_types = {{"css", "text/css"}, {"gif", "image/gif"}, {"htm", "text/html"}, {"html", "text/html"}, {"ico", "image/x-icon"}, {"jpeg", "image/jpeg"}, {"jpg", "image/jpeg"}, {"js", "application/javascript"}, {"json", "application/json"}, {"png", "image/png"}, {"svg", "image/svg+xml"}, {"ttf", "font/ttf"}, {"txt", "text/plain"}, {"woff2", "font/woff2"}, {"xml", "text/xml"},}#
crypto#
Include dependency graph for crypto.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="openssl/rand.h" tooltip="openssl/rand.h"]
"16" [label="variant" tooltip="variant"]
"6" [label="openssl/x509.h" tooltip="openssl/x509.h"]
"5" [label="openssl/sha.h" tooltip="openssl/sha.h"]
"13" [label="string" tooltip="string"]
"7" [label="utility.h" tooltip="utility.h"]
"1" [label="src/crypto.h" tooltip="src/crypto.h" fillcolor="#BFBFBF"]
"14" [label="string_view" tooltip="string_view"]
"9" [label="condition_variable" tooltip="condition_variable"]
"12" [label="optional" tooltip="optional"]
"17" [label="vector" tooltip="vector"]
"2" [label="array" tooltip="array"]
"3" [label="openssl/evp.h" tooltip="openssl/evp.h"]
"11" [label="mutex" tooltip="mutex"]
"15" [label="type_traits" tooltip="type_traits"]
"8" [label="algorithm" tooltip="algorithm"]
"10" [label="memory" tooltip="memory"]
"7" -> "8" [dir=forward tooltip="include"]
"7" -> "9" [dir=forward tooltip="include"]
"7" -> "10" [dir=forward tooltip="include"]
"7" -> "11" [dir=forward tooltip="include"]
"7" -> "12" [dir=forward tooltip="include"]
"7" -> "13" [dir=forward tooltip="include"]
"7" -> "14" [dir=forward tooltip="include"]
"7" -> "15" [dir=forward tooltip="include"]
"7" -> "16" [dir=forward tooltip="include"]
"7" -> "17" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "6" [dir=forward tooltip="include"]
"1" -> "7" [dir=forward tooltip="include"]
}](_images/graphviz-44f938e2344d59fabfd30c134d020e27b49a7820.png)
This graph shows which files directly or indirectly include crypto.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"11" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"12" [label="src/stream.h" tooltip="src/stream.h"]
"4" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"3" [label="src/crypto.cpp" tooltip="src/crypto.cpp"]
"1" [label="src/crypto.h" tooltip="src/crypto.h" fillcolor="#BFBFBF"]
"8" [label="src/process.h" tooltip="src/process.h"]
"7" [label="src/config.cpp" tooltip="src/config.cpp"]
"6" [label="src/rtsp.h" tooltip="src/rtsp.h"]
"5" [label="src/process.cpp" tooltip="src/process.cpp"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"10" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"9" [label="src/main.cpp" tooltip="src/main.cpp"]
"12" -> "10" [dir=back tooltip="include"]
"12" -> "11" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
"8" -> "2" [dir=back tooltip="include"]
"8" -> "4" [dir=back tooltip="include"]
"8" -> "9" [dir=back tooltip="include"]
"8" -> "5" [dir=back tooltip="include"]
"8" -> "10" [dir=back tooltip="include"]
"6" -> "7" [dir=back tooltip="include"]
"6" -> "2" [dir=back tooltip="include"]
"6" -> "4" [dir=back tooltip="include"]
"6" -> "8" [dir=back tooltip="include"]
"6" -> "11" [dir=back tooltip="include"]
}](_images/graphviz-9c079c7a98f397cb0ebdf6af40c97214d26b02ce.png)
todo
-
namespace crypto#
Typedefs
-
using aes_t = std::vector<std::uint8_t>#
-
using bignum_t = util::safe_ptr<BIGNUM, BN_free>#
-
using bio_t = util::safe_ptr<BIO, BIO_free_all>#
-
using cipher_ctx_t = util::safe_ptr<EVP_CIPHER_CTX, EVP_CIPHER_CTX_free>#
-
using md_ctx_t = util::safe_ptr<EVP_MD_CTX, md_ctx_destroy>#
-
using pkey_ctx_t = util::safe_ptr<EVP_PKEY_CTX, EVP_PKEY_CTX_free>#
-
using pkey_t = util::safe_ptr<EVP_PKEY, EVP_PKEY_free>#
-
using sha256_t = std::array<std::uint8_t, SHA256_DIGEST_LENGTH>#
-
using x509_store_ctx_t = util::safe_ptr<X509_STORE_CTX, X509_STORE_CTX_free>#
-
using x509_store_t = util::safe_ptr<X509_STORE, X509_STORE_free>#
-
using x509_t = util::safe_ptr<X509, X509_free>#
-
class cert_chain_t#
Public Functions
-
cert_chain_t()#
-
cert_chain_t(cert_chain_t&&) noexcept = default#
-
void clear()#
-
cert_chain_t &operator=(cert_chain_t&&) noexcept = default#
-
const char *verify(x509_t::element_type *cert)#
When certificates from two or more instances of Moonlight have been added to x509_store_t, only one of them will be verified by X509_verify_cert, resulting in only a single instance of Moonlight to be able to use Sunshine
To circumvent this, x509_store_t instance will be created for each instance of the certificates.
-
cert_chain_t()#
-
struct creds_t#
-
namespace cipher#
Functions
-
constexpr std::size_t round_to_pkcs7_padded(std::size_t size)#
Variables
-
constexpr std::size_t tag_size = 16#
-
class cbc_t : public crypto::cipher::cipher_t#
Inheritence diagram for crypto::cipher::cbc_t:
Collaboration diagram for crypto::cipher::cbc_t:
-
class cipher_t#
Inheritence diagram for crypto::cipher::cipher_t:
Collaboration diagram for crypto::cipher::cipher_t:
Subclassed by crypto::cipher::cbc_t, crypto::cipher::ecb_t, crypto::cipher::gcm_t
-
class ecb_t : public crypto::cipher::cipher_t#
Inheritence diagram for crypto::cipher::ecb_t:
Collaboration diagram for crypto::cipher::ecb_t:
-
constexpr std::size_t round_to_pkcs7_padded(std::size_t size)#
-
using aes_t = std::vector<std::uint8_t>#
entry_handler#
Include dependency graph for entry_handler.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="atomic" tooltip="atomic"]
"4" [label="thread_pool.h" tooltip="thread_pool.h"]
"8" [label="functional" tooltip="functional"]
"23" [label="thread_safe.h" tooltip="thread_safe.h"]
"21" [label="variant" tooltip="variant"]
"20" [label="string" tooltip="string"]
"25" [label="map" tooltip="map"]
"15" [label="move_by_copy.h" tooltip="move_by_copy.h"]
"1" [label="src/entry_handler.h" tooltip="src/entry_handler.h" fillcolor="#BFBFBF"]
"16" [label="utility.h" tooltip="utility.h"]
"18" [label="condition_variable" tooltip="condition_variable"]
"3" [label="string_view" tooltip="string_view"]
"9" [label="future" tooltip="future"]
"11" [label="optional" tooltip="optional"]
"14" [label="vector" tooltip="vector"]
"13" [label="utility" tooltip="utility"]
"24" [label="array" tooltip="array"]
"5" [label="task_pool.h" tooltip="task_pool.h"]
"7" [label="deque" tooltip="deque"]
"10" [label="mutex" tooltip="mutex"]
"6" [label="chrono" tooltip="chrono"]
"22" [label="thread" tooltip="thread"]
"12" [label="type_traits" tooltip="type_traits"]
"17" [label="algorithm" tooltip="algorithm"]
"19" [label="memory" tooltip="memory"]
"4" -> "5" [dir=forward tooltip="include"]
"4" -> "22" [dir=forward tooltip="include"]
"23" -> "24" [dir=forward tooltip="include"]
"23" -> "2" [dir=forward tooltip="include"]
"23" -> "18" [dir=forward tooltip="include"]
"23" -> "8" [dir=forward tooltip="include"]
"23" -> "25" [dir=forward tooltip="include"]
"23" -> "10" [dir=forward tooltip="include"]
"23" -> "14" [dir=forward tooltip="include"]
"23" -> "16" [dir=forward tooltip="include"]
"15" -> "13" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "23" [dir=forward tooltip="include"]
"16" -> "17" [dir=forward tooltip="include"]
"16" -> "18" [dir=forward tooltip="include"]
"16" -> "19" [dir=forward tooltip="include"]
"16" -> "10" [dir=forward tooltip="include"]
"16" -> "11" [dir=forward tooltip="include"]
"16" -> "20" [dir=forward tooltip="include"]
"16" -> "3" [dir=forward tooltip="include"]
"16" -> "12" [dir=forward tooltip="include"]
"16" -> "21" [dir=forward tooltip="include"]
"16" -> "14" [dir=forward tooltip="include"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "7" [dir=forward tooltip="include"]
"5" -> "8" [dir=forward tooltip="include"]
"5" -> "9" [dir=forward tooltip="include"]
"5" -> "10" [dir=forward tooltip="include"]
"5" -> "11" [dir=forward tooltip="include"]
"5" -> "12" [dir=forward tooltip="include"]
"5" -> "13" [dir=forward tooltip="include"]
"5" -> "14" [dir=forward tooltip="include"]
"5" -> "15" [dir=forward tooltip="include"]
"5" -> "16" [dir=forward tooltip="include"]
}](_images/graphviz-c55693221cd462bea12b7d79aa1623e9830ac99a.png)
This graph shows which files directly or indirectly include entry_handler.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"14" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"12" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"16" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"10" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"7" [label="src/globals.cpp" tooltip="src/globals.cpp"]
"4" [label="src/globals.h" tooltip="src/globals.h"]
"1" [label="src/entry_handler.h" tooltip="src/entry_handler.h" fillcolor="#BFBFBF"]
"2" [label="src/config.cpp" tooltip="src/config.cpp"]
"11" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"8" [label="src/input.cpp" tooltip="src/input.cpp"]
"3" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"6" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"5" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"13" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"9" [label="src/main.cpp" tooltip="src/main.cpp"]
"15" [label="src/video.cpp" tooltip="src/video.cpp"]
"4" -> "5" [dir=back tooltip="include"]
"4" -> "6" [dir=back tooltip="include"]
"4" -> "3" [dir=back tooltip="include"]
"4" -> "7" [dir=back tooltip="include"]
"4" -> "8" [dir=back tooltip="include"]
"4" -> "9" [dir=back tooltip="include"]
"4" -> "10" [dir=back tooltip="include"]
"4" -> "11" [dir=back tooltip="include"]
"4" -> "12" [dir=back tooltip="include"]
"4" -> "13" [dir=back tooltip="include"]
"4" -> "14" [dir=back tooltip="include"]
"4" -> "15" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"1" -> "16" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
}](_images/graphviz-ca965798a534a5b66dce7218161e96d38e17d0c1.png)
Header file for entry point functions.
Functions
-
void launch_ui()#
Launch the Web UI.
EXAMPLES:
launch_ui();
-
void launch_ui_with_path(std::string path)#
Launch the Web UI at a specific endpoint.
EXAMPLES:
launch_ui_with_path("/pin");
-
namespace args#
-
namespace lifetime#
file_handler#
Include dependency graph for file_handler.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="string" tooltip="string"]
"1" [label="src/file_handler.h" tooltip="src/file_handler.h" fillcolor="#BFBFBF"]
"1" -> "2" [dir=forward tooltip="include"]
}](_images/graphviz-857ac3c782c18a29a2ed94e96e95f01a6c9205ab.png)
This graph shows which files directly or indirectly include file_handler.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"5" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"1" [label="src/file_handler.h" tooltip="src/file_handler.h" fillcolor="#BFBFBF"]
"2" [label="src/config.cpp" tooltip="src/config.cpp"]
"4" [label="src/file_handler.cpp" tooltip="src/file_handler.cpp"]
"6" [label="src/platform/linux/graphics.cpp" tooltip="src/platform/linux/graphics.cpp"]
"3" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
}](_images/graphviz-6f6fc43cf085f577f376937609d0db88b87fc066.png)
Header file for file handling functions.
-
namespace file_handler#
globals#
Include dependency graph for globals.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="atomic" tooltip="atomic"]
"5" [label="thread_pool.h" tooltip="thread_pool.h"]
"9" [label="functional" tooltip="functional"]
"24" [label="thread_safe.h" tooltip="thread_safe.h"]
"22" [label="variant" tooltip="variant"]
"21" [label="string" tooltip="string"]
"26" [label="map" tooltip="map"]
"16" [label="move_by_copy.h" tooltip="move_by_copy.h"]
"1" [label="src/globals.h" tooltip="src/globals.h" fillcolor="#BFBFBF"]
"2" [label="entry_handler.h" tooltip="entry_handler.h"]
"17" [label="utility.h" tooltip="utility.h"]
"19" [label="condition_variable" tooltip="condition_variable"]
"4" [label="string_view" tooltip="string_view"]
"10" [label="future" tooltip="future"]
"12" [label="optional" tooltip="optional"]
"15" [label="vector" tooltip="vector"]
"14" [label="utility" tooltip="utility"]
"25" [label="array" tooltip="array"]
"6" [label="task_pool.h" tooltip="task_pool.h"]
"8" [label="deque" tooltip="deque"]
"11" [label="mutex" tooltip="mutex"]
"7" [label="chrono" tooltip="chrono"]
"23" [label="thread" tooltip="thread"]
"13" [label="type_traits" tooltip="type_traits"]
"18" [label="algorithm" tooltip="algorithm"]
"20" [label="memory" tooltip="memory"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "23" [dir=forward tooltip="include"]
"24" -> "25" [dir=forward tooltip="include"]
"24" -> "3" [dir=forward tooltip="include"]
"24" -> "19" [dir=forward tooltip="include"]
"24" -> "9" [dir=forward tooltip="include"]
"24" -> "26" [dir=forward tooltip="include"]
"24" -> "11" [dir=forward tooltip="include"]
"24" -> "15" [dir=forward tooltip="include"]
"24" -> "17" [dir=forward tooltip="include"]
"16" -> "14" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
"2" -> "24" [dir=forward tooltip="include"]
"17" -> "18" [dir=forward tooltip="include"]
"17" -> "19" [dir=forward tooltip="include"]
"17" -> "20" [dir=forward tooltip="include"]
"17" -> "11" [dir=forward tooltip="include"]
"17" -> "12" [dir=forward tooltip="include"]
"17" -> "21" [dir=forward tooltip="include"]
"17" -> "4" [dir=forward tooltip="include"]
"17" -> "13" [dir=forward tooltip="include"]
"17" -> "22" [dir=forward tooltip="include"]
"17" -> "15" [dir=forward tooltip="include"]
"6" -> "7" [dir=forward tooltip="include"]
"6" -> "8" [dir=forward tooltip="include"]
"6" -> "9" [dir=forward tooltip="include"]
"6" -> "10" [dir=forward tooltip="include"]
"6" -> "11" [dir=forward tooltip="include"]
"6" -> "12" [dir=forward tooltip="include"]
"6" -> "13" [dir=forward tooltip="include"]
"6" -> "14" [dir=forward tooltip="include"]
"6" -> "15" [dir=forward tooltip="include"]
"6" -> "16" [dir=forward tooltip="include"]
"6" -> "17" [dir=forward tooltip="include"]
}](_images/graphviz-4b856bd0aee8376f7bc78d017e1d65a639d60d33.png)
This graph shows which files directly or indirectly include globals.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"12" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"10" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"8" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"5" [label="src/globals.cpp" tooltip="src/globals.cpp"]
"1" [label="src/globals.h" tooltip="src/globals.h" fillcolor="#BFBFBF"]
"9" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"6" [label="src/input.cpp" tooltip="src/input.cpp"]
"4" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"3" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"2" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"11" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"7" [label="src/main.cpp" tooltip="src/main.cpp"]
"13" [label="src/video.cpp" tooltip="src/video.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"1" -> "10" [dir=back tooltip="include"]
"1" -> "11" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
"1" -> "13" [dir=back tooltip="include"]
}](_images/graphviz-d61d3432d5ddceb136b93013df72216d8f75a13d.png)
Header for globally accessible variables and functions.
Defines
-
MAIL(x)#
Variables
-
bool display_cursor#
A boolean flag to indicate whether the cursor should be displayed.
-
thread_pool_util::ThreadPool task_pool#
A thread pool for processing tasks.
-
namespace mail#
Variables
-
constexpr auto audio_packets = std::string_view{"audio_packets"}#
-
constexpr auto broadcast_shutdown = std::string_view{"broadcast_shutdown"}#
-
constexpr auto gamepad_feedback = std::string_view{"gamepad_feedback"}#
-
constexpr auto hdr = std::string_view{"hdr"}#
-
constexpr auto idr = std::string_view{"idr"}#
-
constexpr auto invalidate_ref_frames = std::string_view{"invalidate_ref_frames"}#
-
constexpr auto shutdown = std::string_view{"shutdown"}#
-
constexpr auto switch_display = std::string_view{"switch_display"}#
-
constexpr auto touch_port = std::string_view{"touch_port"}#
-
constexpr auto video_packets = std::string_view{"video_packets"}#
-
constexpr auto audio_packets = std::string_view{"audio_packets"}#
httpcommon#
Include dependency graph for httpcommon.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"19" [label="atomic" tooltip="atomic"]
"20" [label="functional" tooltip="functional"]
"17" [label="thread_safe.h" tooltip="thread_safe.h"]
"15" [label="variant" tooltip="variant"]
"12" [label="string" tooltip="string"]
"21" [label="map" tooltip="map"]
"6" [label="utility.h" tooltip="utility.h"]
"4" [label="boost/asio.hpp" tooltip="boost/asio.hpp"]
"13" [label="string_view" tooltip="string_view"]
"8" [label="condition_variable" tooltip="condition_variable"]
"1" [label="src/httpcommon.h" tooltip="src/httpcommon.h" fillcolor="#BFBFBF"]
"3" [label="tuple" tooltip="tuple"]
"11" [label="optional" tooltip="optional"]
"16" [label="vector" tooltip="vector"]
"18" [label="array" tooltip="array"]
"2" [label="network.h" tooltip="network.h"]
"10" [label="mutex" tooltip="mutex"]
"14" [label="type_traits" tooltip="type_traits"]
"5" [label="enet/enet.h" tooltip="enet/enet.h"]
"7" [label="algorithm" tooltip="algorithm"]
"9" [label="memory" tooltip="memory"]
"17" -> "18" [dir=forward tooltip="include"]
"17" -> "19" [dir=forward tooltip="include"]
"17" -> "8" [dir=forward tooltip="include"]
"17" -> "20" [dir=forward tooltip="include"]
"17" -> "21" [dir=forward tooltip="include"]
"17" -> "10" [dir=forward tooltip="include"]
"17" -> "16" [dir=forward tooltip="include"]
"17" -> "6" [dir=forward tooltip="include"]
"6" -> "7" [dir=forward tooltip="include"]
"6" -> "8" [dir=forward tooltip="include"]
"6" -> "9" [dir=forward tooltip="include"]
"6" -> "10" [dir=forward tooltip="include"]
"6" -> "11" [dir=forward tooltip="include"]
"6" -> "12" [dir=forward tooltip="include"]
"6" -> "13" [dir=forward tooltip="include"]
"6" -> "14" [dir=forward tooltip="include"]
"6" -> "15" [dir=forward tooltip="include"]
"6" -> "16" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "17" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
"2" -> "6" [dir=forward tooltip="include"]
}](_images/graphviz-b3a95e0966ac03e081f80095e15ec9668705dc51.png)
This graph shows which files directly or indirectly include httpcommon.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"1" [label="src/httpcommon.h" tooltip="src/httpcommon.h" fillcolor="#BFBFBF"]
"3" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"5" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
}](_images/graphviz-e40989dffea0dadd02e73ae0b5ef5251812befa3.png)
todo
-
namespace http#
input#
Include dependency graph for input.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"22" [label="atomic" tooltip="atomic"]
"2" [label="functional" tooltip="functional"]
"18" [label="limits" tooltip="limits"]
"16" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"31" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"5" [label="filesystem" tooltip="filesystem"]
"20" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"17" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"30" [label="variant" tooltip="variant"]
"13" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"19" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"1" [label="src/input.h" tooltip="src/input.h" fillcolor="#BFBFBF"]
"7" [label="string" tooltip="string"]
"14" [label="src/logging.h" tooltip="src/logging.h"]
"24" [label="map" tooltip="map"]
"25" [label="utility.h" tooltip="utility.h"]
"28" [label="string_view" tooltip="string_view"]
"23" [label="condition_variable" tooltip="condition_variable"]
"4" [label="bitset" tooltip="bitset"]
"32" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"10" [label="optional" tooltip="optional"]
"12" [label="vector" tooltip="vector"]
"21" [label="array" tooltip="array"]
"8" [label="src/config.h" tooltip="src/config.h"]
"3" [label="platform/common.h" tooltip="platform/common.h"]
"11" [label="unordered_map" tooltip="unordered_map"]
"6" [label="mutex" tooltip="mutex"]
"9" [label="chrono" tooltip="chrono"]
"29" [label="type_traits" tooltip="type_traits"]
"33" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"15" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"26" [label="algorithm" tooltip="algorithm"]
"27" [label="memory" tooltip="memory"]
"31" -> "32" [dir=forward tooltip="include"]
"20" -> "21" [dir=forward tooltip="include"]
"20" -> "22" [dir=forward tooltip="include"]
"20" -> "23" [dir=forward tooltip="include"]
"20" -> "2" [dir=forward tooltip="include"]
"20" -> "24" [dir=forward tooltip="include"]
"20" -> "6" [dir=forward tooltip="include"]
"20" -> "12" [dir=forward tooltip="include"]
"20" -> "25" [dir=forward tooltip="include"]
"17" -> "9" [dir=forward tooltip="include"]
"17" -> "2" [dir=forward tooltip="include"]
"17" -> "18" [dir=forward tooltip="include"]
"17" -> "19" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "20" [dir=forward tooltip="include"]
"14" -> "15" [dir=forward tooltip="include"]
"14" -> "16" [dir=forward tooltip="include"]
"25" -> "26" [dir=forward tooltip="include"]
"25" -> "23" [dir=forward tooltip="include"]
"25" -> "27" [dir=forward tooltip="include"]
"25" -> "6" [dir=forward tooltip="include"]
"25" -> "10" [dir=forward tooltip="include"]
"25" -> "7" [dir=forward tooltip="include"]
"25" -> "28" [dir=forward tooltip="include"]
"25" -> "29" [dir=forward tooltip="include"]
"25" -> "30" [dir=forward tooltip="include"]
"25" -> "12" [dir=forward tooltip="include"]
"8" -> "4" [dir=forward tooltip="include"]
"8" -> "9" [dir=forward tooltip="include"]
"8" -> "10" [dir=forward tooltip="include"]
"8" -> "7" [dir=forward tooltip="include"]
"8" -> "11" [dir=forward tooltip="include"]
"8" -> "12" [dir=forward tooltip="include"]
"8" -> "13" [dir=forward tooltip="include"]
"3" -> "4" [dir=forward tooltip="include"]
"3" -> "5" [dir=forward tooltip="include"]
"3" -> "2" [dir=forward tooltip="include"]
"3" -> "6" [dir=forward tooltip="include"]
"3" -> "7" [dir=forward tooltip="include"]
"3" -> "8" [dir=forward tooltip="include"]
"3" -> "14" [dir=forward tooltip="include"]
"3" -> "17" [dir=forward tooltip="include"]
"3" -> "20" [dir=forward tooltip="include"]
"3" -> "25" [dir=forward tooltip="include"]
"3" -> "31" [dir=forward tooltip="include"]
"3" -> "33" [dir=forward tooltip="include"]
}](_images/graphviz-3c96ac229a66244ca38e07beb60381d7e4db7715.png)
This graph shows which files directly or indirectly include input.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"22" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"14" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"21" [label="src/stream.h" tooltip="src/stream.h"]
"15" [label="src/platform/macos/display.mm" tooltip="src/platform/macos/display.mm"]
"11" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"1" [label="src/input.h" tooltip="src/input.h" fillcolor="#BFBFBF"]
"7" [label="src/nvenc/nvenc_base.h" tooltip="src/nvenc/nvenc_base.h"]
"13" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"3" [label="src/platform/linux/input.cpp" tooltip="src/platform/linux/input.cpp"]
"17" [label="src/platform/windows/display.h" tooltip="src/platform/windows/display.h"]
"19" [label="src/platform/windows/display_base.cpp" tooltip="src/platform/windows/display_base.cpp"]
"16" [label="src/platform/macos/nv12_zero_device.cpp" tooltip="src/platform/macos/nv12_zero_device.cpp"]
"2" [label="src/input.cpp" tooltip="src/input.cpp"]
"10" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"20" [label="src/platform/windows/display_vram.cpp" tooltip="src/platform/windows/display_vram.cpp"]
"5" [label="src/video.h" tooltip="src/video.h"]
"9" [label="src/platform/linux/graphics.cpp" tooltip="src/platform/linux/graphics.cpp"]
"4" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"18" [label="src/platform/windows/display_ram.cpp" tooltip="src/platform/windows/display_ram.cpp"]
"6" [label="src/main.cpp" tooltip="src/main.cpp"]
"8" [label="src/video.cpp" tooltip="src/video.cpp"]
"12" [label="src/platform/linux/vaapi.cpp" tooltip="src/platform/linux/vaapi.cpp"]
"21" -> "4" [dir=back tooltip="include"]
"21" -> "22" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"7" -> "8" [dir=back tooltip="include"]
"17" -> "18" [dir=back tooltip="include"]
"17" -> "19" [dir=back tooltip="include"]
"17" -> "20" [dir=back tooltip="include"]
"5" -> "6" [dir=back tooltip="include"]
"5" -> "7" [dir=back tooltip="include"]
"5" -> "9" [dir=back tooltip="include"]
"5" -> "10" [dir=back tooltip="include"]
"5" -> "11" [dir=back tooltip="include"]
"5" -> "12" [dir=back tooltip="include"]
"5" -> "13" [dir=back tooltip="include"]
"5" -> "14" [dir=back tooltip="include"]
"5" -> "15" [dir=back tooltip="include"]
"5" -> "16" [dir=back tooltip="include"]
"5" -> "17" [dir=back tooltip="include"]
"5" -> "19" [dir=back tooltip="include"]
"5" -> "20" [dir=back tooltip="include"]
"5" -> "21" [dir=back tooltip="include"]
"5" -> "8" [dir=back tooltip="include"]
}](_images/graphviz-d0daf24d7cef2ede9c6605b6d8cee4082ece3b48.png)
todo
logging#
Include dependency graph for logging.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"1" [label="src/logging.h" tooltip="src/logging.h" fillcolor="#BFBFBF"]
"2" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
}](_images/graphviz-307d087904c5f34965aa8ac098c564e225ab64e8.png)
This graph shows which files directly or indirectly include logging.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"33" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"50" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"46" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"25" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"39" [label="src/platform/linux/publish.cpp" tooltip="src/platform/linux/publish.cpp"]
"51" [label="src/platform/windows/publish.cpp" tooltip="src/platform/windows/publish.cpp"]
"32" [label="src/stream.h" tooltip="src/stream.h"]
"26" [label="src/platform/macos/display.mm" tooltip="src/platform/macos/display.mm"]
"22" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"14" [label="src/input.h" tooltip="src/input.h"]
"1" [label="src/logging.h" tooltip="src/logging.h" fillcolor="#BFBFBF"]
"37" [label="src/platform/linux/wayland.h" tooltip="src/platform/linux/wayland.h"]
"47" [label="src/platform/macos/publish.cpp" tooltip="src/platform/macos/publish.cpp"]
"18" [label="src/nvenc/nvenc_base.h" tooltip="src/nvenc/nvenc_base.h"]
"8" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"9" [label="src/logging.cpp" tooltip="src/logging.cpp"]
"54" [label="src/upnp.h" tooltip="src/upnp.h"]
"41" [label="src/platform/linux/x11grab.h" tooltip="src/platform/linux/x11grab.h"]
"24" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"42" [label="src/platform/macos/av_img_t.h" tooltip="src/platform/macos/av_img_t.h"]
"15" [label="src/platform/linux/input.cpp" tooltip="src/platform/linux/input.cpp"]
"53" [label="src/process.h" tooltip="src/process.h"]
"28" [label="src/platform/windows/display.h" tooltip="src/platform/windows/display.h"]
"35" [label="src/platform/linux/audio.cpp" tooltip="src/platform/linux/audio.cpp"]
"3" [label="src/config.cpp" tooltip="src/config.cpp"]
"30" [label="src/platform/windows/display_base.cpp" tooltip="src/platform/windows/display_base.cpp"]
"7" [label="src/file_handler.cpp" tooltip="src/file_handler.cpp"]
"27" [label="src/platform/macos/nv12_zero_device.cpp" tooltip="src/platform/macos/nv12_zero_device.cpp"]
"45" [label="src/platform/macos/input.cpp" tooltip="src/platform/macos/input.cpp"]
"11" [label="src/network.cpp" tooltip="src/network.cpp"]
"49" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"10" [label="src/input.cpp" tooltip="src/input.cpp"]
"21" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"31" [label="src/platform/windows/display_vram.cpp" tooltip="src/platform/windows/display_vram.cpp"]
"43" [label="src/platform/macos/nv12_zero_device.h" tooltip="src/platform/macos/nv12_zero_device.h"]
"13" [label="src/platform/common.h" tooltip="src/platform/common.h"]
"6" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"17" [label="src/video.h" tooltip="src/video.h"]
"38" [label="src/platform/linux/wayland.cpp" tooltip="src/platform/linux/wayland.cpp"]
"20" [label="src/platform/linux/graphics.cpp" tooltip="src/platform/linux/graphics.cpp"]
"34" [label="src/nvenc/nvenc_utils.h" tooltip="src/nvenc/nvenc_utils.h"]
"40" [label="src/platform/linux/vaapi.h" tooltip="src/platform/linux/vaapi.h"]
"52" [label="src/process.cpp" tooltip="src/process.cpp"]
"4" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"2" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"16" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"29" [label="src/platform/windows/display_ram.cpp" tooltip="src/platform/windows/display_ram.cpp"]
"5" [label="src/cbs.cpp" tooltip="src/cbs.cpp"]
"12" [label="src/main.cpp" tooltip="src/main.cpp"]
"36" [label="src/platform/linux/graphics.h" tooltip="src/platform/linux/graphics.h"]
"19" [label="src/video.cpp" tooltip="src/video.cpp"]
"48" [label="src/platform/windows/audio.cpp" tooltip="src/platform/windows/audio.cpp"]
"23" [label="src/platform/linux/vaapi.cpp" tooltip="src/platform/linux/vaapi.cpp"]
"44" [label="src/platform/macos/microphone.mm" tooltip="src/platform/macos/microphone.mm"]
"32" -> "16" [dir=back tooltip="include"]
"32" -> "33" [dir=back tooltip="include"]
"14" -> "10" [dir=back tooltip="include"]
"14" -> "15" [dir=back tooltip="include"]
"14" -> "16" [dir=back tooltip="include"]
"14" -> "17" [dir=back tooltip="include"]
"14" -> "19" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"1" -> "10" [dir=back tooltip="include"]
"1" -> "11" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
"1" -> "13" [dir=back tooltip="include"]
"1" -> "35" [dir=back tooltip="include"]
"1" -> "20" [dir=back tooltip="include"]
"1" -> "36" [dir=back tooltip="include"]
"1" -> "21" [dir=back tooltip="include"]
"1" -> "22" [dir=back tooltip="include"]
"1" -> "15" [dir=back tooltip="include"]
"1" -> "39" [dir=back tooltip="include"]
"1" -> "23" [dir=back tooltip="include"]
"1" -> "38" [dir=back tooltip="include"]
"1" -> "24" [dir=back tooltip="include"]
"1" -> "25" [dir=back tooltip="include"]
"1" -> "26" [dir=back tooltip="include"]
"1" -> "44" [dir=back tooltip="include"]
"1" -> "45" [dir=back tooltip="include"]
"1" -> "46" [dir=back tooltip="include"]
"1" -> "47" [dir=back tooltip="include"]
"1" -> "48" [dir=back tooltip="include"]
"1" -> "29" [dir=back tooltip="include"]
"1" -> "30" [dir=back tooltip="include"]
"1" -> "49" [dir=back tooltip="include"]
"1" -> "31" [dir=back tooltip="include"]
"1" -> "50" [dir=back tooltip="include"]
"1" -> "51" [dir=back tooltip="include"]
"1" -> "52" [dir=back tooltip="include"]
"1" -> "16" [dir=back tooltip="include"]
"1" -> "33" [dir=back tooltip="include"]
"1" -> "19" [dir=back tooltip="include"]
"37" -> "21" [dir=back tooltip="include"]
"37" -> "22" [dir=back tooltip="include"]
"37" -> "38" [dir=back tooltip="include"]
"37" -> "24" [dir=back tooltip="include"]
"18" -> "19" [dir=back tooltip="include"]
"54" -> "12" [dir=back tooltip="include"]
"54" -> "33" [dir=back tooltip="include"]
"41" -> "25" [dir=back tooltip="include"]
"42" -> "26" [dir=back tooltip="include"]
"42" -> "43" [dir=back tooltip="include"]
"53" -> "4" [dir=back tooltip="include"]
"53" -> "8" [dir=back tooltip="include"]
"53" -> "12" [dir=back tooltip="include"]
"53" -> "52" [dir=back tooltip="include"]
"53" -> "16" [dir=back tooltip="include"]
"28" -> "29" [dir=back tooltip="include"]
"28" -> "30" [dir=back tooltip="include"]
"28" -> "31" [dir=back tooltip="include"]
"43" -> "26" [dir=back tooltip="include"]
"43" -> "27" [dir=back tooltip="include"]
"13" -> "2" [dir=back tooltip="include"]
"13" -> "3" [dir=back tooltip="include"]
"13" -> "4" [dir=back tooltip="include"]
"13" -> "6" [dir=back tooltip="include"]
"13" -> "8" [dir=back tooltip="include"]
"13" -> "14" [dir=back tooltip="include"]
"13" -> "10" [dir=back tooltip="include"]
"13" -> "34" [dir=back tooltip="include"]
"13" -> "35" [dir=back tooltip="include"]
"13" -> "36" [dir=back tooltip="include"]
"13" -> "22" [dir=back tooltip="include"]
"13" -> "15" [dir=back tooltip="include"]
"13" -> "39" [dir=back tooltip="include"]
"13" -> "23" [dir=back tooltip="include"]
"13" -> "40" [dir=back tooltip="include"]
"13" -> "38" [dir=back tooltip="include"]
"13" -> "24" [dir=back tooltip="include"]
"13" -> "41" [dir=back tooltip="include"]
"13" -> "42" [dir=back tooltip="include"]
"13" -> "25" [dir=back tooltip="include"]
"13" -> "26" [dir=back tooltip="include"]
"13" -> "44" [dir=back tooltip="include"]
"13" -> "45" [dir=back tooltip="include"]
"13" -> "46" [dir=back tooltip="include"]
"13" -> "43" [dir=back tooltip="include"]
"13" -> "47" [dir=back tooltip="include"]
"13" -> "48" [dir=back tooltip="include"]
"13" -> "28" [dir=back tooltip="include"]
"13" -> "30" [dir=back tooltip="include"]
"13" -> "49" [dir=back tooltip="include"]
"13" -> "50" [dir=back tooltip="include"]
"13" -> "51" [dir=back tooltip="include"]
"13" -> "52" [dir=back tooltip="include"]
"13" -> "53" [dir=back tooltip="include"]
"13" -> "54" [dir=back tooltip="include"]
"13" -> "17" [dir=back tooltip="include"]
"13" -> "19" [dir=back tooltip="include"]
"17" -> "12" [dir=back tooltip="include"]
"17" -> "18" [dir=back tooltip="include"]
"17" -> "20" [dir=back tooltip="include"]
"17" -> "21" [dir=back tooltip="include"]
"17" -> "22" [dir=back tooltip="include"]
"17" -> "23" [dir=back tooltip="include"]
"17" -> "24" [dir=back tooltip="include"]
"17" -> "25" [dir=back tooltip="include"]
"17" -> "26" [dir=back tooltip="include"]
"17" -> "27" [dir=back tooltip="include"]
"17" -> "28" [dir=back tooltip="include"]
"17" -> "30" [dir=back tooltip="include"]
"17" -> "31" [dir=back tooltip="include"]
"17" -> "32" [dir=back tooltip="include"]
"17" -> "19" [dir=back tooltip="include"]
"34" -> "31" [dir=back tooltip="include"]
"40" -> "22" [dir=back tooltip="include"]
"40" -> "24" [dir=back tooltip="include"]
"40" -> "25" [dir=back tooltip="include"]
"36" -> "20" [dir=back tooltip="include"]
"36" -> "21" [dir=back tooltip="include"]
"36" -> "22" [dir=back tooltip="include"]
"36" -> "23" [dir=back tooltip="include"]
"36" -> "37" [dir=back tooltip="include"]
"36" -> "38" [dir=back tooltip="include"]
"36" -> "25" [dir=back tooltip="include"]
}](_images/graphviz-b1648f674f8c0363f6d0874927fc9c5b0001bae0.png)
Logging header file for the Sunshine application.
Typedefs
-
using text_sink = boost::log::sinks::asynchronous_sink<boost::log::sinks::text_ostream_backend>#
Variables
-
boost::log::sources::severity_logger<int> debug#
-
boost::log::sources::severity_logger<int> error#
-
boost::log::sources::severity_logger<int> fatal#
-
boost::log::sources::severity_logger<int> info#
-
boost::log::sources::severity_logger<int> verbose#
-
boost::log::sources::severity_logger<int> warning#
main#
This graph shows which files directly or indirectly include main.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="src/main.h" tooltip="src/main.h" fillcolor="#BFBFBF"]
"2" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
}](_images/graphviz-dadea5fd7d05813d9b6e9016442cd445b4022da3.png)
Main header file for the Sunshine application.
Functions
-
int main(int argc, char *argv[])#
Main application entry point.
EXAMPLES:
main(1, const char* args[] = {"sunshine", nullptr});
- Parameters:
argc – The number of arguments.
argv – The arguments.
move_by_copy#
Include dependency graph for move_by_copy.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="src/move_by_copy.h" tooltip="src/move_by_copy.h" fillcolor="#BFBFBF"]
"2" [label="utility" tooltip="utility"]
"1" -> "2" [dir=forward tooltip="include"]
}](_images/graphviz-6bf92d929b1320f99799e660ac960aecac417434.png)
This graph shows which files directly or indirectly include move_by_copy.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"17" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"15" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"19" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"4" [label="src/thread_pool.h" tooltip="src/thread_pool.h"]
"3" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"11" [label="src/globals.cpp" tooltip="src/globals.cpp"]
"1" [label="src/move_by_copy.h" tooltip="src/move_by_copy.h" fillcolor="#BFBFBF"]
"8" [label="src/globals.h" tooltip="src/globals.h"]
"5" [label="src/entry_handler.h" tooltip="src/entry_handler.h"]
"6" [label="src/config.cpp" tooltip="src/config.cpp"]
"14" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"12" [label="src/input.cpp" tooltip="src/input.cpp"]
"7" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"2" [label="src/task_pool.h" tooltip="src/task_pool.h"]
"10" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"9" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"16" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"13" [label="src/main.cpp" tooltip="src/main.cpp"]
"18" [label="src/video.cpp" tooltip="src/video.cpp"]
"4" -> "5" [dir=back tooltip="include"]
"4" -> "8" [dir=back tooltip="include"]
"4" -> "12" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"8" -> "9" [dir=back tooltip="include"]
"8" -> "10" [dir=back tooltip="include"]
"8" -> "7" [dir=back tooltip="include"]
"8" -> "11" [dir=back tooltip="include"]
"8" -> "12" [dir=back tooltip="include"]
"8" -> "13" [dir=back tooltip="include"]
"8" -> "3" [dir=back tooltip="include"]
"8" -> "14" [dir=back tooltip="include"]
"8" -> "15" [dir=back tooltip="include"]
"8" -> "16" [dir=back tooltip="include"]
"8" -> "17" [dir=back tooltip="include"]
"8" -> "18" [dir=back tooltip="include"]
"5" -> "6" [dir=back tooltip="include"]
"5" -> "7" [dir=back tooltip="include"]
"5" -> "8" [dir=back tooltip="include"]
"5" -> "13" [dir=back tooltip="include"]
"5" -> "19" [dir=back tooltip="include"]
"5" -> "15" [dir=back tooltip="include"]
"2" -> "3" [dir=back tooltip="include"]
"2" -> "4" [dir=back tooltip="include"]
}](_images/graphviz-97e3db7f33d0169a9a596bff8dd3833dd3541c8d.png)
todo
-
namespace move_by_copy_util#
Functions
-
template<class T>
MoveByCopy<T> cmove(T &movable)#
-
template<class T>
MoveByCopy<T> const_cmove(const T &movable)#
-
template<class T>
class MoveByCopy# - #include <src/move_by_copy.h>
When a copy is made, it moves the object This allows you to move an object when a move can’t be done.
Public Functions
-
inline MoveByCopy(const MoveByCopy &other)#
-
MoveByCopy(MoveByCopy &&other) = default#
-
inline MoveByCopy &operator=(const MoveByCopy &other)#
-
MoveByCopy &operator=(MoveByCopy &&other) = default#
-
inline MoveByCopy(const MoveByCopy &other)#
-
template<class T>
network#
Include dependency graph for network.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"14" [label="variant" tooltip="variant"]
"11" [label="string" tooltip="string"]
"5" [label="utility.h" tooltip="utility.h"]
"3" [label="boost/asio.hpp" tooltip="boost/asio.hpp"]
"12" [label="string_view" tooltip="string_view"]
"7" [label="condition_variable" tooltip="condition_variable"]
"2" [label="tuple" tooltip="tuple"]
"10" [label="optional" tooltip="optional"]
"15" [label="vector" tooltip="vector"]
"1" [label="src/network.h" tooltip="src/network.h" fillcolor="#BFBFBF"]
"9" [label="mutex" tooltip="mutex"]
"13" [label="type_traits" tooltip="type_traits"]
"4" [label="enet/enet.h" tooltip="enet/enet.h"]
"6" [label="algorithm" tooltip="algorithm"]
"8" [label="memory" tooltip="memory"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "7" [dir=forward tooltip="include"]
"5" -> "8" [dir=forward tooltip="include"]
"5" -> "9" [dir=forward tooltip="include"]
"5" -> "10" [dir=forward tooltip="include"]
"5" -> "11" [dir=forward tooltip="include"]
"5" -> "12" [dir=forward tooltip="include"]
"5" -> "13" [dir=forward tooltip="include"]
"5" -> "14" [dir=forward tooltip="include"]
"5" -> "15" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
}](_images/graphviz-cdabdd1bc1584bdf852a4848540ede703a160141.png)
This graph shows which files directly or indirectly include network.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"12" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"8" [label="src/platform/linux/publish.cpp" tooltip="src/platform/linux/publish.cpp"]
"10" [label="src/platform/windows/publish.cpp" tooltip="src/platform/windows/publish.cpp"]
"9" [label="src/platform/macos/publish.cpp" tooltip="src/platform/macos/publish.cpp"]
"5" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"4" [label="src/httpcommon.h" tooltip="src/httpcommon.h"]
"7" [label="src/network.cpp" tooltip="src/network.cpp"]
"3" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"1" [label="src/network.h" tooltip="src/network.h" fillcolor="#BFBFBF"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"11" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"6" [label="src/main.cpp" tooltip="src/main.cpp"]
"4" -> "2" [dir=back tooltip="include"]
"4" -> "3" [dir=back tooltip="include"]
"4" -> "5" [dir=back tooltip="include"]
"4" -> "6" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"1" -> "10" [dir=back tooltip="include"]
"1" -> "11" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
}](_images/graphviz-57617f10e42bcca4f91c31f87fef892eccac889e.png)
todo
nvhttp#
Include dependency graph for nvhttp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"5" [label="atomic" tooltip="atomic"]
"7" [label="functional" tooltip="functional"]
"3" [label="thread_safe.h" tooltip="thread_safe.h"]
"17" [label="variant" tooltip="variant"]
"2" [label="string" tooltip="string"]
"1" [label="src/nvhttp.h" tooltip="src/nvhttp.h" fillcolor="#BFBFBF"]
"8" [label="map" tooltip="map"]
"11" [label="utility.h" tooltip="utility.h"]
"15" [label="string_view" tooltip="string_view"]
"6" [label="condition_variable" tooltip="condition_variable"]
"14" [label="optional" tooltip="optional"]
"10" [label="vector" tooltip="vector"]
"4" [label="array" tooltip="array"]
"9" [label="mutex" tooltip="mutex"]
"16" [label="type_traits" tooltip="type_traits"]
"12" [label="algorithm" tooltip="algorithm"]
"13" [label="memory" tooltip="memory"]
"3" -> "4" [dir=forward tooltip="include"]
"3" -> "5" [dir=forward tooltip="include"]
"3" -> "6" [dir=forward tooltip="include"]
"3" -> "7" [dir=forward tooltip="include"]
"3" -> "8" [dir=forward tooltip="include"]
"3" -> "9" [dir=forward tooltip="include"]
"3" -> "10" [dir=forward tooltip="include"]
"3" -> "11" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"11" -> "12" [dir=forward tooltip="include"]
"11" -> "6" [dir=forward tooltip="include"]
"11" -> "13" [dir=forward tooltip="include"]
"11" -> "9" [dir=forward tooltip="include"]
"11" -> "14" [dir=forward tooltip="include"]
"11" -> "2" [dir=forward tooltip="include"]
"11" -> "15" [dir=forward tooltip="include"]
"11" -> "16" [dir=forward tooltip="include"]
"11" -> "17" [dir=forward tooltip="include"]
"11" -> "10" [dir=forward tooltip="include"]
}](_images/graphviz-7330a962cc8c055d641d06a802aab2fef14942c1.png)
This graph shows which files directly or indirectly include nvhttp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"9" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"6" [label="src/platform/linux/publish.cpp" tooltip="src/platform/linux/publish.cpp"]
"8" [label="src/platform/windows/publish.cpp" tooltip="src/platform/windows/publish.cpp"]
"1" [label="src/nvhttp.h" tooltip="src/nvhttp.h" fillcolor="#BFBFBF"]
"7" [label="src/platform/macos/publish.cpp" tooltip="src/platform/macos/publish.cpp"]
"4" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"2" [label="src/config.cpp" tooltip="src/config.cpp"]
"3" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"5" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
}](_images/graphviz-d2e2d731da177004b5341a82dc1a3d6933267bf0.png)
todo
-
namespace nvhttp#
This namespace contains all the functions and variables related to the nvhttp (GameStream) server.
Variables
-
constexpr auto GFE_VERSION = "3.23.0.74"#
The GFE version we are replicating.
-
constexpr auto PORT_HTTP = 0#
The HTTP port, as a difference from the config port.
-
constexpr auto PORT_HTTPS = -5#
The HTTPS port, as a difference from the config port.
-
constexpr auto VERSION = "7.1.431.-1"#
The protocol version.
The version of the GameStream protocol we are mocking.
Note
The negative 4th number indicates to Moonlight that this is Sunshine.
-
constexpr auto GFE_VERSION = "3.23.0.74"#
process#
Include dependency graph for process.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"23" [label="atomic" tooltip="atomic"]
"13" [label="functional" tooltip="functional"]
"19" [label="limits" tooltip="limits"]
"17" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"38" [label="openssl/rand.h" tooltip="openssl/rand.h"]
"32" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"12" [label="filesystem" tooltip="filesystem"]
"21" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"18" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"31" [label="variant" tooltip="variant"]
"10" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"40" [label="openssl/x509.h" tooltip="openssl/x509.h"]
"20" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"39" [label="openssl/sha.h" tooltip="openssl/sha.h"]
"8" [label="string" tooltip="string"]
"15" [label="src/logging.h" tooltip="src/logging.h"]
"25" [label="map" tooltip="map"]
"26" [label="utility.h" tooltip="utility.h"]
"36" [label="crypto.h" tooltip="crypto.h"]
"1" [label="src/process.h" tooltip="src/process.h" fillcolor="#BFBFBF"]
"29" [label="string_view" tooltip="string_view"]
"24" [label="condition_variable" tooltip="condition_variable"]
"6" [label="bitset" tooltip="bitset"]
"33" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"2" [label="optional" tooltip="optional"]
"9" [label="vector" tooltip="vector"]
"22" [label="array" tooltip="array"]
"4" [label="boost/process.hpp" tooltip="boost/process.hpp"]
"5" [label="config.h" tooltip="config.h"]
"37" [label="openssl/evp.h" tooltip="openssl/evp.h"]
"11" [label="platform/common.h" tooltip="platform/common.h"]
"35" [label="rtsp.h" tooltip="rtsp.h"]
"3" [label="unordered_map" tooltip="unordered_map"]
"14" [label="mutex" tooltip="mutex"]
"7" [label="chrono" tooltip="chrono"]
"30" [label="type_traits" tooltip="type_traits"]
"34" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"16" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"27" [label="algorithm" tooltip="algorithm"]
"28" [label="memory" tooltip="memory"]
"32" -> "33" [dir=forward tooltip="include"]
"21" -> "22" [dir=forward tooltip="include"]
"21" -> "23" [dir=forward tooltip="include"]
"21" -> "24" [dir=forward tooltip="include"]
"21" -> "13" [dir=forward tooltip="include"]
"21" -> "25" [dir=forward tooltip="include"]
"21" -> "14" [dir=forward tooltip="include"]
"21" -> "9" [dir=forward tooltip="include"]
"21" -> "26" [dir=forward tooltip="include"]
"18" -> "7" [dir=forward tooltip="include"]
"18" -> "13" [dir=forward tooltip="include"]
"18" -> "19" [dir=forward tooltip="include"]
"18" -> "20" [dir=forward tooltip="include"]
"15" -> "16" [dir=forward tooltip="include"]
"15" -> "17" [dir=forward tooltip="include"]
"26" -> "27" [dir=forward tooltip="include"]
"26" -> "24" [dir=forward tooltip="include"]
"26" -> "28" [dir=forward tooltip="include"]
"26" -> "14" [dir=forward tooltip="include"]
"26" -> "2" [dir=forward tooltip="include"]
"26" -> "8" [dir=forward tooltip="include"]
"26" -> "29" [dir=forward tooltip="include"]
"26" -> "30" [dir=forward tooltip="include"]
"26" -> "31" [dir=forward tooltip="include"]
"26" -> "9" [dir=forward tooltip="include"]
"36" -> "22" [dir=forward tooltip="include"]
"36" -> "37" [dir=forward tooltip="include"]
"36" -> "38" [dir=forward tooltip="include"]
"36" -> "39" [dir=forward tooltip="include"]
"36" -> "40" [dir=forward tooltip="include"]
"36" -> "26" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "11" [dir=forward tooltip="include"]
"1" -> "35" [dir=forward tooltip="include"]
"1" -> "26" [dir=forward tooltip="include"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "7" [dir=forward tooltip="include"]
"5" -> "2" [dir=forward tooltip="include"]
"5" -> "8" [dir=forward tooltip="include"]
"5" -> "3" [dir=forward tooltip="include"]
"5" -> "9" [dir=forward tooltip="include"]
"5" -> "10" [dir=forward tooltip="include"]
"11" -> "6" [dir=forward tooltip="include"]
"11" -> "12" [dir=forward tooltip="include"]
"11" -> "13" [dir=forward tooltip="include"]
"11" -> "14" [dir=forward tooltip="include"]
"11" -> "8" [dir=forward tooltip="include"]
"11" -> "5" [dir=forward tooltip="include"]
"11" -> "15" [dir=forward tooltip="include"]
"11" -> "18" [dir=forward tooltip="include"]
"11" -> "21" [dir=forward tooltip="include"]
"11" -> "26" [dir=forward tooltip="include"]
"11" -> "32" [dir=forward tooltip="include"]
"11" -> "34" [dir=forward tooltip="include"]
"35" -> "23" [dir=forward tooltip="include"]
"35" -> "36" [dir=forward tooltip="include"]
"35" -> "21" [dir=forward tooltip="include"]
}](_images/graphviz-f02dc1bf6fa6be3a88dc25a7122fc98236eb51b8.png)
This graph shows which files directly or indirectly include process.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"1" [label="src/process.h" tooltip="src/process.h" fillcolor="#BFBFBF"]
"5" [label="src/process.cpp" tooltip="src/process.cpp"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"6" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"4" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
}](_images/graphviz-e6e81d81852b192ab792508c2e1cc69cef620f7d.png)
todo
Defines
-
__kernel_entry#
-
namespace proc#
-
-
struct ctx_t#
- #include <src/process.h>
pre_cmds — guaranteed to be executed unless any of the commands fail. detached — commands detached from Sunshine cmd — Runs indefinitely until: No session is running and a different set of commands it to be executed Command exits working_dir — the process working directory. This is required for some games to run properly. cmd_output — empty — The output of the commands are appended to the output of sunshine “null” — The output of the commands are discarded filename — The output of the commands are appended to filename
Public Members
-
bool auto_detach#
-
std::string cmd#
-
std::vector<std::string> detached#
Some applications, such as Steam, either exit quickly, or keep running indefinitely.
Apps that launch normal child processes and terminate will be handled by the process grouping logic (wait_all). However, apps that launch child processes indirectly or into another process group (such as UWP apps) can only be handled by the auto-detach heuristic which catches processes that exit 0 very quickly, but we won’t have proper process tracking for those.
For cases where users just want to kick off a background process and never manage the lifetime of that process, they can use detached commands for that.
-
bool elevated#
-
std::chrono::seconds exit_timeout#
-
std::string id#
-
std::string image_path#
-
std::string name#
-
std::string output#
-
bool wait_all#
-
std::string working_dir#
-
bool auto_detach#
-
struct ctx_t#
round_robin#
Include dependency graph for round_robin.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="iterator" tooltip="iterator"]
"1" [label="src/round_robin.h" tooltip="src/round_robin.h" fillcolor="#BFBFBF"]
"1" -> "2" [dir=forward tooltip="include"]
}](_images/graphviz-0a22f1b88a12fc9bffdd40efae9ed91b2eaa65a6.png)
This graph shows which files directly or indirectly include round_robin.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"1" [label="src/round_robin.h" tooltip="src/round_robin.h" fillcolor="#BFBFBF"]
"3" [label="src/platform/linux/wayland.cpp" tooltip="src/platform/linux/wayland.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-93e3c722857c058a02f6f8626143bc0c0de85c8c.png)
todo
-
namespace round_robin_util#
-
-
template<class V, class T>
class it_wrap_t# Public Types
-
typedef std::ptrdiff_t diff_t#
-
using iterator_category = std::random_access_iterator_tag#
-
typedef std::ptrdiff_t diff_t#
-
template<class V, class It>
class round_robin_t : public round_robin_util::it_wrap_t<V, round_robin_t<V, It>># Inheritence diagram for round_robin_util::round_robin_t:
Collaboration diagram for round_robin_util::round_robin_t:
Public Functions
-
inline void dec()#
-
inline bool eq(const round_robin_t &other) const#
-
inline void inc()#
-
inline void dec()#
-
template<class V, class T>
rtsp#
Include dependency graph for rtsp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="atomic" tooltip="atomic"]
"21" [label="functional" tooltip="functional"]
"6" [label="openssl/rand.h" tooltip="openssl/rand.h"]
"20" [label="thread_safe.h" tooltip="thread_safe.h"]
"18" [label="variant" tooltip="variant"]
"8" [label="openssl/x509.h" tooltip="openssl/x509.h"]
"7" [label="openssl/sha.h" tooltip="openssl/sha.h"]
"15" [label="string" tooltip="string"]
"22" [label="map" tooltip="map"]
"9" [label="utility.h" tooltip="utility.h"]
"3" [label="crypto.h" tooltip="crypto.h"]
"16" [label="string_view" tooltip="string_view"]
"11" [label="condition_variable" tooltip="condition_variable"]
"14" [label="optional" tooltip="optional"]
"19" [label="vector" tooltip="vector"]
"4" [label="array" tooltip="array"]
"5" [label="openssl/evp.h" tooltip="openssl/evp.h"]
"1" [label="src/rtsp.h" tooltip="src/rtsp.h" fillcolor="#BFBFBF"]
"13" [label="mutex" tooltip="mutex"]
"17" [label="type_traits" tooltip="type_traits"]
"10" [label="algorithm" tooltip="algorithm"]
"12" [label="memory" tooltip="memory"]
"20" -> "4" [dir=forward tooltip="include"]
"20" -> "2" [dir=forward tooltip="include"]
"20" -> "11" [dir=forward tooltip="include"]
"20" -> "21" [dir=forward tooltip="include"]
"20" -> "22" [dir=forward tooltip="include"]
"20" -> "13" [dir=forward tooltip="include"]
"20" -> "19" [dir=forward tooltip="include"]
"20" -> "9" [dir=forward tooltip="include"]
"9" -> "10" [dir=forward tooltip="include"]
"9" -> "11" [dir=forward tooltip="include"]
"9" -> "12" [dir=forward tooltip="include"]
"9" -> "13" [dir=forward tooltip="include"]
"9" -> "14" [dir=forward tooltip="include"]
"9" -> "15" [dir=forward tooltip="include"]
"9" -> "16" [dir=forward tooltip="include"]
"9" -> "17" [dir=forward tooltip="include"]
"9" -> "18" [dir=forward tooltip="include"]
"9" -> "19" [dir=forward tooltip="include"]
"3" -> "4" [dir=forward tooltip="include"]
"3" -> "5" [dir=forward tooltip="include"]
"3" -> "6" [dir=forward tooltip="include"]
"3" -> "7" [dir=forward tooltip="include"]
"3" -> "8" [dir=forward tooltip="include"]
"3" -> "9" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "20" [dir=forward tooltip="include"]
}](_images/graphviz-8d4585a87471b10f028d33044774414460d99935.png)
This graph shows which files directly or indirectly include rtsp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"9" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"4" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"5" [label="src/process.h" tooltip="src/process.h"]
"2" [label="src/config.cpp" tooltip="src/config.cpp"]
"1" [label="src/rtsp.h" tooltip="src/rtsp.h" fillcolor="#BFBFBF"]
"7" [label="src/process.cpp" tooltip="src/process.cpp"]
"3" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"8" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"6" [label="src/main.cpp" tooltip="src/main.cpp"]
"5" -> "3" [dir=back tooltip="include"]
"5" -> "4" [dir=back tooltip="include"]
"5" -> "6" [dir=back tooltip="include"]
"5" -> "7" [dir=back tooltip="include"]
"5" -> "8" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
}](_images/graphviz-71c0f42c53fb5698f1d9075b0cd766daaadae20b.png)
todo
stream#
Include dependency graph for stream.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"6" [label="atomic" tooltip="atomic"]
"8" [label="functional" tooltip="functional"]
"38" [label="limits" tooltip="limits"]
"36" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"40" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"22" [label="openssl/rand.h" tooltip="openssl/rand.h"]
"29" [label="filesystem" tooltip="filesystem"]
"4" [label="thread_safe.h" tooltip="thread_safe.h"]
"37" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"1" [label="src/stream.h" tooltip="src/stream.h" fillcolor="#BFBFBF"]
"19" [label="variant" tooltip="variant"]
"33" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"24" [label="openssl/x509.h" tooltip="openssl/x509.h"]
"39" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"23" [label="openssl/sha.h" tooltip="openssl/sha.h"]
"26" [label="input.h" tooltip="input.h"]
"16" [label="string" tooltip="string"]
"34" [label="src/logging.h" tooltip="src/logging.h"]
"9" [label="map" tooltip="map"]
"12" [label="utility.h" tooltip="utility.h"]
"20" [label="crypto.h" tooltip="crypto.h"]
"2" [label="boost/asio.hpp" tooltip="boost/asio.hpp"]
"17" [label="string_view" tooltip="string_view"]
"7" [label="condition_variable" tooltip="condition_variable"]
"28" [label="bitset" tooltip="bitset"]
"41" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"15" [label="optional" tooltip="optional"]
"44" [label="libswscale/swscale.h" tooltip="libswscale/swscale.h"]
"11" [label="vector" tooltip="vector"]
"3" [label="audio.h" tooltip="audio.h"]
"5" [label="array" tooltip="array"]
"43" [label="libavcodec/avcodec.h" tooltip="libavcodec/avcodec.h"]
"30" [label="src/config.h" tooltip="src/config.h"]
"21" [label="openssl/evp.h" tooltip="openssl/evp.h"]
"27" [label="platform/common.h" tooltip="platform/common.h"]
"25" [label="video.h" tooltip="video.h"]
"32" [label="unordered_map" tooltip="unordered_map"]
"10" [label="mutex" tooltip="mutex"]
"31" [label="chrono" tooltip="chrono"]
"18" [label="type_traits" tooltip="type_traits"]
"42" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"35" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"13" [label="algorithm" tooltip="algorithm"]
"14" [label="memory" tooltip="memory"]
"40" -> "41" [dir=forward tooltip="include"]
"4" -> "5" [dir=forward tooltip="include"]
"4" -> "6" [dir=forward tooltip="include"]
"4" -> "7" [dir=forward tooltip="include"]
"4" -> "8" [dir=forward tooltip="include"]
"4" -> "9" [dir=forward tooltip="include"]
"4" -> "10" [dir=forward tooltip="include"]
"4" -> "11" [dir=forward tooltip="include"]
"4" -> "12" [dir=forward tooltip="include"]
"37" -> "31" [dir=forward tooltip="include"]
"37" -> "8" [dir=forward tooltip="include"]
"37" -> "38" [dir=forward tooltip="include"]
"37" -> "39" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "20" [dir=forward tooltip="include"]
"1" -> "25" [dir=forward tooltip="include"]
"26" -> "8" [dir=forward tooltip="include"]
"26" -> "27" [dir=forward tooltip="include"]
"26" -> "4" [dir=forward tooltip="include"]
"34" -> "35" [dir=forward tooltip="include"]
"34" -> "36" [dir=forward tooltip="include"]
"12" -> "13" [dir=forward tooltip="include"]
"12" -> "7" [dir=forward tooltip="include"]
"12" -> "14" [dir=forward tooltip="include"]
"12" -> "10" [dir=forward tooltip="include"]
"12" -> "15" [dir=forward tooltip="include"]
"12" -> "16" [dir=forward tooltip="include"]
"12" -> "17" [dir=forward tooltip="include"]
"12" -> "18" [dir=forward tooltip="include"]
"12" -> "19" [dir=forward tooltip="include"]
"12" -> "11" [dir=forward tooltip="include"]
"20" -> "5" [dir=forward tooltip="include"]
"20" -> "21" [dir=forward tooltip="include"]
"20" -> "22" [dir=forward tooltip="include"]
"20" -> "23" [dir=forward tooltip="include"]
"20" -> "24" [dir=forward tooltip="include"]
"20" -> "12" [dir=forward tooltip="include"]
"3" -> "4" [dir=forward tooltip="include"]
"3" -> "12" [dir=forward tooltip="include"]
"30" -> "28" [dir=forward tooltip="include"]
"30" -> "31" [dir=forward tooltip="include"]
"30" -> "15" [dir=forward tooltip="include"]
"30" -> "16" [dir=forward tooltip="include"]
"30" -> "32" [dir=forward tooltip="include"]
"30" -> "11" [dir=forward tooltip="include"]
"30" -> "33" [dir=forward tooltip="include"]
"27" -> "28" [dir=forward tooltip="include"]
"27" -> "29" [dir=forward tooltip="include"]
"27" -> "8" [dir=forward tooltip="include"]
"27" -> "10" [dir=forward tooltip="include"]
"27" -> "16" [dir=forward tooltip="include"]
"27" -> "30" [dir=forward tooltip="include"]
"27" -> "34" [dir=forward tooltip="include"]
"27" -> "37" [dir=forward tooltip="include"]
"27" -> "4" [dir=forward tooltip="include"]
"27" -> "12" [dir=forward tooltip="include"]
"27" -> "40" [dir=forward tooltip="include"]
"27" -> "42" [dir=forward tooltip="include"]
"25" -> "26" [dir=forward tooltip="include"]
"25" -> "27" [dir=forward tooltip="include"]
"25" -> "4" [dir=forward tooltip="include"]
"25" -> "40" [dir=forward tooltip="include"]
"25" -> "43" [dir=forward tooltip="include"]
"25" -> "44" [dir=forward tooltip="include"]
}](_images/graphviz-45dca84aa2857bd196556c726d6bc2f1c9cb25cc.png)
This graph shows which files directly or indirectly include stream.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"1" [label="src/stream.h" tooltip="src/stream.h" fillcolor="#BFBFBF"]
"2" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-595c880e9c08deb91fcf448677dd1f46b48549c7.png)
todo
sync#
Include dependency graph for sync.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="utility" tooltip="utility"]
"2" [label="array" tooltip="array"]
"3" [label="mutex" tooltip="mutex"]
"1" [label="src/sync.h" tooltip="src/sync.h" fillcolor="#BFBFBF"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
}](_images/graphviz-e91d14e36c9924f2ddfb69ffe9d1e2ceae865d34.png)
This graph shows which files directly or indirectly include sync.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"3" [label="src/video.cpp" tooltip="src/video.cpp"]
"1" [label="src/sync.h" tooltip="src/sync.h" fillcolor="#BFBFBF"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-6b146f5f10e4bf050a552c0997dfcb65dffe3160.png)
todo
system_tray#
This graph shows which files directly or indirectly include system_tray.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="src/system_tray.h" tooltip="src/system_tray.h" fillcolor="#BFBFBF"]
"3" [label="src/process.cpp" tooltip="src/process.cpp"]
"4" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"2" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
}](_images/graphviz-0faa8481006ef4ea4672efbc011fee5c37d187ce.png)
todo
-
namespace system_tray#
task_pool#
Include dependency graph for task_pool.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="functional" tooltip="functional"]
"18" [label="variant" tooltip="variant"]
"16" [label="string" tooltip="string"]
"11" [label="move_by_copy.h" tooltip="move_by_copy.h"]
"12" [label="utility.h" tooltip="utility.h"]
"17" [label="string_view" tooltip="string_view"]
"14" [label="condition_variable" tooltip="condition_variable"]
"5" [label="future" tooltip="future"]
"7" [label="optional" tooltip="optional"]
"10" [label="vector" tooltip="vector"]
"9" [label="utility" tooltip="utility"]
"1" [label="src/task_pool.h" tooltip="src/task_pool.h" fillcolor="#BFBFBF"]
"3" [label="deque" tooltip="deque"]
"6" [label="mutex" tooltip="mutex"]
"2" [label="chrono" tooltip="chrono"]
"8" [label="type_traits" tooltip="type_traits"]
"13" [label="algorithm" tooltip="algorithm"]
"15" [label="memory" tooltip="memory"]
"11" -> "9" [dir=forward tooltip="include"]
"12" -> "13" [dir=forward tooltip="include"]
"12" -> "14" [dir=forward tooltip="include"]
"12" -> "15" [dir=forward tooltip="include"]
"12" -> "6" [dir=forward tooltip="include"]
"12" -> "7" [dir=forward tooltip="include"]
"12" -> "16" [dir=forward tooltip="include"]
"12" -> "17" [dir=forward tooltip="include"]
"12" -> "8" [dir=forward tooltip="include"]
"12" -> "18" [dir=forward tooltip="include"]
"12" -> "10" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "6" [dir=forward tooltip="include"]
"1" -> "7" [dir=forward tooltip="include"]
"1" -> "8" [dir=forward tooltip="include"]
"1" -> "9" [dir=forward tooltip="include"]
"1" -> "10" [dir=forward tooltip="include"]
"1" -> "11" [dir=forward tooltip="include"]
"1" -> "12" [dir=forward tooltip="include"]
}](_images/graphviz-a2f7941548c584310288f15493c288b1b4f35927.png)
This graph shows which files directly or indirectly include task_pool.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"16" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"14" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"18" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"3" [label="src/thread_pool.h" tooltip="src/thread_pool.h"]
"2" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"10" [label="src/globals.cpp" tooltip="src/globals.cpp"]
"7" [label="src/globals.h" tooltip="src/globals.h"]
"4" [label="src/entry_handler.h" tooltip="src/entry_handler.h"]
"5" [label="src/config.cpp" tooltip="src/config.cpp"]
"13" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"11" [label="src/input.cpp" tooltip="src/input.cpp"]
"6" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"1" [label="src/task_pool.h" tooltip="src/task_pool.h" fillcolor="#BFBFBF"]
"9" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"8" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"15" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"12" [label="src/main.cpp" tooltip="src/main.cpp"]
"17" [label="src/video.cpp" tooltip="src/video.cpp"]
"3" -> "4" [dir=back tooltip="include"]
"3" -> "7" [dir=back tooltip="include"]
"3" -> "11" [dir=back tooltip="include"]
"7" -> "8" [dir=back tooltip="include"]
"7" -> "9" [dir=back tooltip="include"]
"7" -> "6" [dir=back tooltip="include"]
"7" -> "10" [dir=back tooltip="include"]
"7" -> "11" [dir=back tooltip="include"]
"7" -> "12" [dir=back tooltip="include"]
"7" -> "2" [dir=back tooltip="include"]
"7" -> "13" [dir=back tooltip="include"]
"7" -> "14" [dir=back tooltip="include"]
"7" -> "15" [dir=back tooltip="include"]
"7" -> "16" [dir=back tooltip="include"]
"7" -> "17" [dir=back tooltip="include"]
"4" -> "5" [dir=back tooltip="include"]
"4" -> "6" [dir=back tooltip="include"]
"4" -> "7" [dir=back tooltip="include"]
"4" -> "12" [dir=back tooltip="include"]
"4" -> "18" [dir=back tooltip="include"]
"4" -> "14" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-5272ce0042e75d09e8fe3e334cc4c3fd7cd2360e.png)
todo
-
namespace task_pool_util#
-
template<class Function>
class _Impl : public task_pool_util::_ImplBase# Inheritence diagram for task_pool_util::_Impl:
Collaboration diagram for task_pool_util::_Impl:
-
class _ImplBase#
Inheritence diagram for task_pool_util::_ImplBase:
Subclassed by task_pool_util::_Impl< Function >
-
class TaskPool#
Inheritence diagram for task_pool_util::TaskPool:
Subclassed by thread_pool_util::ThreadPool
Public Types
-
typedef std::chrono::steady_clock::time_point __time_point#
Public Functions
-
template<class X, class Y>
inline void delay(task_id_t task_id, std::chrono::duration<X, Y> duration)# - Parameters:
task_id – The id of the task to delay.
duration – The delay before executing the task.
-
inline std::optional<__time_point> next()#
-
inline std::optional<std::pair<__time_point, __task>> pop(task_id_t task_id)#
-
template<class Function, class X, class Y, class ...Args>
inline auto pushDelayed(Function &&newTask, std::chrono::duration<X, Y> duration, Args&&... args)# - Returns:
an id to potentially delay the task.
-
inline void pushDelayed(std::pair<__time_point, __task> &&task)#
-
inline bool ready()#
-
TaskPool() = default#
Protected Attributes
-
std::mutex _task_mutex#
-
std::vector<std::pair<__time_point, __task>> _timer_tasks#
Private Functions
-
template<class R>
class timer_task_t# Collaboration diagram for task_pool_util::TaskPool::timer_task_t:
-
typedef std::chrono::steady_clock::time_point __time_point#
-
template<class Function>
thread_pool#
Include dependency graph for thread_pool.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="src/thread_pool.h" tooltip="src/thread_pool.h" fillcolor="#BFBFBF"]
"5" [label="functional" tooltip="functional"]
"19" [label="variant" tooltip="variant"]
"17" [label="string" tooltip="string"]
"12" [label="move_by_copy.h" tooltip="move_by_copy.h"]
"13" [label="utility.h" tooltip="utility.h"]
"18" [label="string_view" tooltip="string_view"]
"15" [label="condition_variable" tooltip="condition_variable"]
"6" [label="future" tooltip="future"]
"8" [label="optional" tooltip="optional"]
"11" [label="vector" tooltip="vector"]
"10" [label="utility" tooltip="utility"]
"2" [label="task_pool.h" tooltip="task_pool.h"]
"4" [label="deque" tooltip="deque"]
"7" [label="mutex" tooltip="mutex"]
"3" [label="chrono" tooltip="chrono"]
"20" [label="thread" tooltip="thread"]
"9" [label="type_traits" tooltip="type_traits"]
"14" [label="algorithm" tooltip="algorithm"]
"16" [label="memory" tooltip="memory"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "20" [dir=forward tooltip="include"]
"12" -> "10" [dir=forward tooltip="include"]
"13" -> "14" [dir=forward tooltip="include"]
"13" -> "15" [dir=forward tooltip="include"]
"13" -> "16" [dir=forward tooltip="include"]
"13" -> "7" [dir=forward tooltip="include"]
"13" -> "8" [dir=forward tooltip="include"]
"13" -> "17" [dir=forward tooltip="include"]
"13" -> "18" [dir=forward tooltip="include"]
"13" -> "9" [dir=forward tooltip="include"]
"13" -> "19" [dir=forward tooltip="include"]
"13" -> "11" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
"2" -> "6" [dir=forward tooltip="include"]
"2" -> "7" [dir=forward tooltip="include"]
"2" -> "8" [dir=forward tooltip="include"]
"2" -> "9" [dir=forward tooltip="include"]
"2" -> "10" [dir=forward tooltip="include"]
"2" -> "11" [dir=forward tooltip="include"]
"2" -> "12" [dir=forward tooltip="include"]
"2" -> "13" [dir=forward tooltip="include"]
}](_images/graphviz-b10575820d23b85659357620950893761d790d6e.png)
This graph shows which files directly or indirectly include thread_pool.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"15" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"13" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"17" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"11" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"1" [label="src/thread_pool.h" tooltip="src/thread_pool.h" fillcolor="#BFBFBF"]
"8" [label="src/globals.cpp" tooltip="src/globals.cpp"]
"5" [label="src/globals.h" tooltip="src/globals.h"]
"2" [label="src/entry_handler.h" tooltip="src/entry_handler.h"]
"3" [label="src/config.cpp" tooltip="src/config.cpp"]
"12" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"9" [label="src/input.cpp" tooltip="src/input.cpp"]
"4" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"7" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"6" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"14" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"10" [label="src/main.cpp" tooltip="src/main.cpp"]
"16" [label="src/video.cpp" tooltip="src/video.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"5" -> "6" [dir=back tooltip="include"]
"5" -> "7" [dir=back tooltip="include"]
"5" -> "4" [dir=back tooltip="include"]
"5" -> "8" [dir=back tooltip="include"]
"5" -> "9" [dir=back tooltip="include"]
"5" -> "10" [dir=back tooltip="include"]
"5" -> "11" [dir=back tooltip="include"]
"5" -> "12" [dir=back tooltip="include"]
"5" -> "13" [dir=back tooltip="include"]
"5" -> "14" [dir=back tooltip="include"]
"5" -> "15" [dir=back tooltip="include"]
"5" -> "16" [dir=back tooltip="include"]
"2" -> "3" [dir=back tooltip="include"]
"2" -> "4" [dir=back tooltip="include"]
"2" -> "5" [dir=back tooltip="include"]
"2" -> "10" [dir=back tooltip="include"]
"2" -> "17" [dir=back tooltip="include"]
"2" -> "13" [dir=back tooltip="include"]
}](_images/graphviz-e0d593860eff5441e5421c879a7788f27c66d867.png)
todo
-
namespace thread_pool_util#
-
class ThreadPool : public task_pool_util::TaskPool#
- #include <src/thread_pool.h>
Inheritence diagram for thread_pool_util::ThreadPool:
Collaboration diagram for thread_pool_util::ThreadPool:
Allow threads to execute unhindered while keeping full control over the threads.
Public Types
-
typedef TaskPool::__task __task#
Public Functions
-
inline void _main()#
-
inline void join()#
-
template<class Function, class X, class Y, class ...Args>
inline auto pushDelayed(Function &&newTask, std::chrono::duration<X, Y> duration, Args&&... args)#
-
inline void start(int threads)#
-
inline void stop()#
-
inline ThreadPool()#
-
inline explicit ThreadPool(int threads)#
-
inline ~ThreadPool() noexcept#
-
typedef TaskPool::__task __task#
-
class ThreadPool : public task_pool_util::TaskPool#
thread_safe#
Include dependency graph for thread_safe.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="atomic" tooltip="atomic"]
"5" [label="functional" tooltip="functional"]
"1" [label="src/thread_safe.h" tooltip="src/thread_safe.h" fillcolor="#BFBFBF"]
"16" [label="variant" tooltip="variant"]
"13" [label="string" tooltip="string"]
"6" [label="map" tooltip="map"]
"9" [label="utility.h" tooltip="utility.h"]
"14" [label="string_view" tooltip="string_view"]
"4" [label="condition_variable" tooltip="condition_variable"]
"12" [label="optional" tooltip="optional"]
"8" [label="vector" tooltip="vector"]
"2" [label="array" tooltip="array"]
"7" [label="mutex" tooltip="mutex"]
"15" [label="type_traits" tooltip="type_traits"]
"10" [label="algorithm" tooltip="algorithm"]
"11" [label="memory" tooltip="memory"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "6" [dir=forward tooltip="include"]
"1" -> "7" [dir=forward tooltip="include"]
"1" -> "8" [dir=forward tooltip="include"]
"1" -> "9" [dir=forward tooltip="include"]
"9" -> "10" [dir=forward tooltip="include"]
"9" -> "4" [dir=forward tooltip="include"]
"9" -> "11" [dir=forward tooltip="include"]
"9" -> "7" [dir=forward tooltip="include"]
"9" -> "12" [dir=forward tooltip="include"]
"9" -> "13" [dir=forward tooltip="include"]
"9" -> "14" [dir=forward tooltip="include"]
"9" -> "15" [dir=forward tooltip="include"]
"9" -> "16" [dir=forward tooltip="include"]
"9" -> "8" [dir=forward tooltip="include"]
}](_images/graphviz-bdcc421eb45b615fe5771cf98fe3995273051d5c.png)
This graph shows which files directly or indirectly include thread_safe.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"6" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"18" [label="src/platform/windows/misc.cpp" tooltip="src/platform/windows/misc.cpp"]
"20" [label="src/platform/macos/misc.mm" tooltip="src/platform/macos/misc.mm"]
"16" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"39" [label="src/platform/linux/publish.cpp" tooltip="src/platform/linux/publish.cpp"]
"41" [label="src/platform/windows/publish.cpp" tooltip="src/platform/windows/publish.cpp"]
"1" [label="src/thread_safe.h" tooltip="src/thread_safe.h" fillcolor="#BFBFBF"]
"4" [label="src/stream.h" tooltip="src/stream.h"]
"32" [label="src/platform/macos/display.mm" tooltip="src/platform/macos/display.mm"]
"29" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"14" [label="src/globals.cpp" tooltip="src/globals.cpp"]
"23" [label="src/input.h" tooltip="src/input.h"]
"38" [label="src/nvhttp.h" tooltip="src/nvhttp.h"]
"46" [label="src/platform/linux/wayland.h" tooltip="src/platform/linux/wayland.h"]
"13" [label="src/globals.h" tooltip="src/globals.h"]
"11" [label="src/entry_handler.h" tooltip="src/entry_handler.h"]
"40" [label="src/platform/macos/publish.cpp" tooltip="src/platform/macos/publish.cpp"]
"26" [label="src/nvenc/nvenc_base.h" tooltip="src/nvenc/nvenc_base.h"]
"22" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"57" [label="src/upnp.h" tooltip="src/upnp.h"]
"49" [label="src/platform/linux/x11grab.h" tooltip="src/platform/linux/x11grab.h"]
"31" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"50" [label="src/platform/macos/av_img_t.h" tooltip="src/platform/macos/av_img_t.h"]
"24" [label="src/platform/linux/input.cpp" tooltip="src/platform/linux/input.cpp"]
"56" [label="src/process.h" tooltip="src/process.h"]
"34" [label="src/platform/windows/display.h" tooltip="src/platform/windows/display.h"]
"44" [label="src/platform/linux/audio.cpp" tooltip="src/platform/linux/audio.cpp"]
"21" [label="src/httpcommon.h" tooltip="src/httpcommon.h"]
"12" [label="src/config.cpp" tooltip="src/config.cpp"]
"36" [label="src/platform/windows/display_base.cpp" tooltip="src/platform/windows/display_base.cpp"]
"7" [label="src/confighttp.h" tooltip="src/confighttp.h"]
"33" [label="src/platform/macos/nv12_zero_device.cpp" tooltip="src/platform/macos/nv12_zero_device.cpp"]
"53" [label="src/platform/macos/input.cpp" tooltip="src/platform/macos/input.cpp"]
"17" [label="src/platform/windows/input.cpp" tooltip="src/platform/windows/input.cpp"]
"15" [label="src/input.cpp" tooltip="src/input.cpp"]
"28" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"2" [label="src/audio.h" tooltip="src/audio.h"]
"37" [label="src/platform/windows/display_vram.cpp" tooltip="src/platform/windows/display_vram.cpp"]
"51" [label="src/platform/macos/nv12_zero_device.h" tooltip="src/platform/macos/nv12_zero_device.h"]
"42" [label="src/platform/common.h" tooltip="src/platform/common.h"]
"9" [label="src/entry_handler.cpp" tooltip="src/entry_handler.cpp"]
"58" [label="src/rtsp.h" tooltip="src/rtsp.h"]
"25" [label="src/video.h" tooltip="src/video.h"]
"47" [label="src/platform/linux/wayland.cpp" tooltip="src/platform/linux/wayland.cpp"]
"27" [label="src/platform/linux/graphics.cpp" tooltip="src/platform/linux/graphics.cpp"]
"43" [label="src/nvenc/nvenc_utils.h" tooltip="src/nvenc/nvenc_utils.h"]
"48" [label="src/platform/linux/vaapi.h" tooltip="src/platform/linux/vaapi.h"]
"55" [label="src/process.cpp" tooltip="src/process.cpp"]
"8" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"3" [label="src/audio.cpp" tooltip="src/audio.cpp"]
"5" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"35" [label="src/platform/windows/display_ram.cpp" tooltip="src/platform/windows/display_ram.cpp"]
"10" [label="src/main.cpp" tooltip="src/main.cpp"]
"45" [label="src/platform/linux/graphics.h" tooltip="src/platform/linux/graphics.h"]
"19" [label="src/video.cpp" tooltip="src/video.cpp"]
"54" [label="src/platform/windows/audio.cpp" tooltip="src/platform/windows/audio.cpp"]
"30" [label="src/platform/linux/vaapi.cpp" tooltip="src/platform/linux/vaapi.cpp"]
"52" [label="src/platform/macos/microphone.mm" tooltip="src/platform/macos/microphone.mm"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "11" [dir=back tooltip="include"]
"1" -> "21" [dir=back tooltip="include"]
"1" -> "23" [dir=back tooltip="include"]
"1" -> "38" [dir=back tooltip="include"]
"1" -> "42" [dir=back tooltip="include"]
"1" -> "44" [dir=back tooltip="include"]
"1" -> "41" [dir=back tooltip="include"]
"1" -> "58" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "25" [dir=back tooltip="include"]
"4" -> "5" [dir=back tooltip="include"]
"4" -> "6" [dir=back tooltip="include"]
"23" -> "15" [dir=back tooltip="include"]
"23" -> "24" [dir=back tooltip="include"]
"23" -> "5" [dir=back tooltip="include"]
"23" -> "25" [dir=back tooltip="include"]
"23" -> "19" [dir=back tooltip="include"]
"38" -> "12" [dir=back tooltip="include"]
"38" -> "8" [dir=back tooltip="include"]
"38" -> "22" [dir=back tooltip="include"]
"38" -> "10" [dir=back tooltip="include"]
"38" -> "39" [dir=back tooltip="include"]
"38" -> "40" [dir=back tooltip="include"]
"38" -> "41" [dir=back tooltip="include"]
"38" -> "6" [dir=back tooltip="include"]
"46" -> "28" [dir=back tooltip="include"]
"46" -> "29" [dir=back tooltip="include"]
"46" -> "47" [dir=back tooltip="include"]
"46" -> "31" [dir=back tooltip="include"]
"13" -> "3" [dir=back tooltip="include"]
"13" -> "8" [dir=back tooltip="include"]
"13" -> "9" [dir=back tooltip="include"]
"13" -> "14" [dir=back tooltip="include"]
"13" -> "15" [dir=back tooltip="include"]
"13" -> "10" [dir=back tooltip="include"]
"13" -> "16" [dir=back tooltip="include"]
"13" -> "17" [dir=back tooltip="include"]
"13" -> "18" [dir=back tooltip="include"]
"13" -> "5" [dir=back tooltip="include"]
"13" -> "6" [dir=back tooltip="include"]
"13" -> "19" [dir=back tooltip="include"]
"11" -> "12" [dir=back tooltip="include"]
"11" -> "9" [dir=back tooltip="include"]
"11" -> "13" [dir=back tooltip="include"]
"11" -> "10" [dir=back tooltip="include"]
"11" -> "20" [dir=back tooltip="include"]
"11" -> "18" [dir=back tooltip="include"]
"26" -> "19" [dir=back tooltip="include"]
"57" -> "10" [dir=back tooltip="include"]
"57" -> "6" [dir=back tooltip="include"]
"49" -> "16" [dir=back tooltip="include"]
"50" -> "32" [dir=back tooltip="include"]
"50" -> "51" [dir=back tooltip="include"]
"56" -> "8" [dir=back tooltip="include"]
"56" -> "22" [dir=back tooltip="include"]
"56" -> "10" [dir=back tooltip="include"]
"56" -> "55" [dir=back tooltip="include"]
"56" -> "5" [dir=back tooltip="include"]
"34" -> "35" [dir=back tooltip="include"]
"34" -> "36" [dir=back tooltip="include"]
"34" -> "37" [dir=back tooltip="include"]
"21" -> "8" [dir=back tooltip="include"]
"21" -> "9" [dir=back tooltip="include"]
"21" -> "22" [dir=back tooltip="include"]
"21" -> "10" [dir=back tooltip="include"]
"7" -> "8" [dir=back tooltip="include"]
"7" -> "9" [dir=back tooltip="include"]
"7" -> "10" [dir=back tooltip="include"]
"7" -> "6" [dir=back tooltip="include"]
"2" -> "3" [dir=back tooltip="include"]
"2" -> "4" [dir=back tooltip="include"]
"51" -> "32" [dir=back tooltip="include"]
"51" -> "33" [dir=back tooltip="include"]
"42" -> "3" [dir=back tooltip="include"]
"42" -> "12" [dir=back tooltip="include"]
"42" -> "8" [dir=back tooltip="include"]
"42" -> "9" [dir=back tooltip="include"]
"42" -> "22" [dir=back tooltip="include"]
"42" -> "23" [dir=back tooltip="include"]
"42" -> "15" [dir=back tooltip="include"]
"42" -> "43" [dir=back tooltip="include"]
"42" -> "44" [dir=back tooltip="include"]
"42" -> "45" [dir=back tooltip="include"]
"42" -> "29" [dir=back tooltip="include"]
"42" -> "24" [dir=back tooltip="include"]
"42" -> "39" [dir=back tooltip="include"]
"42" -> "30" [dir=back tooltip="include"]
"42" -> "48" [dir=back tooltip="include"]
"42" -> "47" [dir=back tooltip="include"]
"42" -> "31" [dir=back tooltip="include"]
"42" -> "49" [dir=back tooltip="include"]
"42" -> "50" [dir=back tooltip="include"]
"42" -> "16" [dir=back tooltip="include"]
"42" -> "32" [dir=back tooltip="include"]
"42" -> "52" [dir=back tooltip="include"]
"42" -> "53" [dir=back tooltip="include"]
"42" -> "20" [dir=back tooltip="include"]
"42" -> "51" [dir=back tooltip="include"]
"42" -> "40" [dir=back tooltip="include"]
"42" -> "54" [dir=back tooltip="include"]
"42" -> "34" [dir=back tooltip="include"]
"42" -> "36" [dir=back tooltip="include"]
"42" -> "17" [dir=back tooltip="include"]
"42" -> "18" [dir=back tooltip="include"]
"42" -> "41" [dir=back tooltip="include"]
"42" -> "55" [dir=back tooltip="include"]
"42" -> "56" [dir=back tooltip="include"]
"42" -> "57" [dir=back tooltip="include"]
"42" -> "25" [dir=back tooltip="include"]
"42" -> "19" [dir=back tooltip="include"]
"58" -> "12" [dir=back tooltip="include"]
"58" -> "8" [dir=back tooltip="include"]
"58" -> "22" [dir=back tooltip="include"]
"58" -> "56" [dir=back tooltip="include"]
"58" -> "6" [dir=back tooltip="include"]
"25" -> "10" [dir=back tooltip="include"]
"25" -> "26" [dir=back tooltip="include"]
"25" -> "27" [dir=back tooltip="include"]
"25" -> "28" [dir=back tooltip="include"]
"25" -> "29" [dir=back tooltip="include"]
"25" -> "30" [dir=back tooltip="include"]
"25" -> "31" [dir=back tooltip="include"]
"25" -> "16" [dir=back tooltip="include"]
"25" -> "32" [dir=back tooltip="include"]
"25" -> "33" [dir=back tooltip="include"]
"25" -> "34" [dir=back tooltip="include"]
"25" -> "36" [dir=back tooltip="include"]
"25" -> "37" [dir=back tooltip="include"]
"25" -> "4" [dir=back tooltip="include"]
"25" -> "19" [dir=back tooltip="include"]
"43" -> "37" [dir=back tooltip="include"]
"48" -> "29" [dir=back tooltip="include"]
"48" -> "31" [dir=back tooltip="include"]
"48" -> "16" [dir=back tooltip="include"]
"45" -> "27" [dir=back tooltip="include"]
"45" -> "28" [dir=back tooltip="include"]
"45" -> "29" [dir=back tooltip="include"]
"45" -> "30" [dir=back tooltip="include"]
"45" -> "46" [dir=back tooltip="include"]
"45" -> "47" [dir=back tooltip="include"]
"45" -> "16" [dir=back tooltip="include"]
}](_images/graphviz-9d3e15a3d80db4f6c7f9cf5ee57add85e0d99588.png)
todo
-
namespace safe#
Typedefs
-
template<class T>
using alarm_t = std::shared_ptr<alarm_raw_t<T>>#
-
using mail_t = std::shared_ptr<mail_raw_t>#
Functions
-
inline void cleanup(mail_raw_t*)#
-
template<class T>
inline auto lock(const std::weak_ptr<void> &wp)#
-
template<class T>
class alarm_raw_t# -
Public Functions
-
inline void reset()#
-
inline auto wait()#
-
template<class Rep, class Period>
inline auto wait_for(const std::chrono::duration<Rep, Period> &rel_time)#
-
template<class Rep, class Period, class Pred>
inline auto wait_for(const std::chrono::duration<Rep, Period> &rel_time, Pred &&pred)#
-
inline void reset()#
-
template<class T>
class event_t#
-
class mail_raw_t : public std::enable_shared_from_this<mail_raw_t>#
Inheritence diagram for safe::mail_raw_t:
Collaboration diagram for safe::mail_raw_t:
Public Types
Public Functions
-
inline void cleanup()#
-
inline void cleanup()#
-
template<class T>
class post_t : public T# Inheritence diagram for safe::post_t:
Collaboration diagram for safe::post_t:
Public Functions
-
inline ~post_t()#
-
inline ~post_t()#
-
template<class T>
class queue_t#
Public Types
Public Functions
Private Members
Collaboration diagram for safe::shared_t::ptr_t:
Public Functions
Public Members
-
template<class T>
upnp#
Include dependency graph for upnp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"22" [label="atomic" tooltip="atomic"]
"5" [label="functional" tooltip="functional"]
"18" [label="limits" tooltip="limits"]
"16" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"31" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"4" [label="filesystem" tooltip="filesystem"]
"20" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"17" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"30" [label="variant" tooltip="variant"]
"13" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"19" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"7" [label="string" tooltip="string"]
"14" [label="src/logging.h" tooltip="src/logging.h"]
"24" [label="map" tooltip="map"]
"25" [label="utility.h" tooltip="utility.h"]
"1" [label="src/upnp.h" tooltip="src/upnp.h" fillcolor="#BFBFBF"]
"28" [label="string_view" tooltip="string_view"]
"23" [label="condition_variable" tooltip="condition_variable"]
"3" [label="bitset" tooltip="bitset"]
"32" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"10" [label="optional" tooltip="optional"]
"12" [label="vector" tooltip="vector"]
"21" [label="array" tooltip="array"]
"8" [label="src/config.h" tooltip="src/config.h"]
"2" [label="platform/common.h" tooltip="platform/common.h"]
"11" [label="unordered_map" tooltip="unordered_map"]
"6" [label="mutex" tooltip="mutex"]
"9" [label="chrono" tooltip="chrono"]
"29" [label="type_traits" tooltip="type_traits"]
"33" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"15" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"26" [label="algorithm" tooltip="algorithm"]
"27" [label="memory" tooltip="memory"]
"31" -> "32" [dir=forward tooltip="include"]
"20" -> "21" [dir=forward tooltip="include"]
"20" -> "22" [dir=forward tooltip="include"]
"20" -> "23" [dir=forward tooltip="include"]
"20" -> "5" [dir=forward tooltip="include"]
"20" -> "24" [dir=forward tooltip="include"]
"20" -> "6" [dir=forward tooltip="include"]
"20" -> "12" [dir=forward tooltip="include"]
"20" -> "25" [dir=forward tooltip="include"]
"17" -> "9" [dir=forward tooltip="include"]
"17" -> "5" [dir=forward tooltip="include"]
"17" -> "18" [dir=forward tooltip="include"]
"17" -> "19" [dir=forward tooltip="include"]
"14" -> "15" [dir=forward tooltip="include"]
"14" -> "16" [dir=forward tooltip="include"]
"25" -> "26" [dir=forward tooltip="include"]
"25" -> "23" [dir=forward tooltip="include"]
"25" -> "27" [dir=forward tooltip="include"]
"25" -> "6" [dir=forward tooltip="include"]
"25" -> "10" [dir=forward tooltip="include"]
"25" -> "7" [dir=forward tooltip="include"]
"25" -> "28" [dir=forward tooltip="include"]
"25" -> "29" [dir=forward tooltip="include"]
"25" -> "30" [dir=forward tooltip="include"]
"25" -> "12" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"8" -> "3" [dir=forward tooltip="include"]
"8" -> "9" [dir=forward tooltip="include"]
"8" -> "10" [dir=forward tooltip="include"]
"8" -> "7" [dir=forward tooltip="include"]
"8" -> "11" [dir=forward tooltip="include"]
"8" -> "12" [dir=forward tooltip="include"]
"8" -> "13" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
"2" -> "6" [dir=forward tooltip="include"]
"2" -> "7" [dir=forward tooltip="include"]
"2" -> "8" [dir=forward tooltip="include"]
"2" -> "14" [dir=forward tooltip="include"]
"2" -> "17" [dir=forward tooltip="include"]
"2" -> "20" [dir=forward tooltip="include"]
"2" -> "25" [dir=forward tooltip="include"]
"2" -> "31" [dir=forward tooltip="include"]
"2" -> "33" [dir=forward tooltip="include"]
}](_images/graphviz-e1ca741584547a8269d7c358cc692477044442fb.png)
This graph shows which files directly or indirectly include upnp.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"1" [label="src/upnp.h" tooltip="src/upnp.h" fillcolor="#BFBFBF"]
"2" [label="src/main.cpp" tooltip="src/main.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-130ff599c46bd122b73bdb26c80d6ff8e391bfcd.png)
todo
-
namespace upnp#
utility#
Todo
Add utility.h
uuid#
Include dependency graph for uuid.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="src/uuid.h" tooltip="src/uuid.h" fillcolor="#BFBFBF"]
"2" [label="random" tooltip="random"]
"1" -> "2" [dir=forward tooltip="include"]
}](_images/graphviz-7bb69bdd3944768bf05075c5818c226946a51cdb.png)
This graph shows which files directly or indirectly include uuid.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"1" [label="src/uuid.h" tooltip="src/uuid.h" fillcolor="#BFBFBF"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
}](_images/graphviz-84fd11ca863c8e2a25a164fdd2e6ff66ebe96d53.png)
todo
video#
Include dependency graph for video.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"23" [label="atomic" tooltip="atomic"]
"3" [label="functional" tooltip="functional"]
"19" [label="limits" tooltip="limits"]
"17" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"32" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"6" [label="filesystem" tooltip="filesystem"]
"21" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"18" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"31" [label="variant" tooltip="variant"]
"14" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"20" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"2" [label="input.h" tooltip="input.h"]
"8" [label="string" tooltip="string"]
"15" [label="src/logging.h" tooltip="src/logging.h"]
"25" [label="map" tooltip="map"]
"26" [label="utility.h" tooltip="utility.h"]
"29" [label="string_view" tooltip="string_view"]
"24" [label="condition_variable" tooltip="condition_variable"]
"5" [label="bitset" tooltip="bitset"]
"33" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"11" [label="optional" tooltip="optional"]
"36" [label="libswscale/swscale.h" tooltip="libswscale/swscale.h"]
"13" [label="vector" tooltip="vector"]
"22" [label="array" tooltip="array"]
"35" [label="libavcodec/avcodec.h" tooltip="libavcodec/avcodec.h"]
"9" [label="src/config.h" tooltip="src/config.h"]
"4" [label="platform/common.h" tooltip="platform/common.h"]
"1" [label="src/video.h" tooltip="src/video.h" fillcolor="#BFBFBF"]
"12" [label="unordered_map" tooltip="unordered_map"]
"7" [label="mutex" tooltip="mutex"]
"10" [label="chrono" tooltip="chrono"]
"30" [label="type_traits" tooltip="type_traits"]
"34" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"16" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"27" [label="algorithm" tooltip="algorithm"]
"28" [label="memory" tooltip="memory"]
"32" -> "33" [dir=forward tooltip="include"]
"21" -> "22" [dir=forward tooltip="include"]
"21" -> "23" [dir=forward tooltip="include"]
"21" -> "24" [dir=forward tooltip="include"]
"21" -> "3" [dir=forward tooltip="include"]
"21" -> "25" [dir=forward tooltip="include"]
"21" -> "7" [dir=forward tooltip="include"]
"21" -> "13" [dir=forward tooltip="include"]
"21" -> "26" [dir=forward tooltip="include"]
"18" -> "10" [dir=forward tooltip="include"]
"18" -> "3" [dir=forward tooltip="include"]
"18" -> "19" [dir=forward tooltip="include"]
"18" -> "20" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "21" [dir=forward tooltip="include"]
"15" -> "16" [dir=forward tooltip="include"]
"15" -> "17" [dir=forward tooltip="include"]
"26" -> "27" [dir=forward tooltip="include"]
"26" -> "24" [dir=forward tooltip="include"]
"26" -> "28" [dir=forward tooltip="include"]
"26" -> "7" [dir=forward tooltip="include"]
"26" -> "11" [dir=forward tooltip="include"]
"26" -> "8" [dir=forward tooltip="include"]
"26" -> "29" [dir=forward tooltip="include"]
"26" -> "30" [dir=forward tooltip="include"]
"26" -> "31" [dir=forward tooltip="include"]
"26" -> "13" [dir=forward tooltip="include"]
"9" -> "5" [dir=forward tooltip="include"]
"9" -> "10" [dir=forward tooltip="include"]
"9" -> "11" [dir=forward tooltip="include"]
"9" -> "8" [dir=forward tooltip="include"]
"9" -> "12" [dir=forward tooltip="include"]
"9" -> "13" [dir=forward tooltip="include"]
"9" -> "14" [dir=forward tooltip="include"]
"4" -> "5" [dir=forward tooltip="include"]
"4" -> "6" [dir=forward tooltip="include"]
"4" -> "3" [dir=forward tooltip="include"]
"4" -> "7" [dir=forward tooltip="include"]
"4" -> "8" [dir=forward tooltip="include"]
"4" -> "9" [dir=forward tooltip="include"]
"4" -> "15" [dir=forward tooltip="include"]
"4" -> "18" [dir=forward tooltip="include"]
"4" -> "21" [dir=forward tooltip="include"]
"4" -> "26" [dir=forward tooltip="include"]
"4" -> "32" [dir=forward tooltip="include"]
"4" -> "34" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "21" [dir=forward tooltip="include"]
"1" -> "32" [dir=forward tooltip="include"]
"1" -> "35" [dir=forward tooltip="include"]
"1" -> "36" [dir=forward tooltip="include"]
}](_images/graphviz-35e64ee579a032bd2d18b1fe104a407c5e1cbca0.png)
This graph shows which files directly or indirectly include video.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"19" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"10" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"17" [label="src/stream.h" tooltip="src/stream.h"]
"11" [label="src/platform/macos/display.mm" tooltip="src/platform/macos/display.mm"]
"7" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"3" [label="src/nvenc/nvenc_base.h" tooltip="src/nvenc/nvenc_base.h"]
"9" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"13" [label="src/platform/windows/display.h" tooltip="src/platform/windows/display.h"]
"15" [label="src/platform/windows/display_base.cpp" tooltip="src/platform/windows/display_base.cpp"]
"12" [label="src/platform/macos/nv12_zero_device.cpp" tooltip="src/platform/macos/nv12_zero_device.cpp"]
"6" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"16" [label="src/platform/windows/display_vram.cpp" tooltip="src/platform/windows/display_vram.cpp"]
"1" [label="src/video.h" tooltip="src/video.h" fillcolor="#BFBFBF"]
"5" [label="src/platform/linux/graphics.cpp" tooltip="src/platform/linux/graphics.cpp"]
"18" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"14" [label="src/platform/windows/display_ram.cpp" tooltip="src/platform/windows/display_ram.cpp"]
"2" [label="src/main.cpp" tooltip="src/main.cpp"]
"4" [label="src/video.cpp" tooltip="src/video.cpp"]
"8" [label="src/platform/linux/vaapi.cpp" tooltip="src/platform/linux/vaapi.cpp"]
"17" -> "18" [dir=back tooltip="include"]
"17" -> "19" [dir=back tooltip="include"]
"3" -> "4" [dir=back tooltip="include"]
"13" -> "14" [dir=back tooltip="include"]
"13" -> "15" [dir=back tooltip="include"]
"13" -> "16" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "7" [dir=back tooltip="include"]
"1" -> "8" [dir=back tooltip="include"]
"1" -> "9" [dir=back tooltip="include"]
"1" -> "10" [dir=back tooltip="include"]
"1" -> "11" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
"1" -> "13" [dir=back tooltip="include"]
"1" -> "15" [dir=back tooltip="include"]
"1" -> "16" [dir=back tooltip="include"]
"1" -> "17" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
}](_images/graphviz-1f54a033aa6c0918ab612e63960e57090cb79909.png)
todo
Defines
-
_CONVERT(x)#
-
namespace video#
Typedefs
-
using avcodec_buffer_t = util::safe_ptr<AVBufferRef, free_buffer>#
-
using avcodec_ctx_t = util::safe_ptr<AVCodecContext, free_ctx>#
-
using avcodec_frame_t = util::safe_ptr<AVFrame, free_frame>#
-
using hdr_info_t = std::unique_ptr<hdr_info_raw_t>#
-
using packet_t = std::unique_ptr<packet_raw_t>#
-
using sws_t = util::safe_ptr<SwsContext, sws_freeContext>#
-
struct config_t#
-
struct encode_session_t#
Inheritence diagram for video::encode_session_t:
Subclassed by video::avcodec_encode_session_t, video::nvenc_encode_session_t
-
struct encoder_platform_formats_avcodec : public video::encoder_platform_formats_t#
Inheritence diagram for video::encoder_platform_formats_avcodec:
Collaboration diagram for video::encoder_platform_formats_avcodec:
Public Types
-
using init_buffer_function_t = std::function<util::Either<avcodec_buffer_t, int>(platf::avcodec_encode_device_t*)>#
Public Functions
-
inline encoder_platform_formats_avcodec(const AVHWDeviceType &avcodec_base_dev_type, const AVHWDeviceType &avcodec_derived_dev_type, const AVPixelFormat &avcodec_dev_pix_fmt, const AVPixelFormat &avcodec_pix_fmt_8bit, const AVPixelFormat &avcodec_pix_fmt_10bit, const init_buffer_function_t &init_avcodec_hardware_input_buffer_function)#
-
using init_buffer_function_t = std::function<util::Either<avcodec_buffer_t, int>(platf::avcodec_encode_device_t*)>#
-
struct encoder_platform_formats_nvenc : public video::encoder_platform_formats_t#
Inheritence diagram for video::encoder_platform_formats_nvenc:
Collaboration diagram for video::encoder_platform_formats_nvenc:
-
struct encoder_platform_formats_t#
Inheritence diagram for video::encoder_platform_formats_t:
Subclassed by video::encoder_platform_formats_avcodec, video::encoder_platform_formats_nvenc
Public Functions
-
virtual ~encoder_platform_formats_t() = default#
-
virtual ~encoder_platform_formats_t() = default#
-
struct encoder_t#
Collaboration diagram for video::encoder_t:
Public Types
Public Members
-
uint32_t flags#
-
std::string_view name#
-
const std::unique_ptr<const encoder_platform_formats_t> platform_formats#
-
struct codec_t#
Public Functions
-
uint32_t flags#
-
struct hdr_info_raw_t#
-
struct packet_raw_avcodec : public video::packet_raw_t#
Inheritence diagram for video::packet_raw_avcodec:
Collaboration diagram for video::packet_raw_avcodec:
Public Functions
-
inline virtual uint8_t *data() override#
-
inline virtual size_t data_size() override#
-
inline virtual int64_t frame_index() override#
-
inline virtual bool is_idr() override#
-
inline packet_raw_avcodec()#
-
inline ~packet_raw_avcodec()#
Public Members
-
AVPacket *av_packet#
-
inline virtual uint8_t *data() override#
-
struct packet_raw_generic : public video::packet_raw_t#
Inheritence diagram for video::packet_raw_generic:
Collaboration diagram for video::packet_raw_generic:
-
struct packet_raw_t#
Inheritence diagram for video::packet_raw_t:
Subclassed by video::packet_raw_avcodec, video::packet_raw_generic
Public Functions
-
virtual uint8_t *data() = 0#
-
virtual size_t data_size() = 0#
-
virtual int64_t frame_index() = 0#
-
virtual bool is_idr() = 0#
-
virtual ~packet_raw_t() = default#
-
virtual uint8_t *data() = 0#
-
using avcodec_buffer_t = util::safe_ptr<AVBufferRef, free_buffer>#
common#
Todo
Add common.h
cuda#
This graph shows which files directly or indirectly include cuda.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"5" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"3" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"1" [label="src/platform/linux/cuda.h" tooltip="src/platform/linux/cuda.h" fillcolor="#BFBFBF"]
"4" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"2" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
}](_images/graphviz-4d7a90dcaf786ac1beb6c90315b8ae4a03ae1985.png)
todo
graphics#
Todo
Add graphics.h
misc#
Todo
Add misc.h
vaapi#
Include dependency graph for vaapi.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"31" [label="atomic" tooltip="atomic"]
"18" [label="functional" tooltip="functional"]
"27" [label="limits" tooltip="limits"]
"25" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"33" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"17" [label="filesystem" tooltip="filesystem"]
"29" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"26" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"14" [label="variant" tooltip="variant"]
"22" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"28" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"11" [label="string" tooltip="string"]
"23" [label="src/logging.h" tooltip="src/logging.h"]
"32" [label="map" tooltip="map"]
"5" [label="src/utility.h" tooltip="src/utility.h"]
"12" [label="string_view" tooltip="string_view"]
"7" [label="condition_variable" tooltip="condition_variable"]
"16" [label="bitset" tooltip="bitset"]
"34" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"10" [label="optional" tooltip="optional"]
"3" [label="unistd.h" tooltip="unistd.h"]
"4" [label="vector" tooltip="vector"]
"30" [label="array" tooltip="array"]
"19" [label="src/config.h" tooltip="src/config.h"]
"15" [label="src/platform/common.h" tooltip="src/platform/common.h"]
"21" [label="unordered_map" tooltip="unordered_map"]
"1" [label="src/platform/linux/vaapi.h" tooltip="src/platform/linux/vaapi.h" fillcolor="#BFBFBF"]
"9" [label="mutex" tooltip="mutex"]
"2" [label="misc.h" tooltip="misc.h"]
"20" [label="chrono" tooltip="chrono"]
"13" [label="type_traits" tooltip="type_traits"]
"35" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"24" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"6" [label="algorithm" tooltip="algorithm"]
"8" [label="memory" tooltip="memory"]
"33" -> "34" [dir=forward tooltip="include"]
"29" -> "30" [dir=forward tooltip="include"]
"29" -> "31" [dir=forward tooltip="include"]
"29" -> "7" [dir=forward tooltip="include"]
"29" -> "18" [dir=forward tooltip="include"]
"29" -> "32" [dir=forward tooltip="include"]
"29" -> "9" [dir=forward tooltip="include"]
"29" -> "4" [dir=forward tooltip="include"]
"29" -> "5" [dir=forward tooltip="include"]
"26" -> "20" [dir=forward tooltip="include"]
"26" -> "18" [dir=forward tooltip="include"]
"26" -> "27" [dir=forward tooltip="include"]
"26" -> "28" [dir=forward tooltip="include"]
"23" -> "24" [dir=forward tooltip="include"]
"23" -> "25" [dir=forward tooltip="include"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "7" [dir=forward tooltip="include"]
"5" -> "8" [dir=forward tooltip="include"]
"5" -> "9" [dir=forward tooltip="include"]
"5" -> "10" [dir=forward tooltip="include"]
"5" -> "11" [dir=forward tooltip="include"]
"5" -> "12" [dir=forward tooltip="include"]
"5" -> "13" [dir=forward tooltip="include"]
"5" -> "14" [dir=forward tooltip="include"]
"5" -> "4" [dir=forward tooltip="include"]
"19" -> "16" [dir=forward tooltip="include"]
"19" -> "20" [dir=forward tooltip="include"]
"19" -> "10" [dir=forward tooltip="include"]
"19" -> "11" [dir=forward tooltip="include"]
"19" -> "21" [dir=forward tooltip="include"]
"19" -> "4" [dir=forward tooltip="include"]
"19" -> "22" [dir=forward tooltip="include"]
"15" -> "16" [dir=forward tooltip="include"]
"15" -> "17" [dir=forward tooltip="include"]
"15" -> "18" [dir=forward tooltip="include"]
"15" -> "9" [dir=forward tooltip="include"]
"15" -> "11" [dir=forward tooltip="include"]
"15" -> "19" [dir=forward tooltip="include"]
"15" -> "23" [dir=forward tooltip="include"]
"15" -> "26" [dir=forward tooltip="include"]
"15" -> "29" [dir=forward tooltip="include"]
"15" -> "5" [dir=forward tooltip="include"]
"15" -> "33" [dir=forward tooltip="include"]
"15" -> "35" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "15" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "4" [dir=forward tooltip="include"]
"2" -> "5" [dir=forward tooltip="include"]
}](_images/graphviz-8b9969196727b9cae7c1459d85d776f119687616.png)
This graph shows which files directly or indirectly include vaapi.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="src/platform/linux/x11grab.cpp" tooltip="src/platform/linux/x11grab.cpp"]
"2" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"3" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"1" [label="src/platform/linux/vaapi.h" tooltip="src/platform/linux/vaapi.h" fillcolor="#BFBFBF"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
}](_images/graphviz-5fc885f9ad33266d8d46d009d9e6ad745cfe5edb.png)
todo
-
namespace egl#
-
namespace va#
wayland#
Include dependency graph for wayland.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"34" [label="atomic" tooltip="atomic"]
"24" [label="functional" tooltip="functional"]
"30" [label="limits" tooltip="limits"]
"21" [label="boost/log/sinks.hpp" tooltip="boost/log/sinks.hpp"]
"36" [label="src/video_colorspace.h" tooltip="src/video_colorspace.h"]
"23" [label="filesystem" tooltip="filesystem"]
"32" [label="src/thread_safe.h" tooltip="src/thread_safe.h"]
"29" [label="src/stat_trackers.h" tooltip="src/stat_trackers.h"]
"18" [label="variant" tooltip="variant"]
"28" [label="nvenc/nvenc_config.h" tooltip="nvenc/nvenc_config.h"]
"31" [label="boost/format.hpp" tooltip="boost/format.hpp"]
"16" [label="string" tooltip="string"]
"19" [label="src/logging.h" tooltip="src/logging.h"]
"35" [label="map" tooltip="map"]
"7" [label="glad/gl.h" tooltip="glad/gl.h"]
"1" [label="src/platform/linux/wayland.h" tooltip="src/platform/linux/wayland.h" fillcolor="#BFBFBF"]
"11" [label="src/utility.h" tooltip="src/utility.h"]
"13" [label="condition_variable" tooltip="condition_variable"]
"5" [label="string_view" tooltip="string_view"]
"2" [label="bitset" tooltip="bitset"]
"37" [label="libavutil/pixfmt.h" tooltip="libavutil/pixfmt.h"]
"4" [label="optional" tooltip="optional"]
"9" [label="unistd.h" tooltip="unistd.h"]
"10" [label="vector" tooltip="vector"]
"33" [label="array" tooltip="array"]
"25" [label="src/config.h" tooltip="src/config.h"]
"22" [label="src/platform/common.h" tooltip="src/platform/common.h"]
"27" [label="unordered_map" tooltip="unordered_map"]
"15" [label="mutex" tooltip="mutex"]
"8" [label="misc.h" tooltip="misc.h"]
"26" [label="chrono" tooltip="chrono"]
"17" [label="type_traits" tooltip="type_traits"]
"38" [label="moonlight-common-c/src/Limelight.h" tooltip="moonlight-common-c/src/Limelight.h"]
"20" [label="boost/log/common.hpp" tooltip="boost/log/common.hpp"]
"12" [label="algorithm" tooltip="algorithm"]
"3" [label="graphics.h" tooltip="graphics.h"]
"14" [label="memory" tooltip="memory"]
"6" [label="glad/egl.h" tooltip="glad/egl.h"]
"36" -> "37" [dir=forward tooltip="include"]
"32" -> "33" [dir=forward tooltip="include"]
"32" -> "34" [dir=forward tooltip="include"]
"32" -> "13" [dir=forward tooltip="include"]
"32" -> "24" [dir=forward tooltip="include"]
"32" -> "35" [dir=forward tooltip="include"]
"32" -> "15" [dir=forward tooltip="include"]
"32" -> "10" [dir=forward tooltip="include"]
"32" -> "11" [dir=forward tooltip="include"]
"29" -> "26" [dir=forward tooltip="include"]
"29" -> "24" [dir=forward tooltip="include"]
"29" -> "30" [dir=forward tooltip="include"]
"29" -> "31" [dir=forward tooltip="include"]
"19" -> "20" [dir=forward tooltip="include"]
"19" -> "21" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"11" -> "12" [dir=forward tooltip="include"]
"11" -> "13" [dir=forward tooltip="include"]
"11" -> "14" [dir=forward tooltip="include"]
"11" -> "15" [dir=forward tooltip="include"]
"11" -> "4" [dir=forward tooltip="include"]
"11" -> "16" [dir=forward tooltip="include"]
"11" -> "5" [dir=forward tooltip="include"]
"11" -> "17" [dir=forward tooltip="include"]
"11" -> "18" [dir=forward tooltip="include"]
"11" -> "10" [dir=forward tooltip="include"]
"25" -> "2" [dir=forward tooltip="include"]
"25" -> "26" [dir=forward tooltip="include"]
"25" -> "4" [dir=forward tooltip="include"]
"25" -> "16" [dir=forward tooltip="include"]
"25" -> "27" [dir=forward tooltip="include"]
"25" -> "10" [dir=forward tooltip="include"]
"25" -> "28" [dir=forward tooltip="include"]
"22" -> "2" [dir=forward tooltip="include"]
"22" -> "23" [dir=forward tooltip="include"]
"22" -> "24" [dir=forward tooltip="include"]
"22" -> "15" [dir=forward tooltip="include"]
"22" -> "16" [dir=forward tooltip="include"]
"22" -> "25" [dir=forward tooltip="include"]
"22" -> "19" [dir=forward tooltip="include"]
"22" -> "29" [dir=forward tooltip="include"]
"22" -> "32" [dir=forward tooltip="include"]
"22" -> "11" [dir=forward tooltip="include"]
"22" -> "36" [dir=forward tooltip="include"]
"22" -> "38" [dir=forward tooltip="include"]
"8" -> "9" [dir=forward tooltip="include"]
"8" -> "10" [dir=forward tooltip="include"]
"8" -> "11" [dir=forward tooltip="include"]
"3" -> "4" [dir=forward tooltip="include"]
"3" -> "5" [dir=forward tooltip="include"]
"3" -> "6" [dir=forward tooltip="include"]
"3" -> "7" [dir=forward tooltip="include"]
"3" -> "8" [dir=forward tooltip="include"]
"3" -> "19" [dir=forward tooltip="include"]
"3" -> "22" [dir=forward tooltip="include"]
"3" -> "11" [dir=forward tooltip="include"]
"3" -> "36" [dir=forward tooltip="include"]
}](_images/graphviz-b0ef38250b4adcb9f38321f932592d35f4584e2f.png)
This graph shows which files directly or indirectly include wayland.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="src/platform/linux/kmsgrab.cpp" tooltip="src/platform/linux/kmsgrab.cpp"]
"1" [label="src/platform/linux/wayland.h" tooltip="src/platform/linux/wayland.h" fillcolor="#BFBFBF"]
"5" [label="src/platform/linux/wlgrab.cpp" tooltip="src/platform/linux/wlgrab.cpp"]
"2" [label="src/platform/linux/cuda.cpp" tooltip="src/platform/linux/cuda.cpp"]
"4" [label="src/platform/linux/wayland.cpp" tooltip="src/platform/linux/wayland.cpp"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
}](_images/graphviz-97c8a598eb5add20f7f27b9abde9c08618e21138.png)
todo
x11grab#
Todo
Add x11grab.h
Changelog#
0.23.1 - 2024-04-20#
Fixed
(Capture/Windows) Disable HRD and CBR encoding options by default for AMD GPUs due to video quality regressions in v0.23.0
(UI) Fix incorrect strings for QuickSync ‘fast’ and ‘faster’ presets
(UI/Linux) Fix update prompt appearing even when running the latest version
(Input) Fix crash when absolute input events are received prior to the display viewport being set
(Input/Linux) Fix missing clamping of rumble intensity to valid range
(Build/Tests) Fix error when attempting to disable compilation of tests
(Build/Linux) Fix some compilation errors when using Musl libc
(Logging) Fix broken debug messages for codec capability flags
(Logging/Linux) Fix log messages to include the correct setcap command for resolving KMS permission errors
Added
(Capture/Linux) Improve frame time consistency for all capture backends
(UI) Set focus to the PIN textbox when navigating to the PIN tab
Dependencies
Remove libavdevice dependency
Misc
(Linux) Prefer ayatana-appindicator3 over appindicator3 if both are available
0.23.0 - 2024-04-06#
Attention, this release contains critical security fixes. Please update as soon as possible.
Breaking
(Linux) Drop support for Ubuntu 20.04
(Linux) No longer provide arm64 rpm packages, due to extreme compile time on GitHub hosted runners
Fixed
(Network) Ensure unpairing takes effect without restart
(Capture/Linux) Fix logical comparison of texture size
(Service/Windows) Quote the path to sunshinesvc.exe when launching the termination helper
Added
(WebUI) Localization support
(Capture/Linux) Populate host latency for kmx/x11 grab
(Capture/Windows) AMF rate control improvements
(Linux) Add support for Ubuntu 24.04 (x86_64 only)
Dependencies
Bump rstcheck from 6.2.0 to 6.2.1
Bump org.flatpak.Builder.BaseApp from 644487f to 6e295e6
Bump ffmpeg
Bump @fortawesome/fontawesome-free from 6.5.1 to 6.5.2
Misc
(Style) Refactored video encoder declarations
Refactored Linux build in CI
Added unit testing and code coverage
(Docs/macOS) Update curl command for Portfile install
(Style) Refactor logging initialization
0.22.2 - 2024-03-15#
Fixed
(Tray/Windows) Fix broken system tray icon on some systems
(Linux) Fix crash when XDG_CONFIG_HOME or CONFIGURATION_DIRECTORY are set
(Linux) Fix config migration across filesystems and with non-existent parent directories
0.22.1 - 2024-03-13#
Breaking
(ArchLinux) Drop support for standalone PKGBUILD files. Use the binary Arch package or install via AUR instead.
(macOS) Drop support for experimental dmg package. Use Homebrew or MacPorts instead.
Added
(macOS) Added Homebrew support
Changed
(Process/Windows) The working directory is now searched first when the command contains a relative path
(ArchLinux) The kmsgrab capture backend is now compiled by default to support Wayland capture on non-wlroots-based compositors
(Capture/Linux) X11 capture is now preferred over kmsgrab for cards that lack atomic modesetting support to ensure cursor capture works
(Capture/Linux) Kmsgrab will only choose NVENC by default if the display is connected to the Nvidia GPU to avoid possible EGL import failures
Fixed
(Config) Fix unsupported resolution error with some Moonlight clients
(Capture/Windows) Fix crash when streaming Ryujinx, Red Alert 2, and other apps that use unusually sized monochrome cursors
(Capture/Linux) Fix crash in KMS cursor capture when running on Arch-based distros
(Capture/Linux) Fix crash if CUDA GPU has a PCI ID with hexadecimal digits greater than 9
(Process/Windows) Fix starting apps when the working directory is enclosed in quotes
(Process/Windows) Fix process tree tracking when the app is launched via a cmd.exe trampoline
(Installer/Windows) Fix slow operation during ViGEmBus installation that may cause the installer to appear stuck
(Build/macOS) Fix issues building on macOS 13 and 14
(Build/Linux) Fix missing install script in the Arch binary package
(Build/Linux) Fix missing optional dependencies in the Arch binary package
(Build/Linux) Ensure correct Arch pkg is published to GitHub releases
(Capture/Linux) Fix mismatched case and unhandled exception in CUDA device lookup
(Config) Add missing resolution to default config ui
(Linux) Fix udev rules for uinput access not working until after reboot
(Linux) Fix wrong path in desktop files
(Tray) Cache icons to avoid possible DRM issues
(Tray) Fix attempt to update tray icon after it was destroyed
(Linux) Migrate old config files to new location if env SUNSHINE_MIGRATE_CONFIG=1 is set (automatically set for Flatpak)
(Linux/Fedora) Re-enable CUDA support and bump to 12.4.0
Misc
(Build/Windows) Adjust Windows debuginfo artifact to reduce confusion with real release binaries
0.22.0 - 2024-03-03#
Breaking
(Network) Clients must now be paired with the host before they can use Wake-on-LAN
(Build/Linux) Drop Fedora 37 support
Added
(Input/Linux) Add native/pen touch support for Linux
(Capture/Linux) Add HDR streaming support for Linux using KMS capture backend
(Capture/Linux) Add KMS capture support for Nvidia GPUs running Wayland
(Network) Add support for full E2E stream encryption, configurable for LAN and WAN independently
(Process) Add process group tracking to automatically handle launchers that spawn other child processes
(Capture/Windows) Add setting for controlling GPU power saving and encoding latency tradeoff for NVENC
(Capture/Windows) Add additional encoding settings for NVENC
(Process/Windows) Add experimental support for launching URLs and other non-exe files
(Capture/Windows) Add setting to allow use of slower HEVC encoding on older Intel GPUs
(Input/Windows) Add settings to control automatic gamepad type selection heuristics
(Input/Windows) Add setting to allow DS4 back/select button to trigger touchpad click
(Input) Add setting to disable high resolution scrolling and native pen/touch support
(Network) Add support for certificates types other than RSA-2048
(Build/Linux) Add Fedora 39 docker image and rpm package
(Capture/Linux) Display monitor indexes in logs for wlroots and KMS capture backends
(UI) Add link to logs inside fatal error container
(UI) Add hash handler and ids for all configuration categories and settings
Changed
(UI) Several configuration options have been moved to more suitable locations
(Network) Client-selected bitrate is now adjusted for FEC percentage and other stream overhead
(Capture/Linux) Improve VAAPI encoding performance on Intel GPUs
(Capture) Connection establishment delay is reduced by eliminating many encoder probing operations
(Process) Graceful termination of running processes is attempted first when stopping apps
(Capture) Improve software encoding performance by enabling multi-threaded color conversion
(Capture) Adjust default CPU thread count for software encoding from 1 to 2 for improved performance
(Steam/Windows) Modernized the default Steam app shortcut to avoid depending on Steam’s install location and support app termination
(Linux) Updated desktop files
(Config) Add 2560x1440 to default resolutions
(Network) Use the configured ping timeout for the initial launch event timeout
(UI) Migrate UI to Vite and Vue3, and various UX improvements
(Logging) Adjust wording and severity of some log messages
(Build) Use a single submodule for ffmpeg
(Install/Windows) Skip ViGEmBus installation if a supported version is already installed
(Build/Linux) Optionally, allow using the system installation of wayland-protocols
(Build/Linux) Make vaapi optional
(Windows) Replace boost::json with nlohmann/json
Fixed
(Network/Windows) Fix auto-discovery of hosts by iOS/tvOS clients
(Network) Fix immediate connection termination when streaming over some Internet connections
(Capture/Linux) Fix missing mouse cursor when using KMS capture on a GPU with hardware cursor support
(Capture/Windows) Add workaround for Nvidia driver bug causing Sunshine to crash when RTX HDR is globally enabled
(Capture/Windows) Add workaround for AMD driver bug on pre-RDNA GPUs causing hardware encoding failure
(Capture/Windows) Reintroduce support for NVENC on older Nvidia GPU drivers (v456.71-v522.25)
(Capture/Windows) Fix encoding on old Intel GPUs that don’t support low-power H.264 encoding
(Capture/Linux) Fix GL errors or corrupt video output on GPUs that use aux planes such as Intel Arc
(Capture/Linux) Fix GL errors or corrupt video output on GPUs that use DRM modifiers on YUV buffers
(Input/Windows) Fix non-functional duplicate controllers appearing in rare cases
(Input/Windows) Avoid triggering crash in ViGEmBus when the system goes to sleep
(Input/Linux) Fix scrolling in applications that don’t support high-resolution scrolling
(Input/Linux) Fix absolute mouse input being interpreted as touch input
(Capture/Linux) Fix wlroots capture causing GL errors and crashes
(Capture/Linux) Fix wlroots capture failing when the display scale factor was not 1
(Capture/Linux) Fix excessive CPU usage when using wlroots capture backend
(Capture/Linux) Fix capture of virtual displays created by the amdgpu kernel driver
(Audio/Windows) Fix audio capture failures on Insider Preview versions of Windows 11
(Capture/Windows) Fix incorrect portrait mode rotation
(Capture/Windows) Fix capture recovery when a driver update/crash occurs while streaming
(Capture/Windows) Fix delay displaying UAC dialogs when the mouse cursor is not moving
(Capture/Linux) Fix corrupt video output or stream disconnections if the display resolution changes while streaming
(Capture/Linux) Fix color of aspect ratio padding in the capture image with VAAPI
(Capture/Linux) Fix NVENC initialization error when using X11 capture with some GPUs
(Tray/Linux) Fix random crash when the tray icon is updating
(Network) Fix QoS tagging when running in IPv4+IPv6 mode
(Process) Fix termination of child processes upon app quit when the parent has already terminated
(Process) Fix notification of graceful termination to connected clients when Sunshine quits
(Capture) Fix corrupt output or green aspect-ratio padding when using software encoding with some video resolutions
(Windows) Fix crashes when processing file paths or other strings with certain non-ASCII characters
(Capture) Ensure user supplied framerates are used exclusively in place of pre-defined framerates
(CMake/Linux) Skip including unnecessary headers
(Capture/Linux) Replace vaTerminate method with dl handle
(Capture/Linux) Fix capture when DRM is enabled and x11 is disabled
(Tray) Use PROJECT_NAME definition for tooltip
(CMake) Use GNUInstallDirs to install data and lib directories
(macOS) Replace deprecated code
(API) Allow trailing slashes in on API endpoints
(API) Add additional pin validation
(Linux) Use XDG spec for fetching config directory
(CMake) Properly find evdev
(Config) Properly save global_prep_cmd and fps settings
Dependencies
Bump third-party/wayland-protocols from 681c33c to 46f201b
Bump third-party/nv-codec-headers from 9402b5a to 22441b5
Bump third-party/nanors from 395e5ad to e9e242e
Bump third-party/Simple-Web-Server from 2f29926 to 27b41f5
Bump ffmpeg
Bump third-party/tray from 2664388 to 2bf1c61
Bump actions/setup-python from 4 to 5
Bump actions/upload-artifact from 3 to 4
Bump @fortawesome/fontawesome-free from 6.4.2 to 6.5.1
Bump babel from 2.13.0 to 2.14.0
Move miniupnpc from submodule to system installed package
Bump furo from 2023.9.10 to 2024.1.29
Bump third-party/moonlight-common-c from f78f213 to cbd0ec1
Bump third-party/ViGEmClient from 1920260 to 8d71f67
Bump peter-evans/create-pull-request from 5 to 6
Bump bootstrap from 5.3.2 to 5.3.3
Misc
(Build) Update global workflows
(Docs/Linux) Add example for setting custom resolution with NVIDIA
(Docs) Fix broken links
(Docs/Windows) Add information about disk permissions
(Docs) Fix failing images
(Docs) Use glob pattern to match source code docs
(CI/macOS) Install boost from source
(Docs) Add reset credentials examples for unique packages
(Docs) Refactor and general cleanup
(Docs) Cross-reference config settings to the UI
(Docs/Docker) Add podman notes
(Build) Use CMAKE_SOURCE_DIR property everywhere
(Build/Docker) Add docker toolchain file for CLion
(macOS) Various code style fixes
(Deps) Alphabetize git submodules
(Docs/Examples) Update URI examples
(Refactor) Refactored some code in preparation for unit testing implementation
(CMake) Add option to skip cuda inheriting compile options
(CMake) Add option to error build on warnings
0.21.0 - 2023-10-15#
Added
(Input) Add support for automatically selecting the emulated controller type based on the physical controller connected to the client
(Input/Windows) Add support for Applications (context menu) key
(Input/Windows) Implement touchpad, motion sensors, battery state, and LED control for the emulated DualShock 4 controller
(Input) Advertise support for new input features to clients
(Linux/Debian) Added Debian Bookworm package
(Prep-Commands) Expose connection environment variables
(Input/Windows) Implement pen and touch support
(Capture/Windows) Add standalone NVENC encoder
(Capture) Implement AV1 encoding
(Network) Implement IPv6 support
(Capture/Windows) Add option to disable realtime hags
(Graphics/NVIDIA) Add an option to decrease GPU scheduling priority to workaround HAGS video hang
(Capture/Linux) Add FFmpeg powerpc64le architecture for self compiling Sunshine
(Capture/Windows) Add support for capturing rotated displays
(System Tray) Implement streaming event notifications
(UI) Add port configuration table
(Applications) Added option to automatically treat launcher type apps as detached commands
(Input/Gamepad) Allow the Misc button to work as Guide on emulated Xbox 360 controllers
Changed
(Input) Reduce latency by implementing input batching
(Logging) Move input packet debug prints off the control stream thread
(Input) Refactor gamepad emulation code to use DS4 extended report format
(Graphics/NVIDIA) Modify and restore NVIDIA control panel settings before and after stream, respectively
(Graphics/NVIDIA) New config page for NVENC
(Graphics/Windows) Refactor DX shaders
(Input/Windows) Use our own keycode mapping to avoid installing the US English keyboard layout
Fixed
(UI) Fix update notifications
(Dependencies/Linux) Replace libboost chrono and thread with standard chrono and thread
(Input) Increase maximum gamepad limit to 16
(Network) Allow use of multiple ENet channels
(Network) Consider link-local addresses on LAN
(Input) Fixed issue where button may sometimes stick on Windows
(Input) Fix “ControllerNumber not allocated” warning when a gamepad is removed
(Input) Fix handling of gamepad feedback with multiple clients connected
(Input) Fix clamping mouse position to aspect ratio adjusted viewport
(Graphics/AMD) Fix crash during startup on some older AMD GPUs
(Logging) Fix crash when non-ASCII characters are logged
(Prep-Commands) Fix resource exhaustion bug which could occur when many prep commands were used
(Subprocesses) Fix race condition when inserting new processes
(Logging) Log error if encoder doesn’t produce IDR frame on demand
(Audio) Improve audio capture logic and logging
(Logging) Fix AMF logging to match configured log level
(Logging) Log FFmpeg to log file instead of stdout
(Capture) Reject codecs that are not supported by display device
(Capture) Add fallbacks for unsupported codec settings
(Capture) Avoid probing HEVC or AV1 codecs in some cases
(Caputre) Remove DwmFlush()
(Capture/Windows) Improvements to capture sleeps for better frame stability
(Capture/Windows) Adjust capture rate to better match with display
(Linux/ArchLinux) Fix package version in PKGBUILD and precompiled package
(UI) Highlight fatal log messages in web ui
(Commands) Allow stream if prep command fails
(Capture/Linux) Fix KMS grab VRAM capture with libva 2.20
(Capture/macOS) Fix video capture backend
(Misc/Windows) Don’t start the session monitor window when launched in command mode
(Linux/AppImage) Use the linuxdeploy GTK plugin to correctly deploy GTK3 dependencies
(Input/Windows) Fix reWASD not recognizing emulated DualShock 4 input
Dependencies
Bump bootstrap from 5.2.3 to 5.3.2
Bump third-party/moonlight-common-c from c9426a6 to 7a6d12f
Bump gcc-10 in Ubuntu 20.04 docker image
Bump furo from 2023.5.20 to 2023.9.10
Bump sphinx from 7.0.1 to 7.2.6
Bump cmake from 3.26 to 3.27 in Fedora docker images
Move third-party/nv-codec-headers from sdk/11.1 branch to sdk/12.0 branch
Automatic bump ffmpeg
Bump actions/checkout from 3 to 4
Bump boost from 1.80 to 1.81 in Macport manifest
Bump @fortawesome/fontawesome-free from 6.4.0 to 6.4.2
Misc
(Docs) Force badges to use svg
(Docs) Add Linux SSH example
(Docs) Add information about mesa for Linux
Free additional space on Docker, Flatpak, and AppImage builds due to internal changes on GitHub runners
(Docs/Logging/UI) Corrected various typos
(Docs) Add blurb about Gamescope compatibility
(Installer/Windows) Use system proxy to download ViGEmBus
Ignore third-party directory for clang-format
(Docs/Linux) Add Plasma-Compatible resolution example
(Docs) Add Sunshine website available at https://app.lizardbyte.dev/Sunshine
(Build/Windows) Fix audio code build with new MinGW headers
(Build/Windows) Fix QoS code build with new MinGW headers
(CI/Windows) Prevent winget action from creating an update when running in a fork
(CI/Windows) Change winget job to ubuntu-latest runner
Add CodeQL analysis
(CI/Docker) Fix ArchLinux image caching issue
(Windows) Manifest improvements
(CI/macOS) Simplify macport build
(Docs) Remove deprecated options from readthedocs config
(CI/Docs) Lint rst files
(Docs) Update localization information (after consolidating Crowdin projects)
(Cmake) Split CMakelists into modules
(Docs) Add Linux Headless/SSH Guide
0.20.0 - 2023-05-28#
Breaking
(Windows) The Windows installer version of Sunshine is now always launched by the Sunshine Service. Manually launching Sunshine.exe from Program Files is no longer supported. This was necessary to address security issues caused by non-admin users having access to Sunshine’s config data. If you have set up Task Scheduler or other mechanisms to launch Sunshine automatically, remove those from your system before updating.
(Windows) The Start Menu shortcut has been redesigned for use with the Sunshine Service. It now launches Sunshine in the background (if not already running) and opens the Web UI, avoiding the persistent Command Prompt window present in prior versions. The Start Menu shortcut is now the recommended method for opening the Web UI and launching Sunshine.
(Network/UPnP) If the Moonlight Internet Hosting Tool is installed alongside Sunshine, you must remove it or upgrade to v5.6 or later to prevent conflicts with Sunshine’s UPnP support. As a reminder, the Moonlight Internet Hosting Tool is not required to stream over the Internet with Sunshine. Instead, simply enable UPnP in the Sunshine Web UI.
(Windows) If Steam is installed, the Steam Streaming Speakers driver will be automatically installed when starting a stream for the first time. This behavior can be disabled in the Audio/Video tab of the Web UI. This Steam driver enables support for surround sound and muting host audio without requiring any manual configuration.
(Input) The Back Button Timeout option has been renamed to Guide Button Emulation Timeout and has been disabled by default to ensure long presses on the Back button work by default. The previous behavior can be restored by setting the Guide Button Emulation Timeout to 2000.
(Windows) The service name of SunshineSvc has been changed to SunshineService to address a false positive in MalwareBytes. If you have any scripts or other logic on your system that is using the service name, you will need to update that for the new name.
(Windows) To support new installer features, install-service.bat no longer sets the service to auto-start by default. Users executing install-service.bat manually on the Sunshine portable build must also execute autostart-service.bat to start Sunshine on boot. However, installing the service manually like this is not recommended. Instead, use the Sunshine installer which handles service installation and configuration automatically.
(Linux/Fedora) Fedora 36 builds are removed due to upstream end of support
Added
(Windows) Added an option to launch apps and prep/undo commands as administrator
(Installer/Windows) Added an option to choose whether Sunshine launches on boot. If not configured to launch on boot, use the Start Menu shortcut to start Sunshine when desired.
(Input/Windows) Added option to send VK codes instead of scancodes for compatibility with iOS/Android devices using non-English keyboard layouts
(UI) The Apply/Restart option is now available in the Web UI for all platforms
(Systray) Added a Restart option to the system tray context menu
(Video/Windows) Added host latency data to video frames. This requires future updates to Moonlight to display in the on-screen overlay.
(Audio) Added support for matching Audio Sink and Virtual Sink values on device names
(Client) Added friendly error messages for clients when streaming fails to start
(Video/Windows) Added warning log messages when Windows is hiding DRM-protected content from display capture
(Interop/Windows) Added warning log messages when GeForce Experience is currently using the same ports as Sunshine
(Linux/Fedora) Fedora 38 builds are now available
Changed
(Video) Encoder selection now happens at each stream start for more reliable GPU detection
(Video/Windows) The host display now stays on while clients are actively streaming
(Audio) Streaming will no longer fail if audio capture is unavailable
(Audio/Windows) Sunshine will automatically switch back to the Virtual Sink if the default audio device is changed while streaming
(Audio) Changes to the host audio playback option will now take effect when resuming a session from Moonlight
(Audio/Windows) Sunshine will switch to a different default audio device if Steam Streaming Speakers are the default when Sunshine starts. This handles cases where Sunshine terminates unexpectedly without restoring the default audio device.
(Apps) The Connection Terminated dialog will no longer appear in Moonlight when the app on the host exits normally
(Systray/Windows) Quitting Sunshine via the system tray will now stop the Sunshine Service rather than leaving it running and allowing it to restart Sunshine
(UI) The 100.64.0.0/10 CGN IP address range is now treated as a LAN address range
(Video) Removed a workaround for some versions of Moonlight prior to mid-2022
(UI) The PIN field is now cleared after successfully pairing
(UI) User names are now treated as case-insensitive
(Linux) Changed udev rule to automatically grant access to virtual input devices
(UI) Several item descriptions were adjusted to reflect newer configuration recommendations
(UI) Placeholder text opacity has been reduced to improve contrast with non-placeholder text
(Video/Windows) Minor capture performance improvements
Fixed
(Video) VRAM usage while streaming is significantly reduced, particularly with higher display resolutions and HDR
(Network/UPnP) UPnP support was rewritten to fix several major issues handling router restarts, IP address changes, and port forwarding expiration
(Input) Fixed modifier keys from the software keyboard on Android clients
(Audio) Fixed handling of default audio device changes while streaming
(Windows) Fixed streaming after Microsoft Remote Desktop or Fast User Switching has been used
(Input) Fixed some games not recognizing emulated Guide button presses
(Video/Windows) Fixed incorrect gamma when using an Advanced Color SDR display on the host
(Installer/Windows) The installer is no longer blurry on High DPI systems
(Systray/Windows) Fixed multiple system tray icons appearing if Sunshine exits unexpectedly
(Systray/Windows) Fixed the system tray icon not appearing in several situations
(Windows) Fixed hang on shutdown/restart if mDNS registration fails
(UI) Fixed missing response headers
(Stability) Fixed several possible crashes in cases where the client did not successfully connect
(Stability) Fixed several memory leaks
(Input/Windows) Back/Select input now correctly generates the Share button when emulating DS4 controllers
(Audio/Windows) Fixed various bugs in audio-info.exe that led to inaccurate output on some systems
(Video/Windows) Fixed incorrect resolution values from dxgi-info.exe on High DPI systems
(Video/Linux) Fixed poor quality encoding from H.264 on Intel encoders
(Config) Fixed a couple of typos in predefined resolutions
Dependencies
Bump sphinx-copybutton from 0.5.1 to 0.5.2
Bump sphinx from 6.13 to 7.0.1
Bump third-party/nv-codec-headers from 2055784 to 2cd175b
Bump furo from 2023.3.27 to 2023.5.20
Misc
(Build/Linux) Add X11 to PLATFORM_LIBARIES when found
(Build/macOS) Fix compilation with Clang 14
(Docs) Fix nvlax URL
(Docs) Add diagrams using graphviz
(Docs) Improvements to source code documentation
(Build) Unpin docker dependencies
(Build/Linux) Honor install prefix for tray icon
(Build/Windows) Unstripped binaries are now provided as a debuginfo package to support crash dump debugging
(Config) Config directories are now created recursively
0.19.1 - 2023-03-30#
Fixed
(Audio) Fixed no audio issue introduced in v0.19.0
0.19.0 - 2023-03-29#
Breaking
(Linux/Flatpak) Moved Flatpak to org.freedesktop.Platform 22.08 and Cuda 12.0.0 This will drop support for Nvidia GPUs with compute capability 3.5
Added
(Input) Added option to suppress input from gamepads, keyboards, or mice
(Input/Linux) Added unicode support for remote pasting (may not work on all DEs)
(Input/Linux) Added XTest input fallback
(UI) Added version notifications to web UI
(Linux/Windows) Add system tray icon
(Windows) Added ability to safely elevate commands that fail due to insufficient permissions when running as a service
(Config) Added global prep commands, and ability to exclude an app from using global prep commands
(Installer/Windows) Automatically install ViGEmBus if selected
Changed
(Logging) Changed client verified messages to debug to prevent spamming the log
(Config) Only save non default config values
(Service/Linux) Use xdg-desktop-autostart for systemd service
(Linux) Added config option to force capture method
(Windows) Execute prep command in context of current user
(Linux) Allow disconnected X11 outputs
Fixed
(Input/Windows) Fix issue where internation keys were not translated correct, and modifier keys appeared stuck
(Linux) Fixed startup when /dev/dri didn’t exist
(UI) Changes software encoding settings to select menu instead of text input
(Initialization) Do not terminate upon failure, allowing access to the web UI
Dependencies
Bump third-party/moonlight-common-c from 07beb0f to c9426a6
Bump babel from 2.11.0 to 2.12.1
Bump @fortawesome/fontawesome-free from 6.2.1 to 6.4.0
Bump third-party/ViGEmClient from 9e842ba to 726404e
Bump ffmpeg
Bump third-party/miniupnp from 014c9df to e439318
Bump furo from 2022.12.7 to 2023.3.27
Bump third-party/nanors from 395e5ad to e9e242e
Misc
(GitHub) Shared feature request board with Moonlight
(Docs) Improved application examples
(Docs) Added WIP documentation for source code using Doxygen and Breathe
(Build) Fix linux clang build errors
(Build/Archlinux) Skip irrelevant submodules
(Build/Archlinux) Disable download timeout
(Build/macOS) Support compiling for earlier releases of macOS
(Docs) Add favicon
(Docs) Add missing config default values
(Build) Fix compiler warnings due to depreciated elements in C++17
(Build) Fix libcurl link errors
(Clang) Adjusted formatting rules
0.18.4 - 2023-02-20#
Fixed
(Linux/AUR) Drop support of AUR package
(Docker) General enhancements to docker images
0.18.3 - 2023-02-13#
Added
(Linux) Added PKGBUILD for Archlinux based distros to releases
(Linux) Added precompiled package for Archlinux based distros to releases
(Docker) Added archlinux docker image (x86_64 only)
0.18.2 - 2023-02-13#
Fixed
(Video/KMV/Linux) Fixed wayland capture on Nvidia for KMS
(Video/Linux) Implement vaSyncBuffer stuf for libva <2.9.0
(UI) Fix issue where mime type was not being set for node_modules when using a reverse proxy
(UI/macOS) Added missing audio sink config options
(Linux) Specify correct Boost dependency versions
(Video/AMF) Add missing encoder tunables
0.18.1 - 2023-01-31#
Fixed
(Linux) Fixed missing dependencies for deb and rpm packages
(Linux) Use dynamic boost
0.18.0 - 2023-01-29#
Attention, this release contains critical security fixes. Please update as soon as possible. Additionally, we are encouraging users to change your Sunshine password, especially if you expose the web UI (i.e. port 47790 by default) to the internet, or have ever uploaded your logs with verbose output to a public resource.
Added
(Windows) Add support for Intel QuickSync
(Linux) Added aarch64 deb and rpm packages
(Windows) Add support for hybrid graphics systems, such as laptops with both integrated and discrete GPUs
(Linux) Add support for streaming from Steam Deck Gaming Mode
(Windows) Add HDR support, see https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#hdr-support
Fixed
(Network) Refactor code for UPnP port forwarding
(Video) Enforce 10 FPS encoding frame rate minimum to improve static image quality
(Linux) deb and rpm packages are now specific to destination distro and version
(Docs) Add nvidia/nvenc preset migration guide
(Network) Performance optimizations
(Video/Windows) Fix streaming to multiple clients from hardware encoder
(Linux) Fix child process spawning
(Security) Fix security vulnerability in implementation of SimpleWebServer
(Misc) Rename “Steam BigPicture” to “Steam Big Picture” in default apps.json
(Security) Scrub basic authorization header from logs
(Linux) The systemd service will now restart in the event of a crash
(Video/KMS/Linux) Fixed error:
couldn't import RGB Image: 00003002 and 00003004
(Video/Windows) Fix stream freezing triggered by the resolution changed
(Installer/Windows) Fixes silent installation and other miscellaneous improvements
(CPU) Significantly improved CPU usage
0.17.0 - 2023-01-08#
If you are running Sunshine as a service on Windows, we are strongly urging you to update to v0.17.0 as soon as possible. Older Windows versions of Sunshine had a security flaw in which the binary was located in a user-writable location which is problematic when running as a service or on a multi-user system. Additionally, when running Sunshine as a service, games and applications were launched as SYSTEM. This could lead to issues with save files and other game settings. In v0.17.0, games now run under your user account without elevated privileges.
Breaking
(Apps) Removed automatic desktop entry (Re-add by adding an empty application named “Desktop” with no commands, “desktop.png” can be added as the image.)
(Windows) Improved user upgrade experience (Suggest to manually uninstall existing Sunshine version before this upgrade. Do NOT select to remove everything, if prompted. Make a backup of config files before uninstall.)
(Windows) Move config files to specific directory (files will be migrated automatically if using Windows installer)
(Dependencies) Fix npm path (breaking change for package maintainers)
Added
(macOS) Added initial support for arm64 on macOS through Macports portfile
(Input) Added support for foreign keyboard input
(Misc) Logs inside the WebUI and log to file
(UI/Windows) Added an Apply button to configuration page when running as a service
(Input/Windows) Enable Mouse Keys while streaming for systems with no physical mouse
Fixed
(Video) Improved capture performance
(Audio) Improved audio bitrate and quality handling
(Apps/Windows) Fixed PATH environment variable handling
(Apps/Windows) Use the proper environment variable for the Program Files (x86) folder
(Service/Windows) Fix SunshineSvc hanging if an error occurs during startup
(Service/Windows) Spawn Sunshine.exe in a job object, so it is terminated if SunshineSvc.exe dies
(Video) windows/vram: fix fringing in NV12 colour conversion
(Apps/Windows) Launch games under the correct user account
(Video) nvenc, amdvce: rework all user presets/options
(Network) Generate certificates with unique serial numbers
(Service/Windows) Graceful termination on shutdown, logoff, and service stop
(Apps/Windows) Fix launching apps when Sunshine is running as admin
(Misc) Remove/fix calls to std::abort()
(Misc) Remove prompt to press enter after Sunshine exits
(Misc) Make log priority consistent for execution messages
(Apps) Applications in Moonlight clients are now updated automatically after editing
(Video/Linux) Fix wayland capture on nvidia
(Audio) Fix 7.1 surround channel mapping
(Video) Fix NVENC profile values not applying
(Network) Fix origin_web_ui_allowed binding
(Service/Windows) Self terminate/restart service if process hangs for 10 seconds
(Input/Windows) Fix Windows masked cursor blending with GPU encoders
(Video) Color conversion fixes and BT.2020 support
Dependencies
Bump ffmpeg from 4.4 to 5.1
ffmpeg_patches: add amfenc delay/buffering fix
CBS moved to ffmpeg submodules
Migrate to upstream Simple-Web-Server submodule
Bump third-party/TPCircularBuffer from
bce9170
to8833b3a
Bump third-party/moonlight-common-c from
8169a31
toef9ad52
Bump third-party/miniupnp from
6f848ae
to207cf44
Bump third-party/ViGEmClient from
f719a1d
to9e842ba
Bump bootstrap from 5.0.0 to 5.2.3
Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1
0.16.0 - 2022-12-13#
Added
Add cover finder
(Docker) Add arm64 docker image
(Flatpak) Add installation helper scripts
(Windows) Add support for Unicode input messages
Fixed
(Linux) Reintroduce Ubuntu 20.04 and 22.04 specific deb packages
(Linux) Fixed udev and systemd file locations
Dependencies
Bump babel from 2.10.3 to 2.11.0
Bump sphinx-copybutton from 0.5.0 to 0.5.1
Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
Use npm for web dependencies (breaking change for third-party package maintainers)
Update moonlight-common-c
Use pre-built ffmpeg from LizardByte/build-deps for all sunshine builds (breaking change for third-party package maintainers)
Bump furo from 2022.9.29 to 2022.12.7
Misc
Misc org level workflow updates
Fix misc typos in docs
Fix winget release
0.15.0 - 2022-10-30#
Added
(Windows) Add firewall rules scripts
(Windows) Automatically add and remove firewall rules at install/uninstall
(Windows) Automatically add and remove service at install/uninstall
(Docker) Official image added
(Linux) Add aarch64 flatpak package
Changed
(Windows/Linux/MacOS) - Move default config and apps file to assets directory
(MacOS) Bump boost to 1.80 for macport builds
(Linux) Remove backup and restore of config files
Fixed
(Linux) - Create sunshine config directory if it doesn’t exist
(Linux) Remove portable home and config directories for AppImage
(Windows) Include service install and uninstall scripts again
(Windows) Automatically delete start menu entry upon uninstall
(Windows) Automatically delete program install directory upon uninstall, with user prompt
(Linux) Handle the case of no default audio sink
(Windows/Linux/MacOS) Fix default image paths
(Linux) Fix CUDA RGBA to NV12 conversion
0.14.1 - 2022-08-09#
Added
(Linux) Flatpak package added
(Linux) AUR package automated updates
(Windows) Winget package automated updates
Changed
(General) Moved repo to @LizardByte GitHub org
(WebUI) Fixed button spacing on home page
(WebUI) Added Discord WidgetBot Crate
Fixed
(Linux/Mac) Default config and app files now copied to user home directory
(Windows) Default config and app files now copied to working directory
0.14.0 - 2022-06-15#
Added
(Documentation) Added Sphinx documentation available at https://sunshinestream.readthedocs.io/en/latest/
(Development) Initial support for Localization
(Linux) Add rpm package as release asset
(macOS) Add Portfile as release asset
(Windows) Add DwmFlush() call to improve capture
(Windows) Add Windows installer
Fixed
(AMD) Fixed hwdevice being destroyed before context
(Linux) Added missing dependencies to AppImage
(Linux) Fixed rumble events causing game to freeze
(Linux) Improved Pulse/Pipewire compatibility
(Linux) Moved to single deb package
(macOS) Fixed missing TPCircularBuffer submodule
(Stream) Properly catch exceptions in stream broadcast handlers
(Stream/Video) AVPacket fix
0.13.0 - 2022-02-27#
Added
(macOS) Initial support for macOS (#40)
0.12.0 - 2022-02-13#
Added
New command line argument
--version
Custom png poster support
Changed
Correct software bitrate calculation
Increase vbv-bufsize to 1/10 of requested bitrate
Improvements to Web UI
0.11.1 - 2021-10-04#
Changed
(Linux) Fix search path for config file and assets
0.11.0 - 2021-10-04#
Added
(Linux) Added support for wlroots based compositors on Wayland.
(Windows) Added an icon for the executable
Changed
Fixed a bug causing segfault when connecting multiple controllers.
(Linux) Improved NVENC, it now offloads converting images from RGB to NV12
(Linux) Fixed a bug causes stuttering
0.10.1 - 2021-08-21#
Changed
(Linux) Re-enabled KMS
0.10.0 - 2021-08-20#
Added
Added support for Rumble with gamepads.
Added support for keyboard shortcuts <— See the README for details.
(Windows) A very basic script has been added in Sunshine-Windowstools <– This will start Sunshine at boot with the highest privileges which is needed to display the login prompt.
Changed
Some cosmetic changes to the WebUI.
The first time the WebUI is opened, it will request the creation of a username/password pair from the user.
Fixed audio crackling introduced in version 0.8.0
(Linux) VAAPI hardware encoding now works on Intel i7-6700 at least. <– For the best experience, using ffmpeg version 4.3 or higher is recommended.
(Windows) Installing from debian package shouldn’t overwrite your configuration files anymore. <– It’s recommended that you back up
/etc/sunshine/
before testing this.
0.9.0 - 2021-07-11#
Added
Added audio encryption
(Linux) Added basic NVENC support on Linux
(Windows) The Windows version can now capture the lock screen and the UAC prompt as long as it’s run through
PsExec.exe
https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
Changed
Sunshine will now accept expired or not-yet-valid certificates, as long as they are signed properly.
Fixed compatibility with iOS version of Moonlight
Drastically reduced chance of being forced to skip error correction due to video frame size
(Linux) sunshine.service will be installed automatically.
0.8.0 - 2021-06-30#
Added
Added mDNS support: Moonlight will automatically find Sunshine.
Added UPnP support. It’s off by default.
0.7.7 - 2021-06-24#
Added
(Linux) Added installation package for Debian
Changed
Fixed incorrect scaling for absolute mouse coordinates when using multiple monitors.
Fixed incorrect colors when scaling for software encoder
0.7.1 - 2021-06-18#
Changed
(Linux) Fixed an issue where it was impossible to start sunshine on ubuntu 20.04
0.7.0 - 2021-06-16#
Added
Added a Web Manager. Accessible through: https://localhost:47990 or https://
:47990 (Linux) Added hardware encoding support for AMD on Linux
Changed
(Linux) Moved certificates and saved pairings generated during runtime to .config/sunshine on Linux
0.6.0 - 2021-05-26#
Added
Added support for surround audio
Changed
Maintain aspect ratio when scaling video
Fix issue where Sunshine is forced to drop frames when they are too large
0.5.0 - 2021-05-13#
Added
Added support for absolute mouse coordinates
(Linux) Added support for streaming specific monitor on Linux
(Windows) Added support for AMF on Windows
0.4.0 - 2020-05-03#
Changed
prep-cmd is now optional in apps.json
Fixed bug causing video artifacts
Fixed bug preventing Moonlight from closing app on exit
Fixed bug causing preventing keyboard keys from repeating on latest version of Moonlight
Fixed bug causing segfault when another session of sunshine was already running
Fixed bug causing crash when monitor has resolution 1366x768
0.3.1 - 2020-04-24#
Changed
Fix a memory leak.
0.3.0 - 2020-04-23#
Changed
Hardware acceleration on NVidia GPU’s for Video encoding on Windows
0.2.0 - 2020-03-21#
Changed
Multicasting is now supported: You can set the maximum simultaneous connections with the configurable option: channels
Configuration variables can be overwritten on the command line: “name=value” –> it can be useful to set min_log_level=debug without modifying the configuration file
Switches to make testing the pairing mechanism more convenient has been added, see “sunshine –help” for details
0.1.1 - 2020-01-30#
Added
(Linux) Added deb package and service for Linux
0.1.0 - 2020-01-27#
Added
The first official release for Sunshine!