Showing preview only (4,001K chars total). Download the full file or copy to clipboard to get everything.
Repository: ClassicOldSong/Apollo
Branch: master
Commit: 003393ee1800
Files: 430
Total size: 3.7 MB
Directory structure:
gitextract_caung7mp/
├── .clang-format
├── .dockerignore
├── .flake8
├── .gitattributes
├── .github/
│ ├── CONTRIBUTING.md
│ ├── copilot-instructions.md
│ └── matchers/
│ ├── copr-ci.json
│ ├── docker.json
│ ├── gcc-strip3.json
│ └── gcc.json
├── .gitignore
├── .gitmodules
├── .prettierrc.json
├── .readthedocs.yaml
├── CMakeLists.txt
├── DOCKER_README.md
├── LICENSE
├── NOTICE
├── README.md
├── apollo.icns
├── cmake/
│ ├── FindLIBCAP.cmake
│ ├── FindLIBDRM.cmake
│ ├── FindLibva.cmake
│ ├── FindSystemd.cmake
│ ├── FindUdev.cmake
│ ├── FindWayland.cmake
│ ├── compile_definitions/
│ │ ├── common.cmake
│ │ ├── linux.cmake
│ │ ├── macos.cmake
│ │ ├── unix.cmake
│ │ └── windows.cmake
│ ├── dependencies/
│ │ ├── Boost_Sunshine.cmake
│ │ ├── common.cmake
│ │ ├── libevdev_Sunshine.cmake
│ │ ├── linux.cmake
│ │ ├── macos.cmake
│ │ ├── nlohmann_json.cmake
│ │ ├── unix.cmake
│ │ └── windows.cmake
│ ├── macros/
│ │ ├── common.cmake
│ │ ├── linux.cmake
│ │ ├── macos.cmake
│ │ ├── unix.cmake
│ │ └── windows.cmake
│ ├── packaging/
│ │ ├── common.cmake
│ │ ├── linux.cmake
│ │ ├── macos.cmake
│ │ ├── unix.cmake
│ │ ├── windows.cmake
│ │ ├── windows_nsis.cmake
│ │ └── windows_wix.cmake
│ ├── prep/
│ │ ├── build_version.cmake
│ │ ├── constants.cmake
│ │ ├── init.cmake
│ │ ├── options.cmake
│ │ └── special_package_configuration.cmake
│ └── targets/
│ ├── common.cmake
│ ├── linux.cmake
│ ├── macos.cmake
│ ├── unix.cmake
│ └── windows.cmake
├── codecov.yml
├── crowdin.yml
├── docker/
│ ├── archlinux.dockerfile
│ ├── clion-toolchain.dockerfile
│ ├── debian-trixie.dockerfile
│ ├── ubuntu-22.04.dockerfile
│ └── ubuntu-24.04.dockerfile
├── docs/
│ ├── Doxyfile
│ ├── api.js
│ ├── api.md
│ ├── app_examples.md
│ ├── awesome_sunshine.md
│ ├── building.md
│ ├── changelog.md
│ ├── configuration.js
│ ├── configuration.md
│ ├── contributing.md
│ ├── doc-styles.css
│ ├── gamestream_migration.md
│ ├── getting_started.md
│ ├── guides.md
│ ├── legal.md
│ ├── performance_tuning.md
│ ├── third_party_packages.md
│ └── troubleshooting.md
├── gh-pages-template/
│ ├── .readthedocs.yaml
│ ├── _config.yml
│ └── index.html
├── package.json
├── packaging/
│ ├── linux/
│ │ ├── AppImage/
│ │ │ ├── AppRun
│ │ │ └── dev.lizardbyte.app.Sunshine.desktop
│ │ ├── Arch/
│ │ │ ├── PKGBUILD
│ │ │ └── sunshine.install
│ │ ├── dev.lizardbyte.app.Sunshine.desktop
│ │ ├── dev.lizardbyte.app.Sunshine.metainfo.xml
│ │ ├── dev.lizardbyte.app.Sunshine.terminal.desktop
│ │ ├── fedora/
│ │ │ └── Sunshine.spec
│ │ ├── flatpak/
│ │ │ ├── README.md
│ │ │ ├── apps.json
│ │ │ ├── dev.lizardbyte.app.Sunshine.desktop
│ │ │ ├── dev.lizardbyte.app.Sunshine.yml
│ │ │ ├── exceptions.json
│ │ │ ├── flathub.json
│ │ │ ├── modules/
│ │ │ │ ├── avahi.json
│ │ │ │ ├── boost.json
│ │ │ │ ├── cuda.json
│ │ │ │ ├── libevdev.json
│ │ │ │ ├── libnotify.json
│ │ │ │ ├── miniupnpc.json
│ │ │ │ ├── nlohmann_json.json
│ │ │ │ ├── numactl.json
│ │ │ │ └── xvfb/
│ │ │ │ ├── xvfb-run
│ │ │ │ └── xvfb.json
│ │ │ └── scripts/
│ │ │ ├── additional-install.sh
│ │ │ ├── remove-additional-install.sh
│ │ │ └── sunshine.sh
│ │ ├── patches/
│ │ │ ├── aarch64/
│ │ │ │ └── 01-math_functions.patch
│ │ │ └── x86_64/
│ │ │ └── 01-math_functions.patch
│ │ └── sunshine.service.in
│ └── sunshine.rb
├── scripts/
│ ├── _locale.py
│ ├── icons/
│ │ └── convert_and_pack.sh
│ ├── linux_build.sh
│ ├── requirements.txt
│ └── update_clang_format.py
├── src/
│ ├── audio.cpp
│ ├── audio.h
│ ├── cbs.cpp
│ ├── cbs.h
│ ├── config.cpp
│ ├── config.h
│ ├── confighttp.cpp
│ ├── confighttp.h
│ ├── crypto.cpp
│ ├── crypto.h
│ ├── display_device.cpp
│ ├── display_device.h
│ ├── entry_handler.cpp
│ ├── entry_handler.h
│ ├── file_handler.cpp
│ ├── file_handler.h
│ ├── globals.cpp
│ ├── globals.h
│ ├── httpcommon.cpp
│ ├── httpcommon.h
│ ├── input.cpp
│ ├── input.h
│ ├── logging.cpp
│ ├── logging.h
│ ├── main.cpp
│ ├── main.h
│ ├── move_by_copy.h
│ ├── network.cpp
│ ├── network.h
│ ├── nvenc/
│ │ ├── nvenc_base.cpp
│ │ ├── nvenc_base.h
│ │ ├── nvenc_colorspace.h
│ │ ├── nvenc_config.h
│ │ ├── nvenc_d3d11.cpp
│ │ ├── nvenc_d3d11.h
│ │ ├── nvenc_d3d11_native.cpp
│ │ ├── nvenc_d3d11_native.h
│ │ ├── nvenc_d3d11_on_cuda.cpp
│ │ ├── nvenc_d3d11_on_cuda.h
│ │ ├── nvenc_encoded_frame.h
│ │ ├── nvenc_utils.cpp
│ │ └── nvenc_utils.h
│ ├── nvhttp.cpp
│ ├── nvhttp.h
│ ├── platform/
│ │ ├── common.h
│ │ ├── linux/
│ │ │ ├── audio.cpp
│ │ │ ├── cuda.cpp
│ │ │ ├── cuda.cu
│ │ │ ├── cuda.h
│ │ │ ├── graphics.cpp
│ │ │ ├── graphics.h
│ │ │ ├── input/
│ │ │ │ ├── inputtino.cpp
│ │ │ │ ├── inputtino_common.h
│ │ │ │ ├── inputtino_gamepad.cpp
│ │ │ │ ├── inputtino_gamepad.h
│ │ │ │ ├── inputtino_keyboard.cpp
│ │ │ │ ├── inputtino_keyboard.h
│ │ │ │ ├── inputtino_mouse.cpp
│ │ │ │ ├── inputtino_mouse.h
│ │ │ │ ├── inputtino_pen.cpp
│ │ │ │ ├── inputtino_pen.h
│ │ │ │ ├── inputtino_touch.cpp
│ │ │ │ └── inputtino_touch.h
│ │ │ ├── kmsgrab.cpp
│ │ │ ├── misc.cpp
│ │ │ ├── misc.h
│ │ │ ├── publish.cpp
│ │ │ ├── vaapi.cpp
│ │ │ ├── vaapi.h
│ │ │ ├── wayland.cpp
│ │ │ ├── wayland.h
│ │ │ ├── wlgrab.cpp
│ │ │ ├── x11grab.cpp
│ │ │ └── x11grab.h
│ │ ├── macos/
│ │ │ ├── av_audio.h
│ │ │ ├── av_audio.m
│ │ │ ├── av_img_t.h
│ │ │ ├── av_video.h
│ │ │ ├── av_video.m
│ │ │ ├── display.mm
│ │ │ ├── input.cpp
│ │ │ ├── microphone.mm
│ │ │ ├── misc.h
│ │ │ ├── misc.mm
│ │ │ ├── nv12_zero_device.cpp
│ │ │ ├── nv12_zero_device.h
│ │ │ └── publish.cpp
│ │ └── windows/
│ │ ├── PolicyConfig.h
│ │ ├── audio.cpp
│ │ ├── display.h
│ │ ├── display_base.cpp
│ │ ├── display_ram.cpp
│ │ ├── display_vram.cpp
│ │ ├── display_wgc.cpp
│ │ ├── input.cpp
│ │ ├── keylayout.h
│ │ ├── misc.cpp
│ │ ├── misc.h
│ │ ├── nvprefs/
│ │ │ ├── driver_settings.cpp
│ │ │ ├── driver_settings.h
│ │ │ ├── nvapi_opensource_wrapper.cpp
│ │ │ ├── nvprefs_common.cpp
│ │ │ ├── nvprefs_common.h
│ │ │ ├── nvprefs_interface.cpp
│ │ │ ├── nvprefs_interface.h
│ │ │ ├── undo_data.cpp
│ │ │ ├── undo_data.h
│ │ │ ├── undo_file.cpp
│ │ │ └── undo_file.h
│ │ ├── publish.cpp
│ │ ├── utils.cpp
│ │ ├── utils.h
│ │ ├── virtual_display.cpp
│ │ ├── virtual_display.h
│ │ └── windows.rc
│ ├── process.cpp
│ ├── process.h
│ ├── round_robin.h
│ ├── rswrapper.c
│ ├── rswrapper.h
│ ├── rtsp.cpp
│ ├── rtsp.h
│ ├── stat_trackers.cpp
│ ├── stat_trackers.h
│ ├── stream.cpp
│ ├── stream.h
│ ├── sync.h
│ ├── system_tray.cpp
│ ├── system_tray.h
│ ├── task_pool.h
│ ├── thread_pool.h
│ ├── thread_safe.h
│ ├── upnp.cpp
│ ├── upnp.h
│ ├── utility.h
│ ├── uuid.h
│ ├── video.cpp
│ ├── video.h
│ ├── video_colorspace.cpp
│ ├── video_colorspace.h
│ └── zwpad.h
├── src_assets/
│ ├── common/
│ │ └── assets/
│ │ └── web/
│ │ ├── Checkbox.vue
│ │ ├── ClientCard.vue
│ │ ├── Navbar.vue
│ │ ├── PlatformLayout.vue
│ │ ├── ResourceCard.vue
│ │ ├── ThemeToggle.vue
│ │ ├── apollo_version.js
│ │ ├── apps.html
│ │ ├── config.html
│ │ ├── configs/
│ │ │ └── tabs/
│ │ │ ├── Advanced.vue
│ │ │ ├── AudioVideo.vue
│ │ │ ├── ContainerEncoders.vue
│ │ │ ├── Files.vue
│ │ │ ├── General.vue
│ │ │ ├── Inputs.vue
│ │ │ ├── Network.vue
│ │ │ ├── audiovideo/
│ │ │ │ ├── AdapterNameSelector.vue
│ │ │ │ ├── DisplayDeviceOptions.vue
│ │ │ │ ├── DisplayModesSettings.vue
│ │ │ │ └── DisplayOutputSelector.vue
│ │ │ └── encoders/
│ │ │ ├── AmdAmfEncoder.vue
│ │ │ ├── IntelQuickSyncEncoder.vue
│ │ │ ├── NvidiaNvencEncoder.vue
│ │ │ ├── SoftwareEncoder.vue
│ │ │ ├── VAAPIEncoder.vue
│ │ │ └── VideotoolboxEncoder.vue
│ │ ├── index.html
│ │ ├── init.js
│ │ ├── locale.js
│ │ ├── login.html
│ │ ├── password.html
│ │ ├── pin.html
│ │ ├── platform-i18n.js
│ │ ├── public/
│ │ │ └── assets/
│ │ │ ├── css/
│ │ │ │ └── apollo.css
│ │ │ └── locale/
│ │ │ ├── bg.json
│ │ │ ├── cs.json
│ │ │ ├── de.json
│ │ │ ├── en.json
│ │ │ ├── en_GB.json
│ │ │ ├── en_US.json
│ │ │ ├── es.json
│ │ │ ├── fr.json
│ │ │ ├── hu.json
│ │ │ ├── it.json
│ │ │ ├── ja.json
│ │ │ ├── ko.json
│ │ │ ├── pl.json
│ │ │ ├── pt.json
│ │ │ ├── pt_BR.json
│ │ │ ├── ru.json
│ │ │ ├── sv.json
│ │ │ ├── tr.json
│ │ │ ├── uk.json
│ │ │ ├── vi.json
│ │ │ ├── zh.json
│ │ │ └── zh_TW.json
│ │ ├── template_header.html
│ │ ├── theme.js
│ │ ├── troubleshooting.html
│ │ └── welcome.html
│ ├── linux/
│ │ ├── assets/
│ │ │ ├── apps.json
│ │ │ └── shaders/
│ │ │ └── opengl/
│ │ │ ├── ConvertUV.frag
│ │ │ ├── ConvertUV.vert
│ │ │ ├── ConvertY.frag
│ │ │ ├── Scene.frag
│ │ │ └── Scene.vert
│ │ └── misc/
│ │ ├── 60-sunshine.conf
│ │ ├── 60-sunshine.rules
│ │ └── postinst
│ ├── macos/
│ │ ├── assets/
│ │ │ ├── Info.plist
│ │ │ └── apps.json
│ │ └── misc/
│ │ └── uninstall_pkg.sh
│ └── windows/
│ ├── assets/
│ │ ├── apps.json
│ │ └── shaders/
│ │ └── directx/
│ │ ├── convert_yuv420_packed_uv_type0_ps.hlsl
│ │ ├── convert_yuv420_packed_uv_type0_ps_linear.hlsl
│ │ ├── convert_yuv420_packed_uv_type0_ps_perceptual_quantizer.hlsl
│ │ ├── convert_yuv420_packed_uv_type0_vs.hlsl
│ │ ├── convert_yuv420_packed_uv_type0s_ps.hlsl
│ │ ├── convert_yuv420_packed_uv_type0s_ps_linear.hlsl
│ │ ├── convert_yuv420_packed_uv_type0s_ps_perceptual_quantizer.hlsl
│ │ ├── convert_yuv420_packed_uv_type0s_vs.hlsl
│ │ ├── convert_yuv420_planar_y_ps.hlsl
│ │ ├── convert_yuv420_planar_y_ps_linear.hlsl
│ │ ├── convert_yuv420_planar_y_ps_perceptual_quantizer.hlsl
│ │ ├── convert_yuv420_planar_y_vs.hlsl
│ │ ├── convert_yuv444_packed_ayuv_ps.hlsl
│ │ ├── convert_yuv444_packed_ayuv_ps_linear.hlsl
│ │ ├── convert_yuv444_packed_vs.hlsl
│ │ ├── convert_yuv444_packed_y410_ps.hlsl
│ │ ├── convert_yuv444_packed_y410_ps_linear.hlsl
│ │ ├── convert_yuv444_packed_y410_ps_perceptual_quantizer.hlsl
│ │ ├── convert_yuv444_planar_ps.hlsl
│ │ ├── convert_yuv444_planar_ps_linear.hlsl
│ │ ├── convert_yuv444_planar_ps_perceptual_quantizer.hlsl
│ │ ├── convert_yuv444_planar_vs.hlsl
│ │ ├── cursor_ps.hlsl
│ │ ├── cursor_ps_normalize_white.hlsl
│ │ ├── cursor_vs.hlsl
│ │ └── include/
│ │ ├── base_vs.hlsl
│ │ ├── base_vs_types.hlsl
│ │ ├── common.hlsl
│ │ ├── convert_base.hlsl
│ │ ├── convert_linear_base.hlsl
│ │ ├── convert_perceptual_quantizer_base.hlsl
│ │ ├── convert_yuv420_packed_uv_ps_base.hlsl
│ │ ├── convert_yuv420_planar_y_ps_base.hlsl
│ │ └── convert_yuv444_ps_base.hlsl
│ ├── drivers/
│ │ └── sudovda/
│ │ ├── SudoVDA.inf
│ │ ├── install.bat
│ │ ├── sudovda.cat
│ │ ├── sudovda.cer
│ │ └── uninstall.bat
│ └── misc/
│ ├── autostart/
│ │ └── autostart-service.bat
│ ├── firewall/
│ │ ├── add-firewall-rule.bat
│ │ └── delete-firewall-rule.bat
│ ├── gamepad/
│ │ ├── install-gamepad.ps1
│ │ └── uninstall-gamepad.ps1
│ ├── migration/
│ │ └── migrate-config.bat
│ ├── path/
│ │ └── update-path.bat
│ └── service/
│ ├── install-service.bat
│ └── uninstall-service.bat
├── tests/
│ ├── CMakeLists.txt
│ ├── fixtures/
│ │ └── http/
│ │ ├── hello-redirect.txt
│ │ └── hello.txt
│ ├── integration/
│ │ ├── test_config_consistency.cpp
│ │ ├── test_external_commands.cpp
│ │ └── test_locale_consistency.cpp
│ ├── tests_common.h
│ ├── tests_environment.h
│ ├── tests_events.h
│ ├── tests_log_checker.h
│ ├── tests_main.cpp
│ └── unit/
│ ├── platform/
│ │ └── test_common.cpp
│ ├── test_audio.cpp
│ ├── test_display_device.cpp
│ ├── test_entry_handler.cpp
│ ├── test_file_handler.cpp
│ ├── test_http_pairing.cpp
│ ├── test_httpcommon.cpp
│ ├── test_logging.cpp
│ ├── test_mouse.cpp
│ ├── test_network.cpp
│ ├── test_rswrapper.cpp
│ ├── test_stream.cpp
│ └── test_video.cpp
├── third-party/
│ ├── .clang-format-ignore
│ ├── glad/
│ │ ├── include/
│ │ │ ├── EGL/
│ │ │ │ └── eglplatform.h
│ │ │ ├── KHR/
│ │ │ │ └── khrplatform.h
│ │ │ └── glad/
│ │ │ ├── egl.h
│ │ │ └── gl.h
│ │ └── src/
│ │ ├── egl.c
│ │ └── gl.c
│ ├── nvfbc/
│ │ ├── NvFBC.h
│ │ └── helper_math.h
│ └── sudovda/
│ ├── sudovda-ioctl.h
│ └── sudovda.h
├── tools/
│ ├── CMakeLists.txt
│ ├── audio.cpp
│ ├── dxgi.cpp
│ ├── sunshinesvc.cpp
│ ├── utils.cpp
│ └── utils.h
└── vite.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
---
# This file is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveAssignments: None
AlignEscapedNewlines: DontAlign
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: true
AlignTrailingComments: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false
BinPackParameters: false
BracedInitializerIndentWidth: 2
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: true
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterUnion: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: true
IncludeBlocks: Regroup
IndentAccessModifiers: false
IndentCaseBlocks: true
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 2
IndentWrappedFunctionNames: true
InsertBraces: true
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Never
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 1
PenaltyBreakString: 1
PenaltyBreakFirstLessLess: 0
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 100000000
PointerAlignment: Right
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveSemicolon: false
SeparateDefinitionBlocks: Always
SortIncludes: CaseInsensitive
SortUsingDeclarations: Lexicographic
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Maximum: 3
Minimum: 1
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 2
UseTab: Never
================================================
FILE: .dockerignore
================================================
# ignore hidden files
.*
# do not ignore .git, needed for versioning
!/.git
# do not ignore .rstcheck.cfg, needed to test building docs
!/.rstcheck.cfg
# ignore repo directories and files
docker/
gh-pages-template/
scripts/
tools/
crowdin.yml
# don't ignore linux build script
!scripts/linux_build.sh
# ignore dev directories
build/
cmake-*/
venv/
# ignore artifacts
artifacts/
================================================
FILE: .flake8
================================================
[flake8]
filename =
*.py
max-line-length = 120
extend-exclude =
.venv/
venv/
================================================
FILE: .gitattributes
================================================
# ensure Linux specific files are checked out with LF line endings
Dockerfile text eol=lf
*.dockerfile text eol=lf
*flatpak-lint-*.json text eol=lf
*.sh text eol=lf
================================================
FILE: .github/CONTRIBUTING.md
================================================
# Contributing Guidelines
Thank you for your interest in contributing to this project! We welcome contributions from the community and appreciate your efforts to make this project better.
## How to Contribute
### Reporting Issues
- Use the GitHub issue tracker to report bugs or request features
- Before creating a new issue, please search existing issues to avoid duplicates
- Provide clear, detailed descriptions with steps to reproduce bugs
- Include relevant system information and logs when applicable
### Code Contributions
#### Getting Started
1. Fork the repository
2. Create a new branch for your feature or bugfix: `git checkout -b feature/your-feature-name`
3. Make your changes
4. Test your changes thoroughly
5. Commit your changes with clear, descriptive messages
6. Push your branch to your fork
7. Create a pull request
#### Code Standards
- Follow the existing code style and formatting conventions
- Write clear, readable code with appropriate comments
- Ensure all changes are sound
- Keep commits focused and atomic
#### Pull Request Guidelines
- Provide a clear description of what your PR does
- Reference any related issues using keywords like "Fixes #123"
- Include screenshots or examples if your changes affect the UI
- Be responsive to feedback and suggestions during code review
## Important Rules
### AI-Generated Code Policy
**AI-generated code is acceptable, but please make sure you have thoroughly reviewed and understand what it does.**
When using AI tools to generate code:
- Review every line of generated code carefully
- Understand the logic and potential implications
- Test the code thoroughly in your environment
- Ensure it follows project conventions and best practices
- Take responsibility for any issues that may arise from the generated code
***IMPORTANT: Don't trust AI generated tests. Test each modifications manually.***
### Code Review Process
- All contributions must go through code review
- Maintainers will review your pull request and provide feedback
- Address all feedback before the PR can be merged
- Be patient and respectful during the review process
## Development Setup
Please refer to the README.md file for instructions on setting up your development environment.
## Questions?
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Contact the maintainers
- Check existing documentation
Thank you for contributing!
================================================
FILE: .github/copilot-instructions.md
================================================
On Windows we use msys2 and ucrt64 to compile.
You need to prefix commands with `C:\msys64\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c`.
Prefix build directories with `cmake-build-`.
The test executable is named `test_sunshine` and will be located inside the `tests` directory within
the build directory.
The project uses gtest as a test framework.
Always follow the style guidelines defined in .clang-format for c/c++ code.
================================================
FILE: .github/matchers/copr-ci.json
================================================
{
"problemMatcher": [
{
"owner": "copr-ci-gcc",
"pattern": [
{
"regexp": "^/?(?:[^/]+/){5}([^:]+):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
================================================
FILE: .github/matchers/docker.json
================================================
{
"problemMatcher": [
{
"owner": "docker-gcc",
"pattern": [
{
"regexp": "^(?:#\\d+\\s+\\d+\\.\\d+\\s+)?/?(?:[^/]+/){2}([^:]+):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
================================================
FILE: .github/matchers/gcc-strip3.json
================================================
{
"problemMatcher": [
{
"owner": "gcc-strip3",
"pattern": [
{
"regexp": "^/?(?:[^/]+/){3}([^:]+):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
================================================
FILE: .github/matchers/gcc.json
================================================
{
"problemMatcher": [
{
"owner": "gcc",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
},
{
"owner": "doxygen",
"pattern": [
{
"regexp": "^.*?([A-Za-z]:[\\\\/][^:]+|[\\\\/][^:]+):(\\d+): ([a-zA-Z]+): (.+)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
================================================
FILE: .gitignore
================================================
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# JetBrains IDE
.idea/
# VSCode IDE
.vscode/
# build directories
build/
cmake-*/
docs/doxyconfig*
# npm
node_modules/
package-lock.json
# Translations
*.mo
*.pot
# Dummy macOS files
.DS_Store
# Python
*.pyc
venv/
================================================
FILE: .gitmodules
================================================
[submodule "packaging/linux/flatpak/deps/flatpak-builder-tools"]
path = packaging/linux/flatpak/deps/flatpak-builder-tools
url = https://github.com/flatpak/flatpak-builder-tools.git
branch = master
[submodule "packaging/linux/flatpak/deps/shared-modules"]
path = packaging/linux/flatpak/deps/shared-modules
url = https://github.com/flathub/shared-modules.git
branch = master
[submodule "third-party/build-deps"]
path = third-party/build-deps
url = https://github.com/LizardByte/build-deps.git
branch = dist
[submodule "third-party/doxyconfig"]
path = third-party/doxyconfig
url = https://github.com/LizardByte/doxyconfig.git
branch = master
[submodule "third-party/googletest"]
path = third-party/googletest
url = https://github.com/google/googletest.git
branch = main
[submodule "third-party/inputtino"]
path = third-party/inputtino
url = https://github.com/games-on-whales/inputtino.git
branch = stable
[submodule "third-party/libdisplaydevice"]
path = third-party/libdisplaydevice
url = https://github.com/LizardByte/libdisplaydevice.git
branch = master
[submodule "third-party/nanors"]
path = third-party/nanors
url = https://github.com/sleepybishop/nanors.git
branch = master
[submodule "third-party/nv-codec-headers"]
path = third-party/nv-codec-headers
url = https://github.com/FFmpeg/nv-codec-headers.git
branch = sdk/12.0
[submodule "third-party/nvapi-open-source-sdk"]
path = third-party/nvapi-open-source-sdk
url = https://github.com/LizardByte/nvapi-open-source-sdk.git
branch = sdk
[submodule "third-party/Simple-Web-Server"]
path = third-party/Simple-Web-Server
url = https://github.com/ClassicOldSong/Simple-Web-Server
branch = master
[submodule "third-party/TPCircularBuffer"]
path = third-party/TPCircularBuffer
url = https://github.com/michaeltyson/TPCircularBuffer.git
branch = master
[submodule "third-party/tray"]
path = third-party/tray
url = https://github.com/LizardByte/tray.git
branch = master
[submodule "third-party/ViGEmClient"]
path = third-party/ViGEmClient
url = https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client.git
branch = master
[submodule "third-party/wayland-protocols"]
path = third-party/wayland-protocols
url = https://gitlab.freedesktop.org/wayland/wayland-protocols.git
branch = main
[submodule "third-party/wlr-protocols"]
path = third-party/wlr-protocols
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols.git
branch = master
[submodule "third-party/moonlight-common-c"]
path = third-party/moonlight-common-c
url = https://github.com/ClassicOldSong/moonlight-common-c
branch = master
================================================
FILE: .prettierrc.json
================================================
{}
================================================
FILE: .readthedocs.yaml
================================================
---
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-24.04
tools:
python: "miniconda-latest"
commands:
- |
if [ -f readthedocs_build.sh ]; then
doxyconfig_dir="."
else
doxyconfig_dir="./third-party/doxyconfig"
fi
chmod +x "${doxyconfig_dir}/readthedocs_build.sh"
export DOXYCONFIG_DIR="${doxyconfig_dir}"
"${doxyconfig_dir}/readthedocs_build.sh"
# using conda, we can get newer doxygen and graphviz than ubuntu provide
# https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661
conda:
environment: third-party/doxyconfig/environment.yml
submodules:
include: all
recursive: true
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.20)
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
# `set_source_files_properties` requires 3.18
# `cmake_path(CONVERT ... TO_NATIVE_PATH_LIST ...)` requires 3.20
# todo - set this conditionally
project(Apollo VERSION 0.0.0
DESCRIPTION "Self-hosted game stream host for Artemis"
HOMEPAGE_URL "https://github.com/ClassicOldSong/Apollo")
set(PROJECT_LICENSE "GPL-3.0-only")
set(PROJECT_FQDN "dev.lizardbyte.app.Sunshine")
set(PROJECT_BRIEF_DESCRIPTION "GameStream host for Artemis") # must be <= 35 characters
set(PROJECT_LONG_DESCRIPTION "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 Apollo from any \
Artemis 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.")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()
# set the module path, used for includes
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# export compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# set version info for this build
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
# cmake build flags
include(${CMAKE_MODULE_PATH}/prep/options.cmake)
# initial prep
include(${CMAKE_MODULE_PATH}/prep/init.cmake)
# configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc.
include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake)
# Exit early if END_BUILD is ON, i.e. when only generating package manifests
if(${END_BUILD})
return()
endif()
# project constants
include(${CMAKE_MODULE_PATH}/prep/constants.cmake)
# load macros
include(${CMAKE_MODULE_PATH}/macros/common.cmake)
# load dependencies
include(${CMAKE_MODULE_PATH}/dependencies/common.cmake)
# setup compile definitions
include(${CMAKE_MODULE_PATH}/compile_definitions/common.cmake)
# target definitions
include(${CMAKE_MODULE_PATH}/targets/common.cmake)
# packaging
include(${CMAKE_MODULE_PATH}/packaging/common.cmake)
================================================
FILE: DOCKER_README.md
================================================
# 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.
```dockerfile
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`
- commit hash
### SUNSHINE_OS
Sunshine images are available with the following tag suffixes, based on their respective base images.
- `archlinux`
- `debian-bookworm`
- `ubuntu-22.04`
- `ubuntu-24.04`
### Tags
You must combine the `SUNSHINE_VERSION` and `SUNSHINE_OS` to determine the tag to pull. The format should be
`<SUNSHINE_VERSION>-<SUNSHINE_OS>`. For example, `latest-ubuntu-24.04`.
See all our available tags on [docker hub](https://hub.docker.com/r/lizardbyte/sunshine/tags) or
[ghcr](https://github.com/LizardByte/Sunshine/pkgs/container/sunshine/versions) for more info.
## Where used
This is a list of docker projects using Sunshine. Something missing? Let us know about it!
- [Games on Whales](https://games-on-whales.github.io)
## 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>`):
```bash
docker run -d \
--device /dev/dri/ \
--name=<image_name> \
--restart=unless-stopped \
--ipc=host \
-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>`):
```yaml
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>
ipc: host
ports:
- "47984-47990:47984-47990/tcp"
- "48010:48010"
- "47998-48000:47998-48000/udp"
```
### Using podman run
Create and run the container (substitute your `<values>`):
```bash
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 |
|-----------------------------|----------------------|--------------------|----------|
| `-p <port>:47990` | Web UI Port | `47990` | True |
| `-v <path to data>:/config` | Volume mapping | `/home/sunshine` | True |
| `-e PUID=<uid>` | User ID | `1001` | False |
| `-e PGID=<gid>` | Group ID | `1001` | False |
| `-e TZ=<timezone>` | Lookup [TZ value][1] | `America/New_York` | False |
For additional configuration, it is recommended to reference the *Games on Whales*
[sunshine config](https://github.com/games-on-whales/gow/blob/2e442292d79b9d996f886b8a03d22b6eb6bddf7b/compose/streamers/sunshine.yml).
[1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#### 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:
```bash
$ 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 | ✅ | ✅ |
| ubuntu-22.04 | ✅ | ✅ |
| ubuntu-24.04 | ✅ | ✅ |
<div class="section_buttons">
| Previous | Next |
|:-------------------------------|-----------------------------------------------------:|
| [Changelog](docs/changelog.md) | [Third-Party Packages](docs/third_party_packages.md) |
</div>
<details style="display: none;">
<summary></summary>
[TOC]
</details>
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: NOTICE
================================================
©2018 Valve Corporation. Steam and the Steam logo are trademarks and/or
registered trademarks of Valve Corporation in the U.S. and/or other countries. All
rights reserved.
================================================
FILE: README.md
================================================
# Apollo
Apollo is a self-hosted desktop stream host for [Artemis(Moonlight Noir)](https://github.com/ClassicOldSong/moonlight-android). Offering low latency, native client resolution, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software encoding is also available. 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.
Major features:
- [x] Built-in Virtual Display with HDR support that matches the resolution/framerate config of your client automatically
- [x] Permission management for clients
- [x] Clipboard sync
- [x] Commands for client connection/disconnection (checkout [Auto pause/resume games](https://github.com/ClassicOldSong/Apollo/wiki/Auto-pause-resume-games))
- [x] Input only mode
## Usage
Refer to LizardByte's documentation hosted on [Read the Docs](https://docs.lizardbyte.dev/projects/sunshine) for now.
Currently Virtual Display support is Windows only, Linux support is planned and will be implemented in the future.
## About Permission System
Check out the [Wiki](https://github.com/ClassicOldSong/Apollo/wiki/Permission-System)
> [!NOTE]
> The **FIRST** client paired with Apollo will be granted with FULL permissions, then other newly paired clients will only be granted with `View Streams` and `List Apps` permission. If you encounter `Permission Denied` error when trying to launch any app, go check the permission for that device and grant `Launch Apps` permission. The same applies to the situation when you find that you can't move mouse or type with keyboard on newly paired clients, grant the corresponding client `Mouse Input` and `Keyboard Input` permissions.
## About Virtual Display
> [!WARNING]
> ***It is highly recommend to remove any other virtual display solutions from your system and Apollo/Sunshine config, to reduce confusions and compatibility issues.***
> [!NOTE]
> **TL;DR** Just treat your Artemis/Moonlight client like a dedicated PnP monitor with Apollo.
Apollo uses SudoVDA for virtual display. It features auto resolution and framerate matching for your Artemis/Moonlight clients. The virtual display is created upon the stream starts and removed once the app quits. **If you do not see a new virtual display added or removed when the stream starts or stops, there may be a driver misconfiguration, or another persistent virtual display might still be active.**
The virtual display works just like any physically attached monitors with SudoVDA, there's completely no need for a super complicated solution to "fix" resolution configurations for your devices. Unlike all other solutions that reuses one identity or generate a random one each time for any virtual display sessions, **Apollo assigns a fixed identity for each Artemis/Moonlight client, so your display configuration will be automatically remembered and managed by Windows natively.**
## Configuration for dual GPU laptops
Apollo supports dual GPUs seamlessly.
If you want to use your dGPU, just set the `Adapter Name` to your dGPU and enable `Headless mode` in `Audio/Video` tab, save and restart your computer. No dummy plug is needed any more, the image will be rendered and encoded directly from your dGPU.
## About HDR
HDR starts supporting from Windows 11 23H2 and generally supported on 24H2. Some systems might not have HDR toggle on 23H2 and you just need to upgrade to 24H2. Any system lower than 23H2/Windows 10 will not have HDR option available.
> [!NOTE]
> The below section is written for professional media workers. It doesn't stop you from enabling HDR if you know what you're doing and have deep understanding about how HDR works.
>
> Apollo and SudoVDA can handle HDR just fine like any other streaming solutions.
>
> If you have had good experience with HDR previously, you can safely ignore this section.
>
> If you're curious, read on, but don't blame Apollo for poor HDR support.
Whether HDR streaming looks good, it depends completely on your client.
In short, ICC color correction should be totally useless while streaming HDR. It's your client's job to get HDR content displayed right, not the host. But in fact, it does affect the captured video stream and reflect changes on devices that can handle HDR correctly. On other devices that can't, the info is not respected at all.
It's very complicated to explain why HDR is a total mess, and why enabling HDR makes the image appear dark/yellow. If it's your first time got HDR streaming working, and thinks HDR looks awful, you're right, but that's not Apollo's fault, it's your device that tone mapped SDR content to the maximum of the capability of its screen, there's no headroom for anything beyond that actual peak brightness for HDR. For details, please take a look [here](https://github.com/ClassicOldSong/Apollo/issues/164).
For client devices, usually Apple products that have HDR capability can be trusted to have good results, other than that, your luck depends.
<details>
<summary>DEPRECATION ALERT</summary>
Enabling HDR is **generally not recommended** with **ANY streaming solutions** at this moment, probably in the long term. The issue with **HDR itself** is huge, with loads of semi-incompatible standards, and massive variance between device configurations and capabilities. Game support for HDR is still choppy.
SDR actually provides much more stable color accuracy, and are widely supported throughout most devices you can imagine. For games, art style can easily overcome the shortcoming with no HDR, and SDR has pretty standard workflows to ensure their visual performance. So HDR isn't *that* important in most of the cases.
</details>
## How to run multiple instances of Apollo for multiple virtual displays
Follow the instructions in the [Wiki](https://github.com/ClassicOldSong/Apollo/wiki/How-to-start-multiple-instances-of-Apollo).
## FAQ
Moved to [WiKi](https://github.com/ClassicOldSong/Apollo/wiki/FAQ)
## Stuttering Clinic
Here're some common causes and solutions for stutters: [WiKi](https://github.com/ClassicOldSong/Apollo/wiki/Stuttering-Clinic).
## Device specific setups
- Pixel devices might not be able to use native resolution:
- Change the device resolution to High: https://github.com/ClassicOldSong/Apollo/issues/700
## System Requirements
> **Warning**: This table is a work in progress. Do not purchase hardware based on this.
**Minimum Requirements**
| **Component** | **Description** |
|---------------|-----------------|
| GPU | AMD: VCE 1.0 or higher, see: [obs-amd hardware support](https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support) |
| | Intel: VAAPI-compatible, see: [VAAPI hardware support](https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html) |
| | Nvidia: NVENC enabled cards, see: [nvenc support matrix](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) |
| CPU | AMD: Ryzen 3 or higher |
| | Intel: Core i3 or higher |
| RAM | 4GB or more |
| OS | Windows: 10+ (Windows Server requires [manual installation](https://github.com/nefarius/ViGEmBus/issues/153) for gamepad support) |
| | macOS: 12+ |
| | Linux/Debian: 11 (bullseye) |
| | Linux/Fedora: 39+ |
| | Linux/Ubuntu: 22.04+ (jammy) |
| Network | Host: 5GHz, 802.11ac |
| | Client: 5GHz, 802.11ac |
**4k Suggestions**
| **Component** | **Description** |
|---------------|-----------------|
| 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**
| **Component** | **Description** |
|---------------|-----------------|
| 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
SudoVDA: Virtual Display Adapter Driver used in Apollo
[Artemis](https://github.com/ClassicOldSong/moonlight-android): Integrated Virtual Display options control from client side
**NOTE**: Artemis currently supports Android only. Other platforms will come later.
## Support
Currently support is only provided via GitHub Issues/Discussions.
No real time chat support will ever be provided for Apollo and Artemis. Including but not limited to:
- Discord
- Telegram
- Whatsapp
- QQ
- WeChat
> When there's a chat, there're dramas. -- Confucius
## Downloads
### Direct Download
**Recommended**
[Releases](https://github.com/ClassicOldSong/Apollo/releases)
### WinGet
**Note:** Community maintained
In an elevated PowerShell window, run
```pwsh
winget install ClassicOldSong.Apollo
```
You'll need WinGet installed first.
### Chocolatey
**Note:** Community maintained
You can also install the apollo streaming server with chocolatey.
Install Chocolatey if you don't have it, then run the following command in an elevated PowerShell/CMD window:
```pwsh
choco upgrade apollo -y
```
Same command can be used to upgrade, add to a scheduled task to automate updates.
See more details on the chocolatey package [here](https://community.chocolatey.org/packages/apollo)
## Disclaimer
I got kicked from Moonlight and Sunshine's Discord server and banned from Sunshine's GitHub repo literally for helping people out.
This is what I got for finding a bug, opened an issue, getting no response, troubleshoot myself, fixed the issue myself, shared it by PR to the main repo hoping my efforts can help someone else during the maintenance gap.
Yes, I'm going away. [Apollo](https://github.com/ClassicOldSong/Apollo) and [Artemis(Moonlight Noir)](https://github.com/ClassicOldSong/moonlight-android) will no longer be compatible with OG Sunshine and OG Moonlight eventually, but they'll work even better with much more carefully designed features.
The Moonlight repo had stayed silent for 5 months, with nobody actually responding to issues, and people are getting totally no help besides the limited FAQ in their Discord server. I tried to answer issues and questions, solve problems within my ability but I got kicked out just for helping others.
**PRs for feature improvements are welcomed here unlike the main repo, your ideas are more likely to be appreciated and your efforts are actually being respected. We welcome people who can and willing to share their efforts, helping yourselves and other people in need.**
**Update**: They have contacted me and apologized for this incident, but the fact it **happened** still motivated me to start my own fork.
## License
GPLv3
================================================
FILE: cmake/FindLIBCAP.cmake
================================================
# - Try to find Libcap
# Once done this will define
#
# LIBCAP_FOUND - system has Libcap
# LIBCAP_INCLUDE_DIRS - the Libcap include directory
# LIBCAP_LIBRARIES - the libraries needed to use Libcap
# LIBCAP_DEFINITIONS - Compiler switches required for using Libcap
# Use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
find_package(PkgConfig)
pkg_check_modules(PC_LIBCAP libcap)
set(LIBCAP_DEFINITIONS ${PC_LIBCAP_CFLAGS})
find_path(LIBCAP_INCLUDE_DIRS sys/capability.h PATHS ${PC_LIBCAP_INCLUDEDIR} ${PC_LIBCAP_INCLUDE_DIRS})
find_library(LIBCAP_LIBRARIES NAMES libcap.so PATHS ${PC_LIBCAP_LIBDIR} ${PC_LIBCAP_LIBRARY_DIRS})
mark_as_advanced(LIBCAP_INCLUDE_DIRS LIBCAP_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBCAP REQUIRED_VARS LIBCAP_LIBRARIES LIBCAP_INCLUDE_DIRS)
================================================
FILE: cmake/FindLIBDRM.cmake
================================================
# - Try to find Libdrm
# Once done this will define
#
# LIBDRM_FOUND - system has Libdrm
# LIBDRM_INCLUDE_DIRS - the Libdrm include directory
# LIBDRM_LIBRARIES - the libraries needed to use Libdrm
# LIBDRM_DEFINITIONS - Compiler switches required for using Libdrm
# Use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
find_package(PkgConfig)
pkg_check_modules(PC_LIBDRM libdrm)
set(LIBDRM_DEFINITIONS ${PC_LIBDRM_CFLAGS})
find_path(LIBDRM_INCLUDE_DIRS drm.h PATHS ${PC_LIBDRM_INCLUDEDIR} ${PC_LIBDRM_INCLUDE_DIRS} PATH_SUFFIXES libdrm)
find_library(LIBDRM_LIBRARIES NAMES libdrm.so PATHS ${PC_LIBDRM_LIBDIR} ${PC_LIBDRM_LIBRARY_DIRS})
mark_as_advanced(LIBDRM_INCLUDE_DIRS LIBDRM_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBDRM REQUIRED_VARS LIBDRM_LIBRARIES LIBDRM_INCLUDE_DIRS)
================================================
FILE: cmake/FindLibva.cmake
================================================
# - Try to find Libva
# This module defines the following variables:
#
# * LIBVA_FOUND - The component was found
# * LIBVA_INCLUDE_DIRS - The component include directory
# * LIBVA_LIBRARIES - The component library Libva
# * LIBVA_DRM_LIBRARIES - The component library Libva DRM
# Use pkg-config to get the directories and then use these values in the
# find_path() and find_library() calls
# cmake-format: on
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(_LIBVA libva)
pkg_check_modules(_LIBVA_DRM libva-drm)
endif()
find_path(
LIBVA_INCLUDE_DIR
NAMES va/va.h va/va_drm.h
HINTS ${_LIBVA_INCLUDE_DIRS}
PATHS /usr/include /usr/local/include /opt/local/include)
find_library(
LIBVA_LIB
NAMES ${_LIBVA_LIBRARIES} libva
HINTS ${_LIBVA_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib)
find_library(
LIBVA_DRM_LIB
NAMES ${_LIBVA_DRM_LIBRARIES} libva-drm
HINTS ${_LIBVA_DRM_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib /opt/local/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
mark_as_advanced(LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
if(LIBVA_FOUND)
set(LIBVA_INCLUDE_DIRS ${LIBVA_INCLUDE_DIR})
set(LIBVA_LIBRARIES ${LIBVA_LIB})
set(LIBVA_DRM_LIBRARIES ${LIBVA_DRM_LIB})
if(NOT TARGET Libva::va)
if(IS_ABSOLUTE "${LIBVA_LIBRARIES}")
add_library(Libva::va UNKNOWN IMPORTED)
set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION "${LIBVA_LIBRARIES}")
else()
add_library(Libva::va INTERFACE IMPORTED)
set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME "${LIBVA_LIBRARIES}")
endif()
set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
endif()
if(NOT TARGET Libva::drm)
if(IS_ABSOLUTE "${LIBVA_DRM_LIBRARIES}")
add_library(Libva::drm UNKNOWN IMPORTED)
set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION "${LIBVA_DRM_LIBRARIES}")
else()
add_library(Libva::drm INTERFACE IMPORTED)
set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME "${LIBVA_DRM_LIBRARIES}")
endif()
set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
endif()
endif()
================================================
FILE: cmake/FindSystemd.cmake
================================================
# - Try to find Systemd
# Once done this will define
#
# SYSTEMD_FOUND - system has systemd
# SYSTEMD_USER_UNIT_INSTALL_DIR - the systemd system unit install directory
# SYSTEMD_SYSTEM_UNIT_INSTALL_DIR - the systemd user unit install directory
# SYSTEMD_MODULES_LOAD_DIR - the systemd modules-load.d directory
IF (NOT WIN32)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(SYSTEMD "systemd")
endif()
if (SYSTEMD_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=systemd_user_unit_dir systemd
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE SYSTEMD_USER_UNIT_INSTALL_DIR)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=systemd_system_unit_dir systemd
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=modules_load_dir systemd
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE SYSTEMD_MODULES_LOAD_DIR)
mark_as_advanced(SYSTEMD_USER_UNIT_INSTALL_DIR SYSTEMD_SYSTEM_UNIT_INSTALL_DIR SYSTEMD_MODULES_LOAD_DIR)
endif ()
ENDIF ()
================================================
FILE: cmake/FindUdev.cmake
================================================
# - Try to find Udev
# Once done this will define
#
# UDEV_FOUND - system has udev
# UDEV_RULES_INSTALL_DIR - the udev rules install directory
# UDEVADM_EXECUTABLE - path to udevadm executable
# UDEV_VERSION - version of udev/systemd
if(NOT WIN32)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(UDEV "udev")
endif()
if(UDEV_FOUND)
if(UDEV_VERSION)
message(STATUS "Found udev/systemd version: ${UDEV_VERSION}")
else()
message(WARNING "Could not determine udev/systemd version")
set(UDEV_VERSION "0")
endif()
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=udev_dir udev
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE UDEV_RULES_INSTALL_DIR)
set(UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}/rules.d")
mark_as_advanced(UDEV_RULES_INSTALL_DIR)
# Check if udevadm is available
find_program(UDEVADM_EXECUTABLE udevadm
PATHS /usr/bin /bin /usr/sbin /sbin
DOC "Path to udevadm executable")
mark_as_advanced(UDEVADM_EXECUTABLE)
# Handle version requirements
if(Udev_FIND_VERSION)
if(UDEV_VERSION VERSION_LESS Udev_FIND_VERSION)
set(UDEV_FOUND FALSE)
if(Udev_FIND_REQUIRED)
message(FATAL_ERROR "Udev version ${UDEV_VERSION} less than required version ${Udev_FIND_VERSION}")
else()
message(STATUS "Udev version ${UDEV_VERSION} less than required version ${Udev_FIND_VERSION}")
endif()
else()
message(STATUS "Udev version ${UDEV_VERSION} meets requirement (>= ${Udev_FIND_VERSION})")
endif()
endif()
endif()
endif()
================================================
FILE: cmake/FindWayland.cmake
================================================
# Try to find Wayland on a Unix system
#
# This will define:
#
# WAYLAND_FOUND - True if Wayland is found
# WAYLAND_LIBRARIES - Link these to use Wayland
# WAYLAND_INCLUDE_DIRS - Include directory for Wayland
# WAYLAND_DEFINITIONS - Compiler flags for using Wayland
#
# In addition the following more fine grained variables will be defined:
#
# Wayland_Client_FOUND WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES
# Wayland_Server_FOUND WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES
# Wayland_EGL_FOUND WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES
# Wayland_Cursor_FOUND WAYLAND_CURSOR_INCLUDE_DIRS WAYLAND_CURSOR_LIBRARIES
#
# Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org>
# 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
IF (NOT WIN32)
# Use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
find_package(PkgConfig)
PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
set(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS})
find_path(WAYLAND_CLIENT_INCLUDE_DIRS NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_CLIENT_INCLUDE_DIRS AND WAYLAND_CLIENT_LIBRARIES)
set(Wayland_Client_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_Client_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_CLIENT_INCLUDE_DIRS WAYLAND_CLIENT_LIBRARIES)
find_path(WAYLAND_CURSOR_INCLUDE_DIRS NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_CURSOR_INCLUDE_DIRS AND WAYLAND_CURSOR_LIBRARIES)
set(Wayland_Cursor_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_Cursor_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_CURSOR_INCLUDE_DIRS WAYLAND_CURSOR_LIBRARIES)
find_path(WAYLAND_EGL_INCLUDE_DIRS NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_EGL_INCLUDE_DIRS AND WAYLAND_EGL_LIBRARIES)
set(Wayland_EGL_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_EGL_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_EGL_INCLUDE_DIRS WAYLAND_EGL_LIBRARIES)
find_path(WAYLAND_SERVER_INCLUDE_DIRS NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
find_library(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
if(WAYLAND_SERVER_INCLUDE_DIRS AND WAYLAND_SERVER_LIBRARIES)
set(Wayland_Server_FOUND TRUE) # cmake-lint: disable=C0103
else()
set(Wayland_Server_FOUND FALSE) # cmake-lint: disable=C0103
endif()
mark_as_advanced(WAYLAND_SERVER_INCLUDE_DIRS WAYLAND_SERVER_LIBRARIES)
set(WAYLAND_INCLUDE_DIRS ${WAYLAND_CLIENT_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS}
${WAYLAND_EGL_INCLUDE_DIRS} ${WAYLAND_CURSOR_INCLUDE_DIRS})
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES}
${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
mark_as_advanced(WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES)
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIRS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wayland REQUIRED_VARS WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIRS HANDLE_COMPONENTS)
ENDIF ()
================================================
FILE: cmake/compile_definitions/common.cmake
================================================
# common compile definitions
# this file will also load platform specific definitions
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-sign-compare)
# Wall - enable all warnings
# Werror - treat warnings as errors
# Wno-maybe-uninitialized/Wno-uninitialized - disable warnings for maybe uninitialized variables
# Wno-sign-compare - disable warnings for signed/unsigned comparisons
# Wno-restrict - disable warnings for memory overlap
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# GCC specific compile options
# GCC 12 and higher will complain about maybe-uninitialized
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-maybe-uninitialized)
# Disable the bogus warning that may prevent compilation (only for GCC 12).
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651.
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-restrict)
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Clang specific compile options
# Clang doesn't actually complain about this this, so disabling for now
# list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-uninitialized)
endif()
if(BUILD_WERROR)
list(APPEND SUNSHINE_COMPILE_OPTIONS -Werror)
endif()
# setup assets directory
if(NOT SUNSHINE_ASSETS_DIR)
set(SUNSHINE_ASSETS_DIR "assets")
endif()
# platform specific compile definitions
if(WIN32)
include(${CMAKE_MODULE_PATH}/compile_definitions/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/compile_definitions/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/compile_definitions/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/compile_definitions/linux.cmake)
endif()
endif()
include_directories(BEFORE SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include")
file(GLOB NVENC_SOURCES CONFIGURE_DEPENDS "src/nvenc/*.cpp" "src/nvenc/*.h")
list(APPEND PLATFORM_TARGET_FILES ${NVENC_SOURCES})
set(SUNSHINE_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Input.h"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray.h"
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
"${CMAKE_SOURCE_DIR}/src/upnp.h"
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
"${CMAKE_SOURCE_DIR}/src/utility.h"
"${CMAKE_SOURCE_DIR}/src/uuid.h"
"${CMAKE_SOURCE_DIR}/src/config.h"
"${CMAKE_SOURCE_DIR}/src/config.cpp"
"${CMAKE_SOURCE_DIR}/src/display_device.h"
"${CMAKE_SOURCE_DIR}/src/display_device.cpp"
"${CMAKE_SOURCE_DIR}/src/entry_handler.cpp"
"${CMAKE_SOURCE_DIR}/src/entry_handler.h"
"${CMAKE_SOURCE_DIR}/src/file_handler.cpp"
"${CMAKE_SOURCE_DIR}/src/file_handler.h"
"${CMAKE_SOURCE_DIR}/src/globals.cpp"
"${CMAKE_SOURCE_DIR}/src/globals.h"
"${CMAKE_SOURCE_DIR}/src/logging.cpp"
"${CMAKE_SOURCE_DIR}/src/logging.h"
"${CMAKE_SOURCE_DIR}/src/main.cpp"
"${CMAKE_SOURCE_DIR}/src/main.h"
"${CMAKE_SOURCE_DIR}/src/crypto.cpp"
"${CMAKE_SOURCE_DIR}/src/crypto.h"
"${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
"${CMAKE_SOURCE_DIR}/src/nvhttp.h"
"${CMAKE_SOURCE_DIR}/src/httpcommon.cpp"
"${CMAKE_SOURCE_DIR}/src/httpcommon.h"
"${CMAKE_SOURCE_DIR}/src/confighttp.cpp"
"${CMAKE_SOURCE_DIR}/src/confighttp.h"
"${CMAKE_SOURCE_DIR}/src/rtsp.cpp"
"${CMAKE_SOURCE_DIR}/src/rtsp.h"
"${CMAKE_SOURCE_DIR}/src/stream.cpp"
"${CMAKE_SOURCE_DIR}/src/stream.h"
"${CMAKE_SOURCE_DIR}/src/video.cpp"
"${CMAKE_SOURCE_DIR}/src/video.h"
"${CMAKE_SOURCE_DIR}/src/video_colorspace.cpp"
"${CMAKE_SOURCE_DIR}/src/video_colorspace.h"
"${CMAKE_SOURCE_DIR}/src/input.cpp"
"${CMAKE_SOURCE_DIR}/src/input.h"
"${CMAKE_SOURCE_DIR}/src/audio.cpp"
"${CMAKE_SOURCE_DIR}/src/audio.h"
"${CMAKE_SOURCE_DIR}/src/platform/common.h"
"${CMAKE_SOURCE_DIR}/src/process.cpp"
"${CMAKE_SOURCE_DIR}/src/process.h"
"${CMAKE_SOURCE_DIR}/src/network.cpp"
"${CMAKE_SOURCE_DIR}/src/network.h"
"${CMAKE_SOURCE_DIR}/src/move_by_copy.h"
"${CMAKE_SOURCE_DIR}/src/system_tray.cpp"
"${CMAKE_SOURCE_DIR}/src/system_tray.h"
"${CMAKE_SOURCE_DIR}/src/task_pool.h"
"${CMAKE_SOURCE_DIR}/src/thread_pool.h"
"${CMAKE_SOURCE_DIR}/src/thread_safe.h"
"${CMAKE_SOURCE_DIR}/src/sync.h"
"${CMAKE_SOURCE_DIR}/src/round_robin.h"
"${CMAKE_SOURCE_DIR}/src/stat_trackers.h"
"${CMAKE_SOURCE_DIR}/src/stat_trackers.cpp"
"${CMAKE_SOURCE_DIR}/src/rswrapper.h"
"${CMAKE_SOURCE_DIR}/src/rswrapper.c"
${PLATFORM_TARGET_FILES})
if(NOT SUNSHINE_ASSETS_DIR_DEF)
set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}")
endif()
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}")
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
# Publisher metadata
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_NAME="${SUNSHINE_PUBLISHER_NAME}")
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_WEBSITE="${SUNSHINE_PUBLISHER_WEBSITE}")
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_ISSUE_URL="${SUNSHINE_PUBLISHER_ISSUE_URL}")
include_directories(BEFORE "${CMAKE_SOURCE_DIR}")
include_directories(
BEFORE
SYSTEM
"${CMAKE_SOURCE_DIR}/third-party"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include"
"${CMAKE_SOURCE_DIR}/third-party/nanors"
"${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl"
${FFMPEG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS} # has to be the last, or we get runtime error on macOS ffmpeg encoder
)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${MINIUPNP_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
enet
libdisplaydevice::display_device
nlohmann_json::nlohmann_json
opus
${FFMPEG_LIBRARIES}
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
${PLATFORM_LIBRARIES})
================================================
FILE: cmake/compile_definitions/linux.cmake
================================================
# linux specific compile definitions
add_compile_definitions(SUNSHINE_PLATFORM="linux")
# AppImage
if(${SUNSHINE_BUILD_APPIMAGE})
# use relative assets path for AppImage
string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR})
endif()
# cuda
set(CUDA_FOUND OFF)
if(${SUNSHINE_ENABLE_CUDA})
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
set(CUDA_FOUND ON)
enable_language(CUDA)
message(STATUS "CUDA Compiler Version: ${CMAKE_CUDA_COMPILER_VERSION}")
set(CMAKE_CUDA_ARCHITECTURES "")
# https://docs.nvidia.com/cuda/archive/12.0.0/cuda-compiler-driver-nvcc/index.html
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 75 80 86 87 89 90)
else()
message(FATAL_ERROR
"Sunshine requires a minimum CUDA Compiler version of 12.0.
Found version: ${CMAKE_CUDA_COMPILER_VERSION}"
)
endif()
# https://docs.nvidia.com/cuda/archive/12.8.0/cuda-compiler-driver-nvcc/index.html
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8)
list(APPEND CMAKE_CUDA_ARCHITECTURES 100 101 120)
endif()
# https://docs.nvidia.com/cuda/archive/12.9.0/cuda-compiler-driver-nvcc/index.html
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.9)
list(APPEND CMAKE_CUDA_ARCHITECTURES 103 121)
endif()
# https://docs.nvidia.com/cuda/archive/13.0.0/cuda-compiler-driver-nvcc/index.html
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES 101)
list(APPEND CMAKE_CUDA_ARCHITECTURES 110)
else()
list(APPEND CMAKE_CUDA_ARCHITECTURES 50 52 53 60 61 62 70 72)
endif()
# sort the architectures
list(SORT CMAKE_CUDA_ARCHITECTURES COMPARE NATURAL)
# message(STATUS "CUDA NVCC Flags: ${CUDA_NVCC_FLAGS}")
message(STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES}")
elseif(${CUDA_FAIL_ON_MISSING})
message(FATAL_ERROR
"CUDA not found.
If this is intentional, set '-DSUNSHINE_ENABLE_CUDA=OFF' or '-DCUDA_FAIL_ON_MISSING=OFF'"
)
endif()
endif()
if(CUDA_FOUND)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvfbc")
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cu"
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cpp"
"${CMAKE_SOURCE_DIR}/third-party/nvfbc/NvFBC.h")
add_compile_definitions(SUNSHINE_BUILD_CUDA)
endif()
# libdrm is required for both DRM (KMS) and Wayland
if(${SUNSHINE_ENABLE_DRM} OR ${SUNSHINE_ENABLE_WAYLAND})
find_package(LIBDRM REQUIRED)
else()
set(LIBDRM_FOUND OFF)
endif()
if(LIBDRM_FOUND)
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS})
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES})
endif()
# drm
if(${SUNSHINE_ENABLE_DRM})
find_package(LIBCAP REQUIRED)
else()
set(LIBCAP_FOUND OFF)
endif()
if(LIBDRM_FOUND AND LIBCAP_FOUND)
add_compile_definitions(SUNSHINE_BUILD_DRM)
include_directories(SYSTEM ${LIBCAP_INCLUDE_DIRS})
list(APPEND PLATFORM_LIBRARIES ${LIBCAP_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
endif()
# evdev
include(dependencies/libevdev_Sunshine)
# vaapi
if(${SUNSHINE_ENABLE_VAAPI})
find_package(Libva REQUIRED)
else()
set(LIBVA_FOUND OFF)
endif()
if(LIBVA_FOUND)
add_compile_definitions(SUNSHINE_BUILD_VAAPI)
include_directories(SYSTEM ${LIBVA_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${LIBVA_LIBRARIES} ${LIBVA_DRM_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.cpp")
endif()
# wayland
if(${SUNSHINE_ENABLE_WAYLAND})
find_package(Wayland REQUIRED)
else()
set(WAYLAND_FOUND OFF)
endif()
if(WAYLAND_FOUND)
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
if(NOT SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS)
set(WAYLAND_PROTOCOLS_DIR "${CMAKE_SOURCE_DIR}/third-party/wayland-protocols")
else()
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols REQUIRED)
endif()
GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/xdg-output" xdg-output-unstable-v1)
GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/linux-dmabuf" linux-dmabuf-unstable-v1)
GEN_WAYLAND("${CMAKE_SOURCE_DIR}/third-party/wlr-protocols" "unstable" wlr-screencopy-unstable-v1)
include_directories(
SYSTEM
${WAYLAND_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/generated-src
)
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES} gbm)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/wlgrab.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.cpp")
endif()
# x11
if(${SUNSHINE_ENABLE_X11})
find_package(X11 REQUIRED)
else()
set(X11_FOUND OFF)
endif()
if(X11_FOUND)
add_compile_definitions(SUNSHINE_BUILD_X11)
include_directories(SYSTEM ${X11_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${X11_LIBRARIES})
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.cpp")
endif()
if(NOT ${CUDA_FOUND}
AND NOT ${WAYLAND_FOUND}
AND NOT ${X11_FOUND}
AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND})
AND NOT ${LIBVA_FOUND})
message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, (libdrm and libcap), or libva")
endif()
# tray icon
if(${SUNSHINE_ENABLE_TRAY})
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
if(APPINDICATOR_FOUND)
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
else()
pkg_check_modules(APPINDICATOR appindicator3-0.1)
if(APPINDICATOR_FOUND)
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
endif ()
endif()
pkg_check_modules(LIBNOTIFY libnotify)
if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND)
message(STATUS "APPINDICATOR_FOUND: ${APPINDICATOR_FOUND}")
message(STATUS "LIBNOTIFY_FOUND: ${LIBNOTIFY_FOUND}")
message(FATAL_ERROR "Couldn't find either appindicator or libnotify")
else()
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_linux.c")
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
endif()
# flatpak icons must be prefixed with the app id or they will not be included in the flatpak
if(${SUNSHINE_BUILD_FLATPAK})
set(SUNSHINE_TRAY_PREFIX "${PROJECT_FQDN}")
else()
set(SUNSHINE_TRAY_PREFIX "apollo")
endif()
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY_PREFIX="${SUNSHINE_TRAY_PREFIX}")
else()
set(SUNSHINE_TRAY 0)
message(STATUS "Tray icon disabled")
endif()
# These need to be set before adding the inputtino subdirectory in order for them to be picked up
set(LIBEVDEV_CUSTOM_INCLUDE_DIR "${EVDEV_INCLUDE_DIR}")
set(LIBEVDEV_CUSTOM_LIBRARY "${EVDEV_LIBRARY}")
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/inputtino")
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES inputtino::libinputtino)
file(GLOB_RECURSE INPUTTINO_SOURCES
${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.h
${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.cpp)
list(APPEND PLATFORM_TARGET_FILES ${INPUTTINO_SOURCES})
# build libevdev before the libinputtino target
if(EXTERNAL_PROJECT_LIBEVDEV_USED)
add_dependencies(libinputtino libevdev)
endif()
# AppImage and Flatpak
if (${SUNSHINE_BUILD_APPIMAGE})
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_APPIMAGE=1)
endif ()
if (${SUNSHINE_BUILD_FLATPAK})
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_FLATPAK=1)
endif ()
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.h"
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/linux/audio.cpp"
"${CMAKE_SOURCE_DIR}/third-party/glad/src/egl.c"
"${CMAKE_SOURCE_DIR}/third-party/glad/src/gl.c"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/EGL/eglplatform.h"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/KHR/khrplatform.h"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/gl.h"
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h")
list(APPEND PLATFORM_LIBRARIES
dl
pulse
pulse-simple)
include_directories(
SYSTEM
"${CMAKE_SOURCE_DIR}/third-party/glad/include")
================================================
FILE: cmake/compile_definitions/macos.cmake
================================================
# macos specific compile definitions
add_compile_definitions(SUNSHINE_PLATFORM="macos")
set(MACOS_LINK_DIRECTORIES
/opt/homebrew/lib
/opt/local/lib
/usr/local/lib)
foreach(dir ${MACOS_LINK_DIRECTORIES})
if(EXISTS ${dir})
link_directories(${dir})
endif()
endforeach()
if(NOT BOOST_USE_STATIC AND NOT FETCH_CONTENT_BOOST_USED)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
endif()
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_KIT_LIBRARY}
${APP_SERVICES_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${CORE_MEDIA_LIBRARY}
${CORE_VIDEO_LIBRARY}
${FOUNDATION_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY})
set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist")
set(PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.m"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_img_t.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.m"
"${CMAKE_SOURCE_DIR}/src/platform/macos/display.mm"
"${CMAKE_SOURCE_DIR}/src/platform/macos/input.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/macos/microphone.mm"
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.mm"
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.h"
"${CMAKE_SOURCE_DIR}/src/platform/macos/publish.cpp"
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
${APPLE_PLIST_FILE})
if(SUNSHINE_ENABLE_TRAY)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${COCOA})
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_darwin.m")
endif()
================================================
FILE: cmake/compile_definitions/unix.cmake
================================================
# unix specific compile definitions
# put anything here that applies to both linux and macos
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${CURL_LIBRARIES})
# add install prefix to assets path if not already there
if(NOT SUNSHINE_ASSETS_DIR MATCHES "^${CMAKE_INSTALL_PREFIX}")
set(SUNSHINE_ASSETS_DIR "${CMAKE_INSTALL_PREFIX}/${SUNSHINE_ASSETS_DIR}")
endif()
================================================
FILE: cmake/compile_definitions/windows.cmake
================================================
# windows specific compile definitions
add_compile_definitions(SUNSHINE_PLATFORM="windows")
enable_language(RC)
set(CMAKE_RC_COMPILER windres)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
# gcc complains about misleading indentation in some mingw includes
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-misleading-indentation)
# see gcc bug 98723
add_definitions(-DUSE_BOOST_REGEX)
# curl
add_definitions(-DCURL_STATICLIB)
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
link_directories(${CURL_STATIC_LIBRARY_DIRS})
# miniupnpc
add_definitions(-DMINIUPNP_STATICLIB)
# extra tools/binaries for audio/display devices
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
# nvidia
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk")
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
"${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk/*.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
# vigem
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include")
# apollo icon
if(NOT DEFINED PROJECT_ICON_PATH)
set(PROJECT_ICON_PATH "${CMAKE_SOURCE_DIR}/apollo.ico")
endif()
# Create a separate object library for the RC file with minimal includes
add_library(sunshine_rc_object OBJECT "${CMAKE_SOURCE_DIR}/src/platform/windows/windows.rc")
# Set minimal properties for RC compilation - only what's needed for the resource file
# Otherwise compilation can fail due to "line too long" errors
set_target_properties(sunshine_rc_object PROPERTIES
COMPILE_DEFINITIONS "PROJECT_ICON_PATH=${PROJECT_ICON_PATH};PROJECT_NAME=${PROJECT_NAME};PROJECT_VENDOR=${SUNSHINE_PUBLISHER_NAME};PROJECT_VERSION=${PROJECT_VERSION};PROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR};PROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR};PROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH}" # cmake-lint: disable=C0301
INCLUDE_DIRECTORIES ""
)
set(PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/platform/windows/publish.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/input.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_base.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_vram.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_ram.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_wgc.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/audio.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/virtual_display.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/virtual_display.cpp"
"${CMAKE_SOURCE_DIR}/src/platform/windows/utils.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/utils.cpp"
"${CMAKE_SOURCE_DIR}/third-party/sudovda/sudovda-ioctl.h"
"${CMAKE_SOURCE_DIR}/third-party/sudovda/sudovda.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Client.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Common.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Util.h"
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/km/BusShared.h"
${NVPREFS_FILES})
set(OPENSSL_LIBRARIES
libssl.a
libcrypto.a)
list(PREPEND PLATFORM_LIBRARIES
${CURL_STATIC_LIBRARIES}
avrt
d3d11
D3DCompiler
dwmapi
dxgi
iphlpapi
ksuser
libssp.a
libstdc++.a
libwinpthread.a
minhook::minhook
ntdll
setupapi
shlwapi
synchronization.lib
userenv
ws2_32
wsock32
)
if(SUNSHINE_ENABLE_TRAY)
list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_windows.c")
endif()
================================================
FILE: cmake/dependencies/Boost_Sunshine.cmake
================================================
#
# Loads the boost library giving the priority to the system package first, with a fallback to FetchContent.
#
include_guard(GLOBAL)
set(BOOST_VERSION "1.89.0")
set(BOOST_COMPONENTS
filesystem
locale
log
program_options
system
)
# system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
# algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience
if(WIN32)
list(APPEND BOOST_COMPONENTS
algorithm
preprocessor
scope
uuid
)
endif()
if(BOOST_USE_STATIC)
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
endif()
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
cmake_policy(SET CMP0167 NEW) # Get BoostConfig.cmake from upstream
endif()
find_package(Boost CONFIG ${BOOST_VERSION} EXACT COMPONENTS ${BOOST_COMPONENTS})
if(NOT Boost_FOUND)
message(STATUS "Boost v${BOOST_VERSION} package not found in the system. Falling back to FetchContent.")
include(FetchContent)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24
endif()
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0")
cmake_policy(SET CMP0174 NEW) # Handle empty variables
endif()
# more components required for compiling boost targets
list(APPEND BOOST_COMPONENTS
asio
crc
format
process
property_tree)
set(BOOST_ENABLE_CMAKE ON)
# Limit boost to the required libraries only
set(BOOST_INCLUDE_LIBRARIES ${BOOST_COMPONENTS})
set(BOOST_URL "https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.xz") # cmake-lint: disable=C0301
set(BOOST_HASH "SHA256=f48b48390380cfb94a629872346e3a81370dc498896f16019ade727ab72eb1ec")
if(CMAKE_VERSION VERSION_LESS "3.24.0")
FetchContent_Declare(
Boost
URL ${BOOST_URL}
URL_HASH ${BOOST_HASH}
)
elseif(APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.25.0")
# add SYSTEM to FetchContent_Declare, this fails on debian bookworm
FetchContent_Declare(
Boost
URL ${BOOST_URL}
URL_HASH ${BOOST_HASH}
SYSTEM # requires CMake 3.25+
OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions
)
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
FetchContent_Declare(
Boost
URL ${BOOST_URL}
URL_HASH ${BOOST_HASH}
OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions
)
endif()
FetchContent_MakeAvailable(Boost)
set(FETCH_CONTENT_BOOST_USED TRUE)
set(Boost_FOUND TRUE) # cmake-lint: disable=C0103
set(Boost_INCLUDE_DIRS # cmake-lint: disable=C0103
"$<BUILD_INTERFACE:${Boost_SOURCE_DIR}/libs/headers/include>")
if(WIN32)
# Windows build is failing to create .h file in this directory
file(MAKE_DIRECTORY ${Boost_BINARY_DIR}/libs/log/src/windows)
endif()
set(Boost_LIBRARIES "") # cmake-lint: disable=C0103
foreach(component ${BOOST_COMPONENTS})
list(APPEND Boost_LIBRARIES "Boost::${component}")
endforeach()
endif()
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
================================================
FILE: cmake/dependencies/common.cmake
================================================
# load common dependencies
# this file will also load platform specific dependencies
# boost, this should be before Simple-Web-Server as it also depends on boost
include(dependencies/Boost_Sunshine)
# submodules
# moonlight common library
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries built for enet")
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
# web server
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
# libdisplaydevice
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/libdisplaydevice")
# common dependencies
include("${CMAKE_MODULE_PATH}/dependencies/nlohmann_json.cmake")
find_package(OpenSSL REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
pkg_check_modules(CURL REQUIRED libcurl)
# miniupnp
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
# ffmpeg pre-compiled binaries
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
if(WIN32)
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
elseif(UNIX AND NOT APPLE)
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
endif()
set(FFMPEG_PREPARED_BINARIES
"${CMAKE_SOURCE_DIR}/third-party/build-deps/dist/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
# check if the directory exists
if(NOT EXISTS "${FFMPEG_PREPARED_BINARIES}")
message(FATAL_ERROR
"FFmpeg pre-compiled binaries not found at ${FFMPEG_PREPARED_BINARIES}. \
Please consider contributing to the LizardByte/build-deps repository. \
Optionally, you can use the FFMPEG_PREPARED_BINARIES option to specify the path to the \
system-installed FFmpeg libraries")
endif()
if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
set(HDR10_PLUS_LIBRARY
"${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
endif()
set(FFMPEG_LIBRARIES
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libx264.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libx265.a"
${HDR10_PLUS_LIBRARY}
${FFMPEG_PLATFORM_LIBRARIES})
else()
set(FFMPEG_LIBRARIES
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
${FFMPEG_PLATFORM_LIBRARIES})
endif()
set(FFMPEG_INCLUDE_DIRS
"${FFMPEG_PREPARED_BINARIES}/include")
# platform specific dependencies
if(WIN32)
include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake")
elseif(UNIX)
include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake")
if(APPLE)
include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake")
else()
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
endif()
endif()
================================================
FILE: cmake/dependencies/libevdev_Sunshine.cmake
================================================
#
# Loads the libevdev library giving the priority to the system package first, with a fallback to ExternalProject
#
include_guard(GLOBAL)
set(LIBEVDEV_VERSION libevdev-1.13.2)
pkg_check_modules(PC_EVDEV libevdev)
if(PC_EVDEV_FOUND)
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
find_library(EVDEV_LIBRARY
NAMES evdev libevdev)
else()
include(ExternalProject)
ExternalProject_Add(libevdev
URL http://www.freedesktop.org/software/libevdev/${LIBEVDEV_VERSION}.tar.xz
PREFIX ${LIBEVDEV_VERSION}
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
BUILD_COMMAND "make"
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(libevdev SOURCE_DIR)
message(STATUS "libevdev source dir: ${SOURCE_DIR}")
set(EVDEV_INCLUDE_DIR "${SOURCE_DIR}")
ExternalProject_Get_Property(libevdev BINARY_DIR)
message(STATUS "libevdev binary dir: ${BINARY_DIR}")
set(EVDEV_LIBRARY "${BINARY_DIR}/libevdev/.libs/libevdev.a")
# compile libevdev before sunshine
set(SUNSHINE_TARGET_DEPENDENCIES ${SUNSHINE_TARGET_DEPENDENCIES} libevdev)
set(EXTERNAL_PROJECT_LIBEVDEV_USED TRUE)
endif()
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
message(STATUS "Found libevdev library: ${EVDEV_LIBRARY}")
message(STATUS "Found libevdev include directory: ${EVDEV_INCLUDE_DIR}")
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
else()
message(FATAL_ERROR "Couldn't find or fetch libevdev")
endif()
================================================
FILE: cmake/dependencies/linux.cmake
================================================
# linux specific dependencies
================================================
FILE: cmake/dependencies/macos.cmake
================================================
# macos specific dependencies
FIND_LIBRARY(APP_KIT_LIBRARY AppKit)
FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices)
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
FIND_LIBRARY(CORE_MEDIA_LIBRARY CoreMedia)
FIND_LIBRARY(CORE_VIDEO_LIBRARY CoreVideo)
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation)
FIND_LIBRARY(VIDEO_TOOLBOX_LIBRARY VideoToolbox)
if(SUNSHINE_ENABLE_TRAY)
FIND_LIBRARY(COCOA Cocoa REQUIRED)
endif()
================================================
FILE: cmake/dependencies/nlohmann_json.cmake
================================================
#
# Loads the nlohmann_json library giving the priority to the system package first, with a fallback to FetchContent.
#
include_guard(GLOBAL)
find_package(nlohmann_json 3.11 QUIET GLOBAL)
if(NOT nlohmann_json_FOUND)
message(STATUS "nlohmann_json v3.11.x package not found in the system. Falling back to FetchContent.")
include(FetchContent)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW) # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24
endif()
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0")
cmake_policy(SET CMP0174 NEW) # Handle empty variables
endif()
FetchContent_Declare(
json
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
URL_HASH MD5=c23a33f04786d85c29fda8d16b5f0efd
DOWNLOAD_EXTRACT_TIMESTAMP
)
FetchContent_MakeAvailable(json)
endif()
================================================
FILE: cmake/dependencies/unix.cmake
================================================
# unix specific dependencies
# put anything here that applies to both linux and macos
================================================
FILE: cmake/dependencies/windows.cmake
================================================
# windows specific dependencies
# Make sure MinHook is installed
find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)
add_library(minhook::minhook STATIC IMPORTED)
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
================================================
FILE: cmake/macros/common.cmake
================================================
# common macros
# this file will also load platform specific macros
# platform specific macros
if(WIN32)
include(${CMAKE_MODULE_PATH}/macros/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/macros/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/macros/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/macros/linux.cmake)
endif()
endif()
# override find_package function
macro(find_package) # cmake-lint: disable=C0103
string(TOLOWER "${ARGV0}" ARGV0_LOWER)
if(
(("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED)
)
# Do nothing, as the package has already been fetched
else()
# Call the original find_package function
_find_package(${ARGV})
endif()
endmacro()
================================================
FILE: cmake/macros/linux.cmake
================================================
# linux specific macros
# GEN_WAYLAND: args = `filename`
macro(GEN_WAYLAND wayland_directory subdirectory filename)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)
message("wayland-scanner private-code \
${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
message("wayland-scanner client-header \
${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
execute_process(
COMMAND wayland-scanner private-code
${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
COMMAND wayland-scanner client-header
${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.h
RESULT_VARIABLE EXIT_INT
)
if(NOT ${EXIT_INT} EQUAL 0)
message(FATAL_ERROR "wayland-scanner failed")
endif()
list(APPEND PLATFORM_TARGET_FILES
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
${CMAKE_BINARY_DIR}/generated-src/${filename}.h)
endmacro()
================================================
FILE: cmake/macros/macos.cmake
================================================
# macos specific macros
# ADD_FRAMEWORK: args = `fwname`, `appname`
macro(ADD_FRAMEWORK fwname appname)
find_library(FRAMEWORK_${fwname}
NAMES ${fwname}
PATHS ${CMAKE_OSX_SYSROOT}/System/Library
PATH_SUFFIXES Frameworks
NO_DEFAULT_PATH)
if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
MESSAGE(ERROR ": Framework ${fwname} not found")
else()
TARGET_LINK_LIBRARIES(${appname} "${FRAMEWORK_${fwname}}/${fwname}")
MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}")
endif()
endmacro(ADD_FRAMEWORK)
================================================
FILE: cmake/macros/unix.cmake
================================================
# unix specific macros
# put anything here that applies to both linux and macos
================================================
FILE: cmake/macros/windows.cmake
================================================
# windows specific macros
================================================
FILE: cmake/packaging/common.cmake
================================================
# common packaging
# common cpack options
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_VENDOR "SudoMaker")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts)
set(CPACK_PACKAGE_CONTACT "https://www.sudomaker.com")
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION})
set(CPACK_PACKAGE_HOMEPAGE_URL ${CMAKE_PROJECT_HOMEPAGE_URL})
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE)
set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/apollo.png)
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_STRIP_FILES YES)
# install common assets
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}"
PATTERN "web" EXCLUDE)
# copy assets to build directory, for running without install
file(GLOB_RECURSE ALL_ASSETS
RELATIVE "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/*")
list(FILTER ALL_ASSETS EXCLUDE REGEX "^web/.*$") # Filter out the web directory
foreach(asset ${ALL_ASSETS}) # Copy assets to build directory, excluding the web directory
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/${asset}"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/assets")
endforeach()
# install built vite assets
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets/web"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# platform specific packaging
if(WIN32)
include(${CMAKE_MODULE_PATH}/packaging/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/packaging/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/packaging/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/packaging/linux.cmake)
endif()
endif()
include(CPack)
================================================
FILE: cmake/packaging/linux.cmake
================================================
# linux specific packaging
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# copy assets (excluding shaders) to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets"
PATTERN "shaders" EXCLUDE)
# use symbolic link for shaders directory
file(CREATE_LINK "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/shaders"
"${CMAKE_BINARY_DIR}/assets/shaders" COPY_ON_ERROR SYMBOLIC)
if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.conf"
DESTINATION "${SUNSHINE_ASSETS_DIR}/modules-load.d")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
else()
find_package(Systemd)
find_package(Udev)
if(UDEV_FOUND)
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
endif()
if(SYSTEMD_FOUND)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.conf"
DESTINATION "${SYSTEMD_MODULES_LOAD_DIR}")
endif()
endif()
# Post install
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
# Apply setcap for RPM
# https://github.com/coreos/rpm-ostree/discussions/5036#discussioncomment-10291071
set(CPACK_RPM_USER_FILELIST "%caps(cap_sys_admin+p) ${SUNSHINE_EXECUTABLE_PATH}")
# Dependencies
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \
debianutils, \
libcap2, \
libcurl4, \
libdrm2, \
libgbm1, \
libevdev2, \
libnuma1, \
libopus0, \
libpulse0, \
libva2, \
libva-drm2, \
libwayland-client0, \
libx11-6, \
miniupnpc, \
openssl | libssl3")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
libcap >= 2.22, \
libcurl >= 7.0, \
libdrm >= 2.4.97, \
libevdev >= 1.5.6, \
libopusenc >= 0.2.1, \
libva >= 2.14.0, \
libwayland-client >= 1.20.0, \
libX11 >= 1.7.3.1, \
mesa-libgbm >= 25.0.7, \
miniupnpc >= 2.2.4, \
numactl-libs >= 2.0.14, \
openssl >= 3.0.2, \
pulseaudio-libs >= 10.0, \
which >= 2.21")
if(NOT BOOST_USE_STATIC)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
libboost-filesystem${Boost_VERSION}, \
libboost-locale${Boost_VERSION}, \
libboost-log${Boost_VERSION}, \
libboost-program-options${Boost_VERSION}")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PACKAGE_REQUIRES}, \
boost-filesystem >= ${Boost_VERSION}, \
boost-locale >= ${Boost_VERSION}, \
boost-log >= ${Boost_VERSION}, \
boost-program-options >= ${Boost_VERSION}")
endif()
# This should automatically figure out dependencies, doesn't work with the current config
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
# application icon
if(NOT ${SUNSHINE_BUILD_FLATPAK})
install(FILES "${CMAKE_SOURCE_DIR}/apollo.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
else()
install(FILES "${CMAKE_SOURCE_DIR}/apollo.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
RENAME "${PROJECT_FQDN}.svg")
endif()
# tray icon
if(${SUNSHINE_TRAY} STREQUAL 1)
if(NOT ${SUNSHINE_BUILD_FLATPAK})
install(FILES "${CMAKE_SOURCE_DIR}/apollo.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "apollo-tray.svg")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/apollo-playing.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/apollo-pausing.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/apollo-locked.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
else()
# flatpak icons must be prefixed with the app id or they will not be included in the flatpak
install(FILES "${CMAKE_SOURCE_DIR}/apollo.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "${PROJECT_FQDN}-tray.svg")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/apollo-playing.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "${PROJECT_FQDN}-playing.svg")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/apollo-pausing.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "${PROJECT_FQDN}-pausing.svg")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/apollo-locked.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
RENAME "${PROJECT_FQDN}-locked.svg")
endif()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
libayatana-appindicator3-1, \
libnotify4")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PACKAGE_REQUIRES}, \
libappindicator-gtk3 >= 12.10.0")
endif()
# desktop file
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_FQDN}.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
if(NOT ${SUNSHINE_BUILD_APPIMAGE} AND NOT ${SUNSHINE_BUILD_FLATPAK})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_FQDN}.terminal.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
endif()
# metadata file
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_FQDN}.metainfo.xml"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
================================================
FILE: cmake/packaging/macos.cmake
================================================
# macos specific packaging
# todo - bundle doesn't produce a valid .app use cpack -G DragNDrop
set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_BUNDLE_PLIST "${APPLE_PLIST_FILE}")
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns")
# set(CPACK_BUNDLE_STARTUP_COMMAND "${INSTALL_RUNTIME_DIR}/sunshine")
if(SUNSHINE_PACKAGE_MACOS) # todo
set(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents")
set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS")
install(TARGETS sunshine
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
else()
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/misc/uninstall_pkg.sh"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
endif()
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# copy assets to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets")
================================================
FILE: cmake/packaging/unix.cmake
================================================
# unix specific packaging
# put anything here that applies to both linux and macos
# return here if building a macos package
if(SUNSHINE_PACKAGE_MACOS)
return()
endif()
# Installation destination dir
set(CPACK_SET_DESTDIR true)
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/share/sunshine")
endif()
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
================================================
FILE: cmake/packaging/windows.cmake
================================================
# windows specific packaging
install(TARGETS sunshine RUNTIME DESTINATION "." COMPONENT application)
# Hardening: include zlib1.dll (loaded via LoadLibrary() in openssl's libcrypto.a)
install(FILES "${ZLIB}" DESTINATION "." COMPONENT application)
# ViGEmBus installer
set(VIGEMBUS_INSTALLER "${CMAKE_BINARY_DIR}/vigembus_installer.exe")
file(DOWNLOAD
"https://github.com/nefarius/ViGEmBus/releases/download/v1.21.442.0/ViGEmBus_1.21.442_x64_x86_arm64.exe"
${VIGEMBUS_INSTALLER}
SHOW_PROGRESS
EXPECTED_HASH SHA256=155c50f1eec07bdc28d2f61a3e3c2c6c132fee7328412de224695f89143316bc
TIMEOUT 60
)
install(FILES ${VIGEMBUS_INSTALLER}
DESTINATION "scripts"
RENAME "vigembus_installer.exe"
COMPONENT gamepad)
# Adding tools
install(TARGETS dxgi-info RUNTIME DESTINATION "tools" COMPONENT dxgi)
install(TARGETS audio-info RUNTIME DESTINATION "tools" COMPONENT audio)
# Mandatory tools
install(TARGETS sunshinesvc RUNTIME DESTINATION "tools" COMPONENT application)
# Drivers
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/drivers/sudovda"
DESTINATION "drivers"
COMPONENT sudovda)
# Mandatory scripts
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/service/"
DESTINATION "scripts"
COMPONENT assets)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/migration/"
DESTINATION "scripts"
COMPONENT assets)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/path/"
DESTINATION "scripts"
COMPONENT assets)
# Configurable options for the service
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/autostart/"
DESTINATION "scripts"
COMPONENT autostart)
# scripts
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/"
DESTINATION "scripts"
COMPONENT firewall)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
DESTINATION "scripts"
COMPONENT gamepad)
# Sunshine assets
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}"
COMPONENT assets)
# copy assets (excluding shaders) to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets"
PATTERN "shaders" EXCLUDE)
# use junction for shaders directory
cmake_path(CONVERT "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders"
TO_NATIVE_PATH_LIST shaders_in_build_src_native)
cmake_path(CONVERT "${CMAKE_BINARY_DIR}/assets/shaders" TO_NATIVE_PATH_LIST shaders_in_build_dest_native)
execute_process(COMMAND cmd.exe /c mklink /J "${shaders_in_build_dest_native}" "${shaders_in_build_src_native}")
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\apollo.ico")
# The name of the directory that will be created in C:/Program files/
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
# Setting components groups and dependencies
set(CPACK_COMPONENT_GROUP_CORE_EXPANDED true)
# sunshine binary
set(CPACK_COMPONENT_APPLICATION_DISPLAY_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_COMPONENT_APPLICATION_DESCRIPTION "${CMAKE_PROJECT_NAME} main application and required components.")
set(CPACK_COMPONENT_APPLICATION_GROUP "Core")
set(CPACK_COMPONENT_APPLICATION_REQUIRED true)
set(CPACK_COMPONENT_APPLICATION_DEPENDS assets)
# service auto-start script
set(CPACK_COMPONENT_AUTOSTART_DISPLAY_NAME "Launch on Startup")
set(CPACK_COMPONENT_AUTOSTART_DESCRIPTION "If enabled, launches Apollo automatically on system startup.")
set(CPACK_COMPONENT_AUTOSTART_GROUP "Core")
# assets
set(CPACK_COMPONENT_ASSETS_DISPLAY_NAME "Required Assets")
set(CPACK_COMPONENT_ASSETS_DESCRIPTION "Shaders, default box art, and web UI.")
set(CPACK_COMPONENT_ASSETS_GROUP "Core")
set(CPACK_COMPONENT_ASSETS_REQUIRED true)
# drivers
set(CPACK_COMPONENT_SUDOVDA_DISPLAY_NAME "SudoVDA")
set(CPACK_COMPONENT_SUDOVDA_DESCRIPTION "Driver required for Virtual Display to function.")
set(CPACK_COMPONENT_SUDOVDA_GROUP "Drivers")
set(CPACK_COMPONENT_SUDOVDA_REQUIRED true)
# audio tool
set(CPACK_COMPONENT_AUDIO_DISPLAY_NAME "audio-info")
set(CPACK_COMPONENT_AUDIO_DESCRIPTION "CLI tool providing information about sound devices.")
set(CPACK_COMPONENT_AUDIO_GROUP "Tools")
# display tool
set(CPACK_COMPONENT_DXGI_DISPLAY_NAME "dxgi-info")
set(CPACK_COMPONENT_DXGI_DESCRIPTION "CLI tool providing information about graphics cards and displays.")
set(CPACK_COMPONENT_DXGI_GROUP "Tools")
# firewall scripts
set(CPACK_COMPONENT_FIREWALL_DISPLAY_NAME "Add Firewall Exclusions")
set(CPACK_COMPONENT_FIREWALL_DESCRIPTION "Scripts to enable or disable firewall rules.")
set(CPACK_COMPONENT_FIREWALL_GROUP "Scripts")
# gamepad scripts
set(CPACK_COMPONENT_GAMEPAD_DISPLAY_NAME "Virtual Gamepad")
set(CPACK_COMPONENT_GAMEPAD_DESCRIPTION "Scripts to install and uninstall Virtual Gamepad.")
set(CPACK_COMPONENT_GAMEPAD_GROUP "Scripts")
# include specific packaging
include(${CMAKE_MODULE_PATH}/packaging/windows_nsis.cmake)
include(${CMAKE_MODULE_PATH}/packaging/windows_wix.cmake)
================================================
FILE: cmake/packaging/windows_nsis.cmake
================================================
# NSIS Packaging
# see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT__DIR}\\\\${PROJECT_EXE}")
# Extra install commands
# Restores permissions on the install directory
# Migrates config files from the root into the new config folder
# Install service
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
"${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
IfSilent +2 0
# ExecShell 'open' 'https://docs.lizardbyte.dev/projects/sunshine'
nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" add'
nsExec::ExecToLog '\\\"$INSTDIR\\\\drivers\\\\sudovda\\\\install.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
nsExec::ExecToLog \
'powershell.exe -NoProfile -ExecutionPolicy Bypass -File \\\"$INSTDIR\\\\scripts\\\\install-gamepad.ps1\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"'
NoController:
")
# Extra uninstall commands
# Uninstall service
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
"${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\delete-firewall-rule.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo'
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove Virtual Gamepad?' \
/SD IDNO IDNO NoGamepad
nsExec::ExecToLog \
'powershell.exe -NoProfile -ExecutionPolicy Bypass -File \
\\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.ps1\\\"'; \
skipped if no
NoGamepad:
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove SudoVDA Virtual Display Driver?' \
/SD IDNO IDNO NoSudoVDA
nsExec::ExecToLog '\\\"$INSTDIR\\\\drivers\\\\sudovda\\\\uninstall.bat\\\"'; skipped if no
NoSudoVDA:
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \
/SD IDNO IDNO NoDelete
RMDir /r \\\"$INSTDIR\\\"; skipped if no
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" remove'
NoDelete:
")
# Adding an option for the start menu
set(CPACK_NSIS_MODIFY_PATH OFF)
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
# This will be shown on the installed apps Windows settings
set(CPACK_NSIS_INSTALLED_ICON_NAME "sunshine.exe")
set(CPACK_NSIS_CREATE_ICONS_EXTRA
"${CPACK_NSIS_CREATE_ICONS_EXTRA}
SetOutPath '\$INSTDIR'
CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${CMAKE_PROJECT_NAME}.lnk' \
'\$INSTDIR\\\\sunshine.exe' '--shortcut'
")
set(CPACK_NSIS_DELETE_ICONS_EXTRA
"${CPACK_NSIS_DELETE_ICONS_EXTRA}
Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\${CMAKE_PROJECT_NAME}.lnk'
")
# Checking for previous installed versions
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
# set(CPACK_NSIS_HELP_LINK "https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html")
# set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}")
# set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support")
# set(CPACK_NSIS_MENU_LINKS
# "https://docs.lizardbyte.dev/projects/sunshine" "Sunshine documentation"
# "https://app.lizardbyte.dev" "LizardByte Web Site"
# "https://app.lizardbyte.dev/support" "LizardByte Support")
set(CPACK_NSIS_MANIFEST_DPI_AWARE true)
================================================
FILE: cmake/packaging/windows_wix.cmake
================================================
# WIX Packaging
# see options at: https://cmake.org/cmake/help/latest/cpack_gen/wix.html
# TODO: Replace nsis with wix
================================================
FILE: cmake/prep/build_version.cmake
================================================
# Set build variables if env variables are defined
# These are used in configured files such as manifests for different packages
if(DEFINED ENV{BRANCH})
set(GITHUB_BRANCH $ENV{BRANCH})
endif()
if(DEFINED ENV{BUILD_VERSION}) # cmake-lint: disable=W0106
set(BUILD_VERSION $ENV{BUILD_VERSION})
endif()
if(DEFINED ENV{CLONE_URL})
set(GITHUB_CLONE_URL $ENV{CLONE_URL})
endif()
if(DEFINED ENV{COMMIT})
set(GITHUB_COMMIT $ENV{COMMIT})
endif()
if(DEFINED ENV{TAG})
set(GITHUB_TAG $ENV{TAG})
endif()
# Check if env vars are defined before attempting to access them, variables will be defined even if blank
if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION})) # cmake-lint: disable=W0106
if((DEFINED ENV{BRANCH}) AND (NOT $ENV{BUILD_VERSION} STREQUAL ""))
# If BRANCH is defined and BUILD_VERSION is not empty, then we are building from CI
# If BRANCH is master we are building a push/release build
MESSAGE("Got from CI '$ENV{BRANCH}' branch and version '$ENV{BUILD_VERSION}'")
set(PROJECT_VERSION $ENV{BUILD_VERSION})
string(REGEX REPLACE "^v" "" PROJECT_VERSION ${PROJECT_VERSION}) # remove the v prefix if it exists
set(CMAKE_PROJECT_VERSION ${PROJECT_VERSION}) # cpack will use this to set the binary versions
endif()
else()
# Generate Sunshine Version based of the git tag
# https://github.com/nocnokneo/cmake-git-versioning-example/blob/master/LICENSE
find_package(Git)
if(GIT_EXECUTABLE)
MESSAGE("${CMAKE_SOURCE_DIR}")
get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY)
#Get current Branch
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Gather current commit
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Check if Dirty
execute_process(
COMMAND ${GIT_EXECUTABLE} diff -b --quiet --exit-code
RESULT_VARIABLE GIT_IS_DIRTY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GIT_DESCRIBE_ERROR_CODE)
MESSAGE("Sunshine Branch: ${GIT_DESCRIBE_BRANCH}")
if(NOT GIT_DESCRIBE_BRANCH STREQUAL "master")
set(PROJECT_VERSION ${PROJECT_VERSION}.${GIT_DESCRIBE_VERSION})
MESSAGE("Sunshine Version: ${GIT_DESCRIBE_VERSION}")
endif()
if(GIT_IS_DIRTY)
set(PROJECT_VERSION ${PROJECT_VERSION}.dirty)
MESSAGE("Git tree is dirty!")
endif()
else()
MESSAGE(ERROR ": Got git error while fetching tags: ${GIT_DESCRIBE_ERROR_CODE}")
endif()
else()
MESSAGE(WARNING ": Git not found, cannot find git version")
endif()
endif()
# set date variables
set(PROJECT_YEAR "1990")
set(PROJECT_MONTH "01")
set(PROJECT_DAY "01")
# Extract year, month, and day (do this AFTER version parsing)
# Note: Cmake doesn't support "{}" regex syntax
if(PROJECT_VERSION MATCHES "^([0-9][0-9][0-9][0-9])\\.([0-9][0-9][0-9][0-9]?)\\.([0-9]+)$")
message("Extracting year and month/day from PROJECT_VERSION: ${PROJECT_VERSION}")
# First capture group is the year
set(PROJECT_YEAR "${CMAKE_MATCH_1}")
# Second capture group contains month and day
set(MONTH_DAY "${CMAKE_MATCH_2}")
# Extract month (first 1-2 digits) and day (last 2 digits)
string(LENGTH "${MONTH_DAY}" MONTH_DAY_LENGTH)
if(MONTH_DAY_LENGTH EQUAL 3)
# Format: MDD (e.g., 703 = month 7, day 03)
string(SUBSTRING "${MONTH_DAY}" 0 1 PROJECT_MONTH)
string(SUBSTRING "${MONTH_DAY}" 1 2 PROJECT_DAY)
elseif(MONTH_DAY_LENGTH EQUAL 4)
# Format: MMDD (e.g., 1203 = month 12, day 03)
string(SUBSTRING "${MONTH_DAY}" 0 2 PROJECT_MONTH)
string(SUBSTRING "${MONTH_DAY}" 2 2 PROJECT_DAY)
endif()
# Ensure month is two digits
if(PROJECT_MONTH LESS 10 AND NOT PROJECT_MONTH MATCHES "^0")
set(PROJECT_MONTH "0${PROJECT_MONTH}")
endif()
# Ensure day is two digits
if(PROJECT_DAY LESS 10 AND NOT PROJECT_DAY MATCHES "^0")
set(PROJECT_DAY "0${PROJECT_DAY}")
endif()
endif()
# Parse PROJECT_VERSION to extract major, minor, and patch components
if(PROJECT_VERSION MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(PROJECT_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(CMAKE_PROJECT_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(PROJECT_VERSION_MINOR "${CMAKE_MATCH_2}")
set(CMAKE_PROJECT_VERSION_MINOR "${CMAKE_MATCH_2}")
set(PROJECT_VERSION_PATCH "${CMAKE_MATCH_3}")
set(CMAKE_PROJECT_VERSION_PATCH "${CMAKE_MATCH_3}")
endif()
message("PROJECT_NAME: ${PROJECT_NAME}")
message("PROJECT_VERSION: ${PROJECT_VERSION}")
message("PROJECT_VERSION_MAJOR: ${PROJECT_VERSION_MAJOR}")
message("PROJECT_VERSION_MINOR: ${PROJECT_VERSION_MINOR}")
message("PROJECT_VERSION_PATCH: ${PROJECT_VERSION_PATCH}")
message("CMAKE_PROJECT_VERSION: ${CMAKE_PROJECT_VERSION}")
message("CMAKE_PROJECT_VERSION_MAJOR: ${CMAKE_PROJECT_VERSION_MAJOR}")
message("CMAKE_PROJECT_VERSION_MINOR: ${CMAKE_PROJECT_VERSION_MINOR}")
message("CMAKE_PROJECT_VERSION_PATCH: ${CMAKE_PROJECT_VERSION_PATCH}")
message("PROJECT_YEAR: ${PROJECT_YEAR}")
message("PROJECT_MONTH: ${PROJECT_MONTH}")
message("PROJECT_DAY: ${PROJECT_DAY}")
list(APPEND SUNSHINE_DEFINITIONS PROJECT_NAME="${PROJECT_NAME}")
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}")
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION_MAJOR="${PROJECT_VERSION_MAJOR}")
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION_MINOR="${PROJECT_VERSION_MINOR}")
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION_PATCH="${PROJECT_VERSION_PATCH}")
list(APPEND SUNSHINE_DEFINITIONS PROJECT_VERSION_COMMIT="${GITHUB_COMMIT}")
================================================
FILE: cmake/prep/constants.cmake
================================================
# source assets will be installed from this directory
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/src_assets")
# enable system tray, we will disable this later if we cannot find the required package config on linux
set(SUNSHINE_TRAY 1)
================================================
FILE: cmake/prep/init.cmake
================================================
if (WIN32)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-template-body>) # Workaround for WinRT headers
endif()
endif()
elseif (APPLE)
elseif (UNIX)
include(GNUInstallDirs)
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
endif()
if(SUNSHINE_BUILD_FLATPAK)
set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=flatpak run --command=sunshine ${PROJECT_FQDN}")
set(SUNSHINE_SERVICE_STOP_COMMAND "ExecStop=flatpak kill ${PROJECT_FQDN}")
else()
set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=${SUNSHINE_EXECUTABLE_PATH}")
set(SUNSHINE_SERVICE_STOP_COMMAND "")
endif()
endif()
================================================
FILE: cmake/prep/options.cmake
================================================
# Publisher Metadata
set(SUNSHINE_PUBLISHER_NAME "SudoMaker"
CACHE STRING "The name of the publisher (or fork developer) of the application.")
set(SUNSHINE_PUBLISHER_WEBSITE "https://www.sudomaker.com"
CACHE STRING "The URL of the publisher's website.")
set(SUNSHINE_PUBLISHER_ISSUE_URL "https://github.com/ClassicOldSong/Apollo/issues"
CACHE STRING "The URL of the publisher's support site or issue tracker.
If you provide a modified version of Sunshine, we kindly request that you use your own url.")
option(BUILD_DOCS "Build documentation" OFF)
option(BUILD_TESTS "Build tests" OFF)
option(NPM_OFFLINE "Use offline npm packages. You must ensure packages are in your npm cache." OFF)
option(BUILD_WERROR "Enable -Werror flag." OFF)
# if this option is set, the build will exit after configuring special package configuration files
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon." ON)
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
if(APPLE)
option(BOOST_USE_STATIC "Use static boost libraries." OFF)
else()
option(BOOST_USE_STATIC "Use static boost libraries." ON)
endif()
option(CUDA_FAIL_ON_MISSING "Fail the build if CUDA is not found." ON)
option(CUDA_INHERIT_COMPILE_OPTIONS
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if
your IDE throws errors about unknown flags after running cmake." ON)
if(UNIX)
option(SUNSHINE_BUILD_HOMEBREW
"Enable a Homebrew build." OFF)
option(SUNSHINE_CONFIGURE_HOMEBREW
"Configure Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
endif()
if(APPLE)
option(SUNSHINE_CONFIGURE_PORTFILE
"Configure macOS Portfile. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
option(SUNSHINE_PACKAGE_MACOS
"Should only be used when creating a macOS package/dmg." OFF)
elseif(UNIX) # Linux
option(SUNSHINE_BUILD_APPIMAGE
"Enable an AppImage build." OFF)
option(SUNSHINE_BUILD_FLATPAK
"Enable a Flatpak build." OFF)
option(SUNSHINE_CONFIGURE_PKGBUILD
"Configure files required for AUR. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
option(SUNSHINE_CONFIGURE_FLATPAK_MAN
"Configure manifest file required for Flatpak build. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
# Linux capture methods
option(SUNSHINE_ENABLE_CUDA
"Enable cuda specific code." ON)
option(SUNSHINE_ENABLE_DRM
"Enable KMS grab if available." ON)
option(SUNSHINE_ENABLE_VAAPI
"Enable building vaapi specific code." ON)
option(SUNSHINE_ENABLE_WAYLAND
"Enable building wayland specific code." ON)
option(SUNSHINE_ENABLE_X11
"Enable X11 grab if available." ON)
endif()
================================================
FILE: cmake/prep/special_package_configuration.cmake
================================================
if(UNIX)
if(${SUNSHINE_CONFIGURE_HOMEBREW})
configure_file(packaging/sunshine.rb sunshine.rb @ONLY)
endif()
endif()
if(APPLE)
if(${SUNSHINE_CONFIGURE_PORTFILE})
configure_file(packaging/macos/Portfile Portfile @ONLY)
endif()
elseif(UNIX)
# configure the .desktop file
set(SUNSHINE_DESKTOP_ICON "apollo.svg")
if(${SUNSHINE_BUILD_APPIMAGE})
configure_file(packaging/linux/AppImage/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
elseif(${SUNSHINE_BUILD_FLATPAK})
set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}")
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
else()
configure_file(packaging/linux/${PROJECT_FQDN}.desktop ${PROJECT_FQDN}.desktop @ONLY)
configure_file(packaging/linux/${PROJECT_FQDN}.terminal.desktop ${PROJECT_FQDN}.terminal.desktop @ONLY)
endif()
# configure metadata file
configure_file(packaging/linux/${PROJECT_FQDN}.metainfo.xml ${PROJECT_FQDN}.metainfo.xml @ONLY)
# configure service
configure_file(packaging/linux/sunshine.service.in sunshine.service @ONLY)
# configure the arch linux pkgbuild
if(${SUNSHINE_CONFIGURE_PKGBUILD})
configure_file(packaging/linux/Arch/PKGBUILD PKGBUILD @ONLY)
configure_file(packaging/linux/Arch/sunshine.install sunshine.install @ONLY)
endif()
# configure the flatpak manifest
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY)
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR})
file(COPY generated-sources.json DESTINATION ${CMAKE_BINARY_DIR})
file(COPY package-lock.json DESTINATION ${CMAKE_BINARY_DIR})
endif()
endif()
# return if configure only is set
if(${SUNSHINE_CONFIGURE_ONLY})
# message
message(STATUS "SUNSHINE_CONFIGURE_ONLY: ON, exiting...")
set(END_BUILD ON)
else()
set(END_BUILD OFF)
endif()
================================================
FILE: cmake/targets/common.cmake
================================================
# common target definitions
# this file will also load platform specific macros
add_executable(sunshine ${SUNSHINE_TARGET_FILES})
foreach(dep ${SUNSHINE_TARGET_DEPENDENCIES})
add_dependencies(sunshine ${dep}) # compile these before sunshine
endforeach()
# platform specific target definitions
if(WIN32)
include(${CMAKE_MODULE_PATH}/targets/windows.cmake)
elseif(UNIX)
include(${CMAKE_MODULE_PATH}/targets/unix.cmake)
if(APPLE)
include(${CMAKE_MODULE_PATH}/targets/macos.cmake)
else()
include(${CMAKE_MODULE_PATH}/targets/linux.cmake)
endif()
endif()
# todo - is this necessary? ... for anything except linux?
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()
target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS})
target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS})
set_target_properties(sunshine PROPERTIES CXX_STANDARD 23
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
# CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files
if(CUDA_INHERIT_COMPILE_OPTIONS)
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
endforeach()
endif()
target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COMPILE_OPTIONS}>;$<$<COMPILE_LANGUAGE:CUDA>:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301
# Homebrew build fails the vite build if we set these environment variables
if(${SUNSHINE_BUILD_HOMEBREW})
set(NPM_SOURCE_ASSETS_DIR "")
set(NPM_ASSETS_DIR "")
set(NPM_BUILD_HOMEBREW "true")
else()
set(NPM_SOURCE_ASSETS_DIR ${SUNSHINE_SOURCE_ASSETS_DIR})
set(NPM_ASSETS_DIR ${CMAKE_BINARY_DIR})
set(NPM_BUILD_HOMEBREW "")
endif()
#WebUI build
find_program(NPM npm REQUIRED)
if (NPM_OFFLINE)
set(NPM_INSTALL_FLAGS "--offline")
else()
set(NPM_INSTALL_FLAGS "")
endif()
add_custom_target(web-ui ALL
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
COMMENT "Installing NPM Dependencies and Building the Web UI"
COMMAND "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" install ${NPM_INSTALL_FLAGS}
COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301
COMMAND_EXPAND_LISTS
VERBATIM)
# docs
if(BUILD_DOCS)
add_subdirectory(third-party/doxyconfig docs)
endif()
# tests
if(BUILD_TESTS)
add_subdirectory(tests)
endif()
# custom compile flags, must be after adding tests
if (NOT BUILD_TESTS)
set(TEST_DIR "")
else()
set(TEST_DIR "${CMAKE_SOURCE_DIR}/tests")
endif()
# src/upnp
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/upnp.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
PROPERTIES COMPILE_FLAGS -Wno-pedantic)
# third-party/nanors
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/rswrapper.c"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
PROPERTIES COMPILE_FLAGS "-ftree-vectorize -funroll-loops")
# third-party/ViGEmClient
set(VIGEM_COMPILE_FLAGS "")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unknown-pragmas ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-misleading-indentation ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-class-memaccess ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-function ")
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-variable ")
set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
PROPERTIES
COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650"
COMPILE_FLAGS ${VIGEM_COMPILE_FLAGS})
# src/nvhttp
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
if(WIN32)
if (NOT BUILD_TESTS)
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}"
PROPERTIES COMPILE_FLAGS -O2)
else()
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
DIRECTORY "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/tests"
PROPERTIES COMPILE_FLAGS -O2)
endif()
endif()
else()
add_definitions(-DNDEBUG)
endif()
================================================
FILE: cmake/targets/linux.cmake
================================================
# linux specific target definitions
================================================
FILE: cmake/targets/macos.cmake
================================================
# macos specific target definitions
target_link_options(sunshine PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${APPLE_PLIST_FILE})
# Tell linker to dynamically load these symbols at runtime, in case they're unavailable:
target_link_options(sunshine PRIVATE -Wl,-U,_CGPreflightScreenCaptureAccess -Wl,-U,_CGRequestScreenCaptureAccess)
================================================
FILE: cmake/targets/unix.cmake
================================================
# unix specific target definitions
# put anything here that applies to both linux and macos
================================================
FILE: cmake/targets/windows.cmake
================================================
# windows specific target definitions
set_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
find_library(ZLIB ZLIB1)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
$<TARGET_OBJECTS:sunshine_rc_object>
Windowsapp.lib
Wtsapi32.lib)
================================================
FILE: codecov.yml
================================================
---
codecov:
branch: master
coverage:
status:
project:
default:
target: auto
threshold: 10%
comment:
layout: "diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
ignore:
- "tests"
- "third-party"
================================================
FILE: crowdin.yml
================================================
---
"base_path": "."
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
"preserve_hierarchy": true # false will flatten tree on crowdin, but doesn't work with dest option
"pull_request_title": "chore(l10n): update translations"
"pull_request_labels": [
"crowdin",
"l10n"
]
"files": [
{
"source": "/locale/*.po",
"dest": "/%original_file_name%",
"translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
"languages_mapping": {
"two_letters_code": {
# map non-two letter codes here, left side is crowdin designation, right side is babel designation
"en-GB": "en_GB",
"en-US": "en_US",
"pt-BR": "pt_BR",
"zh-TW": "zh_TW"
}
},
"update_option": "update_as_unapproved"
},
{
"source": "/src_assets/common/assets/web/public/assets/locale/en.json",
"dest": "/sunshine.json",
"translation": "/src_assets/common/assets/web/public/assets/locale/%two_letters_code%.%file_extension%",
"update_option": "update_as_unapproved"
}
]
================================================
FILE: docker/archlinux.dockerfile
================================================
# syntax=docker/dockerfile:1
# artifacts: true
# platforms: linux/amd64
# archlinux does not have an arm64 base image
# no-cache-filters: artifacts,sunshine
ARG BASE=archlinux/archlinux
ARG TAG=base-devel
FROM ${BASE}:${TAG} AS sunshine-base
# Update keyring to avoid signature errors, and update system
RUN <<_DEPS
#!/bin/bash
set -e
pacman -Syy --disable-download-timeout --needed --noconfirm \
archlinux-keyring
pacman -Syu --disable-download-timeout --noconfirm
pacman -Scc --noconfirm
_DEPS
FROM sunshine-base AS sunshine-deps
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install dependencies first - this layer will be cached
RUN <<_SETUP
#!/bin/bash
set -e
# Setup builder user, arch prevents running makepkg as root
useradd -m builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# patch the build flags
# shellcheck disable=SC2016
sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf
# install dependencies
pacman -Syu --disable-download-timeout --needed --noconfirm \
base-devel \
cmake \
cuda \
git \
namcap \
xorg-server-xvfb
pacman -Scc --noconfirm
_SETUP
FROM sunshine-deps AS sunshine-build
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
ARG CLONE_URL
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
ENV CLONE_URL=${CLONE_URL}
# PKGBUILD options
ENV _use_cuda=true
ENV _run_unit_tests=true
ENV _support_headless_testing=true
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Setup builder user
USER builder
# copy repository
WORKDIR /build/sunshine/
COPY --link .. .
# setup build directory
WORKDIR /build/sunshine/build
# configure PKGBUILD file
RUN <<_MAKE
#!/bin/bash
set -e
sub_version=""
if [[ "${BRANCH}" != "master" ]]; then
sub_version=".r${COMMIT}"
fi
cmake \
-DSUNSHINE_CONFIGURE_ONLY=ON \
-DSUNSHINE_CONFIGURE_PKGBUILD=ON \
-DSUNSHINE_SUB_VERSION="${sub_version}" \
/build/sunshine
_MAKE
WORKDIR /build/sunshine/pkg
RUN <<_PACKAGE
mv /build/sunshine/build/PKGBUILD .
mv /build/sunshine/build/sunshine.install .
makepkg --printsrcinfo > .SRCINFO
_PACKAGE
# create a PKGBUILD archive
USER root
RUN <<_REPO
#!/bin/bash
set -e
tar -czf /build/sunshine/sunshine.pkg.tar.gz .
_REPO
# namcap and build PKGBUILD file
USER builder
RUN <<_PKGBUILD
#!/bin/bash
set -e
# shellcheck source=/dev/null
source /etc/profile # ensure cuda is in the PATH
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
namcap -i PKGBUILD
makepkg -si --noconfirm
rm -f /build/sunshine/pkg/sunshine-debug*.pkg.tar.zst
ls -a
_PKGBUILD
FROM sunshine-base AS sunshine
COPY --link --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst
# artifacts to be extracted in CI
COPY --link --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /artifacts/sunshine.pkg.tar.zst
COPY --link --from=sunshine-build /build/sunshine/sunshine.pkg.tar.gz /artifacts/sunshine.pkg.tar.gz
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
pacman -U --disable-download-timeout --needed --noconfirm \
/sunshine.pkg.tar.zst
pacman -Scc --noconfirm
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]
================================================
FILE: docker/clion-toolchain.dockerfile
================================================
# syntax=docker/dockerfile:1
# artifacts: false
# platforms: linux/amd64
# platforms_pr: linux/amd64
# no-cache-filters: toolchain-base,toolchain
ARG BASE=debian
ARG TAG=trixie-slim
FROM ${BASE}:${TAG} AS toolchain-base
ENV DEBIAN_FRONTEND=noninteractive
FROM toolchain-base AS toolchain
ARG TARGETPLATFORM
RUN echo "target_platform: ${TARGETPLATFORM}"
ENV DISPLAY=:0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install dependencies
RUN <<_DEPS
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends \
build-essential \
cmake=3.31.* \
ca-certificates \
doxygen \
gcc=4:14.2.* \
g++=4:14.2.* \
gdb \
git \
graphviz \
libayatana-appindicator3-dev \
libcap-dev \
libcurl4-openssl-dev \
libdrm-dev \
libevdev-dev \
libgbm-dev \
libminiupnpc-dev \
libnotify-dev \
libnuma-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libva-dev \
libwayland-dev \
libx11-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
libxcb1-dev \
libxfixes-dev \
libxrandr-dev \
libxtst-dev \
npm \
udev \
wget \
x11-xserver-utils \
xvfb
apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
# install cuda
WORKDIR /build/cuda
# versions: https://developer.nvidia.com/cuda-toolkit-archive
ENV CUDA_VERSION="12.9.1"
ENV CUDA_BUILD="575.57.08"
RUN <<_INSTALL_CUDA
#!/bin/bash
set -e
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
cuda_suffix=""
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cuda_suffix="_sbsa"
fi
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
echo "cuda url: ${url}"
tmpfile="/tmp/cuda.run"
wget "$url" --progress=bar:force:noscroll --show-progress -O "$tmpfile"
chmod a+x "${tmpfile}"
"${tmpfile}" --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm
rm -f "${tmpfile}"
_INSTALL_CUDA
WORKDIR /toolchain
# Create a shell script that starts Xvfb and then runs a shell
RUN <<_ENTRYPOINT
#!/bin/bash
set -e
cat <<EOF > entrypoint.sh
#!/bin/bash
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
if [ "\$#" -eq 0 ]; then
exec "/bin/bash"
else
exec "\$@"
fi
EOF
# Make the script executable
chmod +x entrypoint.sh
# Note about CLion
echo "ATTENTION: CLion will override the entrypoint, you can disable this in the toolchain settings"
_ENTRYPOINT
# Use the shell script as the entrypoint
ENTRYPOINT ["/toolchain/entrypoint.sh"]
================================================
FILE: docker/debian-trixie.dockerfile
================================================
# syntax=docker/dockerfile:1
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=debian
ARG TAG=trixie
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base AS sunshine-deps
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Copy only the build script and necessary files first for better layer caching
WORKDIR /build/sunshine/
COPY --link scripts/linux_build.sh ./scripts/linux_build.sh
COPY --link packaging/linux/patches/ ./packaging/linux/patches/
# Install dependencies first - this layer will be cached
RUN <<_DEPS
#!/bin/bash
set -e
chmod +x ./scripts/linux_build.sh
./scripts/linux_build.sh \
--step=deps \
--cuda-patches \
--sudo-off
apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
FROM sunshine-deps AS sunshine-build
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
# Now copy the full repository
COPY --link .. .
# Configure, validate, build and package
RUN <<_BUILD
#!/bin/bash
set -e
./scripts/linux_build.sh \
--step=cmake \
--publisher-name='LizardByte' \
--publisher-website='https://app.lizardbyte.dev' \
--publisher-issue-url='https://app.lizardbyte.dev/support' \
--sudo-off
./scripts/linux_build.sh \
--step=validation \
--sudo-off
./scripts/linux_build.sh \
--step=build \
--sudo-off
./scripts/linux_build.sh \
--step=package \
--sudo-off
_BUILD
# run tests
WORKDIR /build/sunshine/build/tests
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM sunshine-base AS sunshine
ARG BASE
ARG TAG
ARG TARGETARCH
# artifacts to be extracted in CI
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /artifacts/sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
# copy deb from builder
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]
================================================
FILE: docker/ubuntu-22.04.dockerfile
================================================
# syntax=docker/dockerfile:1
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu
ARG TAG=22.04
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base AS sunshine-deps
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Copy only the build script first for better layer caching
WORKDIR /build/sunshine/
COPY --link scripts/linux_build.sh ./scripts/linux_build.sh
# Install dependencies first - this layer will be cached
RUN <<_DEPS
#!/bin/bash
set -e
chmod +x ./scripts/linux_build.sh
./scripts/linux_build.sh \
--step=deps \
--ubuntu-test-repo \
--sudo-off
apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
FROM sunshine-deps AS sunshine-build
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
# Now copy the full repository
COPY --link .. .
# Configure, validate, build and package
RUN <<_BUILD
#!/bin/bash
set -e
./scripts/linux_build.sh \
--step=cmake \
--publisher-name='LizardByte' \
--publisher-website='https://app.lizardbyte.dev' \
--publisher-issue-url='https://app.lizardbyte.dev/support' \
--sudo-off
./scripts/linux_build.sh \
--step=validation \
--sudo-off
./scripts/linux_build.sh \
--step=build \
--sudo-off
./scripts/linux_build.sh \
--step=package \
--sudo-off
_BUILD
# run tests
WORKDIR /build/sunshine/build/tests
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM sunshine-base AS sunshine
ARG BASE
ARG TAG
ARG TARGETARCH
# artifacts to be extracted in CI
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /artifacts/sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
# copy deb from builder
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1000
ENV PGID=${PGID}
ARG PUID=1000
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]
================================================
FILE: docker/ubuntu-24.04.dockerfile
================================================
# syntax=docker/dockerfile:1
# artifacts: true
# platforms: linux/amd64,linux/arm64/v8
# platforms_pr: linux/amd64
# no-cache-filters: sunshine-base,artifacts,sunshine
ARG BASE=ubuntu
ARG TAG=24.04
FROM ${BASE}:${TAG} AS sunshine-base
ENV DEBIAN_FRONTEND=noninteractive
FROM sunshine-base AS sunshine-deps
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Copy only the build script first for better layer caching
WORKDIR /build/sunshine/
COPY --link scripts/linux_build.sh ./scripts/linux_build.sh
# Install dependencies first - this layer will be cached
RUN <<_DEPS
#!/bin/bash
set -e
chmod +x ./scripts/linux_build.sh
./scripts/linux_build.sh \
--step=deps \
--sudo-off
apt-get clean
rm -rf /var/lib/apt/lists/*
_DEPS
FROM sunshine-deps AS sunshine-build
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
# Now copy the full repository
COPY --link .. .
# Configure, validate, build and package
RUN <<_BUILD
#!/bin/bash
set -e
./scripts/linux_build.sh \
--step=cmake \
--publisher-name='LizardByte' \
--publisher-website='https://app.lizardbyte.dev' \
--publisher-issue-url='https://app.lizardbyte.dev/support' \
--sudo-off
./scripts/linux_build.sh \
--step=validation \
--sudo-off
./scripts/linux_build.sh \
--step=build \
--sudo-off
./scripts/linux_build.sh \
--step=package \
--sudo-off
_BUILD
# run tests
WORKDIR /build/sunshine/build/tests
RUN <<_TEST
#!/bin/bash
set -e
export DISPLAY=:1
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
./test_sunshine --gtest_color=yes
_TEST
FROM sunshine-base AS sunshine
ARG BASE
ARG TAG
ARG TARGETARCH
# artifacts to be extracted in CI
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /artifacts/sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
# copy deb from builder
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
#!/bin/bash
set -e
apt-get update -y
apt-get install -y --no-install-recommends /sunshine.deb
apt-get clean
rm -rf /var/lib/apt/lists/*
_INSTALL_SUNSHINE
# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp
# setup user
ARG PGID=1001
ENV PGID=${PGID}
ARG PUID=1001
ENV PUID=${PUID}
ENV TZ="UTC"
ARG UNAME=lizard
ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME
# setup user
RUN <<_SETUP_USER
#!/bin/bash
set -e
groupadd -f -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
mkdir -p ${HOME}/.config/sunshine
ln -s ${HOME}/.config/sunshine /config
chown -R ${UNAME} ${HOME}
_SETUP_USER
USER ${UNAME}
WORKDIR ${HOME}
# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]
================================================
FILE: docs/Doxyfile
================================================
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
# TAG = value [value, ...]
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").
#
# Note:
#
# Use doxygen to compare the used configuration file with the template
# configuration file:
# doxygen -x [configFile]
# Use doxygen to compare the used configuration file with the template
# configuration file without replacing the environment variables or CMake type
# replacement variables:
# doxygen -x_noenv [configFile]
# project metadata
DOCSET_BUNDLE_ID = dev.lizardbyte.Sunshine
DOCSET_PUBLISHER_ID = dev.lizardbyte.Sunshine.documentation
PROJECT_BRIEF = "Self-hosted game stream host for Moonlight."
PROJECT_ICON = ../sunshine.ico
PROJECT_LOGO = ../sunshine.png
PROJECT_NAME = Sunshine
# project specific settings
DOT_GRAPH_MAX_NODES = 60
# IMAGE_PATH = ../docs/images
PREDEFINED += SUNSHINE_BUILD_WAYLAND
PREDEFINED += SUNSHINE_TRAY=1
# TODO: Enable this when we have complete documentation
WARN_IF_UNDOCUMENTED = NO
# files and directories to process
USE_MDFILE_AS_MAINPAGE = ../README.md
INPUT = ../README.md \
getting_started.md \
changelog.md \
../DOCKER_README.md \
third_party_packages.md \
gamestream_migration.md \
legal.md \
configuration.md \
app_examples.md \
awesome_sunshine.md \
guides.md \
performance_tuning.md \
api.md \
troubleshooting.md \
building.md \
contributing.md \
../third-party/doxyconfig/docs/source_code.md \
../src
# extra css
HTML_EXTRA_STYLESHEET += doc-styles.css
# extra js
HTML_EXTRA_FILES += api.js
HTML_EXTRA_FILES += configuration.js
# custom aliases
ALIASES += api_examples{3|}="@htmlonly<script>(function() { let examples = generateExamples('\1', '\2', \3); document.write(createTabs(examples)); })();</script>@endhtmlonly"
================================================
FILE: docs/api.js
================================================
function generateExamples(endpoint, method, body = null) {
let curlBodyString = '';
let psBodyString = '';
if (body) {
const curlJsonString = JSON.stringify(body).replace(/"/g, '\\"');
curlBodyString = ` -d "${curlJsonString}"`;
psBodyString = `-Body (ConvertTo-Json ${JSON.stringify(body)})`;
}
return {
cURL: `curl -u user:pass -H "Content-Type: application/json" -X ${method.trim()} -k https://localhost:47990${endpoint.trim()}${curlBodyString}`,
Python: `import json
import requests
from requests.auth import HTTPBasicAuth
requests.${method.trim().toLowerCase()}(
auth=HTTPBasicAuth('user', 'pass'),
url='https://localhost:47990${endpoint.trim()}',
verify=False,${body ? `\n json=${JSON.stringify(body)},` : ''}
).json()`,
JavaScript: `fetch('https://localhost:47990${endpoint.trim()}', {
method: '${method.trim()}',
headers: {
'Authorization': 'Basic ' + btoa('user:pass'),
'Content-Type': 'application/json',
}${body ? `,\n body: JSON.stringify(${JSON.stringify(body)}),` : ''}
})
.then(response => response.json())
.then(data => console.log(data));`,
PowerShell: `Invoke-RestMethod \`
-SkipCertificateCheck \`
-ContentType 'application/json' \`
-Uri 'https://localhost:47990${endpoint.trim()}' \`
-Method ${method.trim()} \`
-Headers @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes('user:pass'))}
${psBodyString}`
};
}
function hashString(str) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
const char = str.charCodeAt(i);
hash = (hash << 5) - hash + char;
hash |= 0; // Convert to 32bit integer
}
return hash;
}
function createTabs(examples) {
const languages = Object.keys(examples);
let tabs = '<div class="tabs-overview-container"><div class="tabs-overview">';
let content = '<div class="tab-content">';
languages.forEach((lang, index) => {
const hash = hashString(examples[lang]);
tabs += `<button class="tab-button ${index === 0 ? 'active' : ''}" onclick="openTab(event, '${lang}')"><b class="tab-title" title=" ${lang} "> ${lang} </b></button>`;
content += `<div id="${lang}" class="tabcontent" style="display: ${index === 0 ? 'block' : 'none'};">
<div class="doxygen-awesome-fragment-wrapper">
<div class="fragment">
${examples[lang].split('\n').map(line => `<div class="line">${line}</div>`).join('')}
</div>
<doxygen-awesome-fragment-copy-button id="copy-button-${lang}-${hash}" title="Copy to clipboard">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
<path d="M0 0h24v24H0V0z" fill="none"></path>
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path>
</svg>
</doxygen-awesome-fragment-copy-button>
</div>
</div>`;
});
tabs += '</div></div>';
content += '</div>';
setTimeout(() => {
languages.forEach((lang, index) => {
const hash = hashString(examples[lang]);
const copyButton = document.getElementById(`copy-button-${lang}-${hash}`);
copyButton.addEventListener('click', copyContent);
});
}, 0);
return tabs + content;
}
function copyContent() {
const content = this.previousElementSibling.cloneNode(true);
if (content instanceof Element) {
// filter out line number from file listings
content.querySelectorAll(".lineno, .ttc").forEach((node) => {
node.remove();
});
let textContent = Array.from(content.querySelectorAll('.line'))
.map(line => line.innerText)
.join('\n')
.trim(); // Join lines with newline characters and trim leading/trailing whitespace
navigator.clipboard.writeText(textContent);
this.classList.add("success");
this.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`;
window.setTimeout(() => {
this.classList.remove("success");
this.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>`;
}, 980);
} else {
console.error('Failed to copy: content is not a DOM element');
}
}
function openTab(evt, lang) {
const tabcontent = document.getElementsByClassName("tabcontent");
for (const content of tabcontent) {
content.style.display = "none";
}
const tablinks = document.getElementsByClassName("tab-button");
for (const link of tablinks) {
link.className = link.className.replace(" active", "");
}
const selectedTabs = document.querySelectorAll(`#${lang}`);
for (const tab of selectedTabs) {
tab.style.display = "block";
}
const selectedButtons = document.querySelectorAll(`.tab-button[onclick*="${lang}"]`);
for (const button of selectedButtons) {
button.className += " active";
}
}
================================================
FILE: docs/api.md
================================================
# API
Sunshine has a RESTful API which can be used to interact with the service.
Unless otherwise specified, authentication is required for all API calls. You can authenticate using
basic authentication with the admin username and password.
@htmlonly
<script src="api.js"></script>
@endhtmlonly
## GET /api/apps
@copydoc confighttp::getApps()
## POST /api/apps
@copydoc confighttp::saveApp()
## POST /api/apps/close
@copydoc confighttp::closeApp()
## DELETE /api/apps/{index}
@copydoc confighttp::deleteApp()
## GET /api/clients/list
@copydoc confighttp::getClients()
## POST /api/clients/unpair
@copydoc confighttp::unpair()
## POST /api/clients/unpair-all
@copydoc confighttp::unpairAll()
## GET /api/config
@copydoc confighttp::getConfig()
## GET /api/configLocale
@copydoc confighttp::getLocale()
## POST /api/config
@copydoc confighttp::saveConfig()
## POST /api/covers/upload
@copydoc confighttp::uploadCover()
## GET /api/logs
@copydoc confighttp::getLogs()
## POST /api/password
@copydoc confighttp::savePassword()
## POST /api/pin
@copydoc confighttp::savePin()
## POST /api/reset-display-device-persistence
@copydoc confighttp::resetDisplayDevicePersistence()
## POST /api/restart
@copydoc confighttp::restart()
<div class="section_buttons">
| Previous | Next |
|:--------------------------------------------|--------------------------------------:|
| [Performance Tuning](performance_tuning.md) | [Troubleshooting](troubleshooting.md) |
</div>
<details style="display: none;">
<summary></summary>
[TOC]
</details>
================================================
FILE: docs/app_examples.md
================================================
# 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.
> [!TIP]
> 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).
> [!WARNING]
> When a working directory is not specified, it defaults to the folder where the target application resides.
## Common Examples
### Desktop
| Field | Value |
|------------------|----------------------------|
| Application Name | @code{}Desktop@endcode |
| Image | @code{}desktop.png@endcode |
### 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.
@tabs{
@tab{Linux | <!-- -->
\| Field \| Value \|
\|------------------------------\|------------------------------------------------------\|
\| Application Name \| @code{}Steam Big Picture@endcode \|
\| Command Preporations -> Undo \| @code{}setsid steam steam://close/bigpicture@endcode \|
\| Detached Commands \| @code{}setsid steam steam://open/bigpicture@endcode \|
\| Image \| @code{}steam.png@endcode \|
}
@tab{macOS | <!-- -->
\| Field \| Value \|
\|------------------------------\|------------------------------------------------\|
\| Application Name \| @code{}Steam Big Picture@endcode \|
\| Command Preporations -> Undo \| @code{}open steam://close/bigpicture@endcode \|
\| Detached Commands \| @code{}open steam://open/bigpicture@endcode \|
\| Image \| @code{}steam.png@endcode \|
}
@tab{Windows | <!-- -->
\| Field \| Value \|
\|------------------------------\|-------------------------------------------\|
\| Application Name \| @code{}Steam Big Picture@endcode \|
\| Command Preporations -> Undo \| @code{}steam://close/bigpicture@endcode \|
\| Detached Commands \| @code{}steam://open/bigpicture@endcode \|
\| Image \| @code{}steam.png@endcode \|
}
}
### Epic Game Store game
> [!NOTE]
> Using the URI method will be the most consistent between various games.
#### URI
@tabs{
@tab{Windows | <!-- -->
\| Field \| Value \|
\|------------------\|-------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Commands \| @code{}com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true@endcode \|
}
}
#### Binary (w/ working directory
@tabs{
@tab{Windows | <!-- -->
\| Field \| Value \|
\|-------------------\|------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}MarsEpic.exe@endcode \|
\| Working Directory \| @code{}"C:\Program Files\Epic Games\SurvivingMars"@endcode \|
}
}
#### Binary (w/o working directory)
@tabs{
@tab{Windows | <!-- -->
\| Field \| Value \|
\|-------------------\|-------------------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"@endcode \|
}
}
### Steam game
> [!NOTE]
> Using the URI method will be the most consistent between various games.
#### URI
@tabs{
@tab{Linux | <!-- -->
\| Field \| Value \|
\|-------------------\|------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Detached Commands \| @code{}setsid steam steam://rungameid/464920@endcode \|
}
@tab{macOS | <!-- -->
\| Field \| Value \|
\|-------------------\|----------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Detached Commands \| @code{}open steam://rungameid/464920@endcode \|
}
@tab{Windows | <!-- -->
\| Field \| Value \|
\|-------------------\|-----------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Detached Commands \| @code{}steam://rungameid/464920@endcode \|
}
}
#### Binary (w/ working directory
@tabs{
@tab{Linux | <!-- -->
\| Field \| Value \|
\|-------------------\|--------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}MarsSteam@endcode \|
\| Working Directory \| @code{}~/.steam/steam/SteamApps/common/Survivng Mars@endcode \|
}
@tab{macOS | <!-- -->
\| Field \| Value \|
\|-------------------\|--------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}MarsSteam@endcode \|
\| Working Directory \| @code{}~/.steam/steam/SteamApps/common/Survivng Mars@endcode \|
}
@tab{Windows | <!-- -->
\| Field \| Value \|
\|-------------------\|-------------------------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}MarsSteam.exe@endcode \|
\| Working Directory \| @code{}"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars"@endcode \|
}
}
#### Binary (w/o working directory)
@tabs{
@tab{Linux | <!-- -->
\| Field \| Value \|
\|-------------------\|------------------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam@endcode \|
}
@tab{macOS | <!-- -->
\| Field \| Value \|
\|-------------------\|------------------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam@endcode \|
}
@tab{Windows | <!-- -->
\| Field \| Value \|
\|-------------------\|---------------------------------------------------------------------------------------------\|
\| Application Name \| @code{}Surviving Mars@endcode \|
\| Command \| @code{}"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"@endcode \|
}
}
### Prep Commands
#### Changing Resolution and Refresh Rate
##### Linux
###### X11
| Prep Step | Command |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------|
| Do | @code{}sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"@endcode |
| Undo | @code{}xrandr --output HDMI-1 --mode 3840x2160 --rate 120@endcode |
> [!TIP]
> 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
> 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:
> ```bash
> #!/bin/bash
> set -e
>
> # 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
> ```
###### Wayland (wlroots, e.g. hyprland)
| Prep Step | Command |
|-----------|------------------------------------------------------------------------------------------------------------------------------------------|
| Do | @code{}sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""@endcode |
| Undo | @code{}wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz@endcode |
> [!TIP]
> `wlr-xrandr` only works with wlroots-based compositors.
###### Gnome (X11)
| Prep Step | Command |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------|
| Do | @code{}sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"@endcode |
| Undo | @code{}xrandr --output HDMI-1 --mode 3840x2160 --rate 120@endcode |
###### Gnome (Wayland)
| Prep Step | Command |
|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Do | @code{}sh -c "displayconfig-mutter set --connector HDMI-1 --resolution ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --refresh-rate ${SUNSHINE_CLIENT_FPS} --hdr ${SUNSHINE_CLIENT_HDR}"@endcode |
| Undo | @code{}displayconfig-mutter set --connector HDMI-1 --resolution 3840x2160 --refresh-rate 120 --hdr false@endcode |
Installation instructions for displayconfig-mutter can be [found here](https://github.com/eaglesemanation/displayconfig-mutter). Alternatives include
[gnome-randr-rust](https://github.com/maxwellainatchi/gnome-randr-rust) and [gnome-randr.py](https://gitlab.com/Oschowa/gnome-randr), but both of those are
unmaintained and do not support newer Mutter features such as HDR and VRR.
> [!TIP]
> HDR support has been added to Gnome 48, to check if your display supports it, you can run this:
> ```
> displayconfig-mutter list
> ```
> If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
###### KDE Plasma (Wayland, X11)
| Prep Step | Command |
|-----------|--------------------------------------------------------------------------------------------------------------------------------------|
| Do | @code{}sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"@endcode |
| Undo | @code{}kscreen-doctor output.HDMI-A-1.mode.3840x2160@120@endcode |
> [!CAUTION]
> The names of your displays will differ between X11 and Wayland.
> Be sure to use the correct name, depending on your session manager.
> e.g., On X11, the monitor may be called ``HDMI-A-0``, but on Wayland, it may be called ``HDMI-A-1``.
> [!TIP]
> Replace ``HDMI-A-1`` with the display name of the monitor you would like to use for Moonlight.
> You can list the monitors available to you with:
> ```
> kscreen-doctor -o
> ```
>
> These will also give you the supported display properties for each monitor. You can select them either by
> hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mode.0``) or using the above
> ``do`` command to fetch the resolution
gitextract_caung7mp/ ├── .clang-format ├── .dockerignore ├── .flake8 ├── .gitattributes ├── .github/ │ ├── CONTRIBUTING.md │ ├── copilot-instructions.md │ └── matchers/ │ ├── copr-ci.json │ ├── docker.json │ ├── gcc-strip3.json │ └── gcc.json ├── .gitignore ├── .gitmodules ├── .prettierrc.json ├── .readthedocs.yaml ├── CMakeLists.txt ├── DOCKER_README.md ├── LICENSE ├── NOTICE ├── README.md ├── apollo.icns ├── cmake/ │ ├── FindLIBCAP.cmake │ ├── FindLIBDRM.cmake │ ├── FindLibva.cmake │ ├── FindSystemd.cmake │ ├── FindUdev.cmake │ ├── FindWayland.cmake │ ├── compile_definitions/ │ │ ├── common.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── unix.cmake │ │ └── windows.cmake │ ├── dependencies/ │ │ ├── Boost_Sunshine.cmake │ │ ├── common.cmake │ │ ├── libevdev_Sunshine.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── nlohmann_json.cmake │ │ ├── unix.cmake │ │ └── windows.cmake │ ├── macros/ │ │ ├── common.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── unix.cmake │ │ └── windows.cmake │ ├── packaging/ │ │ ├── common.cmake │ │ ├── linux.cmake │ │ ├── macos.cmake │ │ ├── unix.cmake │ │ ├── windows.cmake │ │ ├── windows_nsis.cmake │ │ └── windows_wix.cmake │ ├── prep/ │ │ ├── build_version.cmake │ │ ├── constants.cmake │ │ ├── init.cmake │ │ ├── options.cmake │ │ └── special_package_configuration.cmake │ └── targets/ │ ├── common.cmake │ ├── linux.cmake │ ├── macos.cmake │ ├── unix.cmake │ └── windows.cmake ├── codecov.yml ├── crowdin.yml ├── docker/ │ ├── archlinux.dockerfile │ ├── clion-toolchain.dockerfile │ ├── debian-trixie.dockerfile │ ├── ubuntu-22.04.dockerfile │ └── ubuntu-24.04.dockerfile ├── docs/ │ ├── Doxyfile │ ├── api.js │ ├── api.md │ ├── app_examples.md │ ├── awesome_sunshine.md │ ├── building.md │ ├── changelog.md │ ├── configuration.js │ ├── configuration.md │ ├── contributing.md │ ├── doc-styles.css │ ├── gamestream_migration.md │ ├── getting_started.md │ ├── guides.md │ ├── legal.md │ ├── performance_tuning.md │ ├── third_party_packages.md │ └── troubleshooting.md ├── gh-pages-template/ │ ├── .readthedocs.yaml │ ├── _config.yml │ └── index.html ├── package.json ├── packaging/ │ ├── linux/ │ │ ├── AppImage/ │ │ │ ├── AppRun │ │ │ └── dev.lizardbyte.app.Sunshine.desktop │ │ ├── Arch/ │ │ │ ├── PKGBUILD │ │ │ └── sunshine.install │ │ ├── dev.lizardbyte.app.Sunshine.desktop │ │ ├── dev.lizardbyte.app.Sunshine.metainfo.xml │ │ ├── dev.lizardbyte.app.Sunshine.terminal.desktop │ │ ├── fedora/ │ │ │ └── Sunshine.spec │ │ ├── flatpak/ │ │ │ ├── README.md │ │ │ ├── apps.json │ │ │ ├── dev.lizardbyte.app.Sunshine.desktop │ │ │ ├── dev.lizardbyte.app.Sunshine.yml │ │ │ ├── exceptions.json │ │ │ ├── flathub.json │ │ │ ├── modules/ │ │ │ │ ├── avahi.json │ │ │ │ ├── boost.json │ │ │ │ ├── cuda.json │ │ │ │ ├── libevdev.json │ │ │ │ ├── libnotify.json │ │ │ │ ├── miniupnpc.json │ │ │ │ ├── nlohmann_json.json │ │ │ │ ├── numactl.json │ │ │ │ └── xvfb/ │ │ │ │ ├── xvfb-run │ │ │ │ └── xvfb.json │ │ │ └── scripts/ │ │ │ ├── additional-install.sh │ │ │ ├── remove-additional-install.sh │ │ │ └── sunshine.sh │ │ ├── patches/ │ │ │ ├── aarch64/ │ │ │ │ └── 01-math_functions.patch │ │ │ └── x86_64/ │ │ │ └── 01-math_functions.patch │ │ └── sunshine.service.in │ └── sunshine.rb ├── scripts/ │ ├── _locale.py │ ├── icons/ │ │ └── convert_and_pack.sh │ ├── linux_build.sh │ ├── requirements.txt │ └── update_clang_format.py ├── src/ │ ├── audio.cpp │ ├── audio.h │ ├── cbs.cpp │ ├── cbs.h │ ├── config.cpp │ ├── config.h │ ├── confighttp.cpp │ ├── confighttp.h │ ├── crypto.cpp │ ├── crypto.h │ ├── display_device.cpp │ ├── display_device.h │ ├── entry_handler.cpp │ ├── entry_handler.h │ ├── file_handler.cpp │ ├── file_handler.h │ ├── globals.cpp │ ├── globals.h │ ├── httpcommon.cpp │ ├── httpcommon.h │ ├── input.cpp │ ├── input.h │ ├── logging.cpp │ ├── logging.h │ ├── main.cpp │ ├── main.h │ ├── move_by_copy.h │ ├── network.cpp │ ├── network.h │ ├── nvenc/ │ │ ├── nvenc_base.cpp │ │ ├── nvenc_base.h │ │ ├── nvenc_colorspace.h │ │ ├── nvenc_config.h │ │ ├── nvenc_d3d11.cpp │ │ ├── nvenc_d3d11.h │ │ ├── nvenc_d3d11_native.cpp │ │ ├── nvenc_d3d11_native.h │ │ ├── nvenc_d3d11_on_cuda.cpp │ │ ├── nvenc_d3d11_on_cuda.h │ │ ├── nvenc_encoded_frame.h │ │ ├── nvenc_utils.cpp │ │ └── nvenc_utils.h │ ├── nvhttp.cpp │ ├── nvhttp.h │ ├── platform/ │ │ ├── common.h │ │ ├── linux/ │ │ │ ├── audio.cpp │ │ │ ├── cuda.cpp │ │ │ ├── cuda.cu │ │ │ ├── cuda.h │ │ │ ├── graphics.cpp │ │ │ ├── graphics.h │ │ │ ├── input/ │ │ │ │ ├── inputtino.cpp │ │ │ │ ├── inputtino_common.h │ │ │ │ ├── inputtino_gamepad.cpp │ │ │ │ ├── inputtino_gamepad.h │ │ │ │ ├── inputtino_keyboard.cpp │ │ │ │ ├── inputtino_keyboard.h │ │ │ │ ├── inputtino_mouse.cpp │ │ │ │ ├── inputtino_mouse.h │ │ │ │ ├── inputtino_pen.cpp │ │ │ │ ├── inputtino_pen.h │ │ │ │ ├── inputtino_touch.cpp │ │ │ │ └── inputtino_touch.h │ │ │ ├── kmsgrab.cpp │ │ │ ├── misc.cpp │ │ │ ├── misc.h │ │ │ ├── publish.cpp │ │ │ ├── vaapi.cpp │ │ │ ├── vaapi.h │ │ │ ├── wayland.cpp │ │ │ ├── wayland.h │ │ │ ├── wlgrab.cpp │ │ │ ├── x11grab.cpp │ │ │ └── x11grab.h │ │ ├── macos/ │ │ │ ├── av_audio.h │ │ │ ├── av_audio.m │ │ │ ├── av_img_t.h │ │ │ ├── av_video.h │ │ │ ├── av_video.m │ │ │ ├── display.mm │ │ │ ├── input.cpp │ │ │ ├── microphone.mm │ │ │ ├── misc.h │ │ │ ├── misc.mm │ │ │ ├── nv12_zero_device.cpp │ │ │ ├── nv12_zero_device.h │ │ │ └── publish.cpp │ │ └── windows/ │ │ ├── PolicyConfig.h │ │ ├── audio.cpp │ │ ├── display.h │ │ ├── display_base.cpp │ │ ├── display_ram.cpp │ │ ├── display_vram.cpp │ │ ├── display_wgc.cpp │ │ ├── input.cpp │ │ ├── keylayout.h │ │ ├── misc.cpp │ │ ├── misc.h │ │ ├── nvprefs/ │ │ │ ├── driver_settings.cpp │ │ │ ├── driver_settings.h │ │ │ ├── nvapi_opensource_wrapper.cpp │ │ │ ├── nvprefs_common.cpp │ │ │ ├── nvprefs_common.h │ │ │ ├── nvprefs_interface.cpp │ │ │ ├── nvprefs_interface.h │ │ │ ├── undo_data.cpp │ │ │ ├── undo_data.h │ │ │ ├── undo_file.cpp │ │ │ └── undo_file.h │ │ ├── publish.cpp │ │ ├── utils.cpp │ │ ├── utils.h │ │ ├── virtual_display.cpp │ │ ├── virtual_display.h │ │ └── windows.rc │ ├── process.cpp │ ├── process.h │ ├── round_robin.h │ ├── rswrapper.c │ ├── rswrapper.h │ ├── rtsp.cpp │ ├── rtsp.h │ ├── stat_trackers.cpp │ ├── stat_trackers.h │ ├── stream.cpp │ ├── stream.h │ ├── sync.h │ ├── system_tray.cpp │ ├── system_tray.h │ ├── task_pool.h │ ├── thread_pool.h │ ├── thread_safe.h │ ├── upnp.cpp │ ├── upnp.h │ ├── utility.h │ ├── uuid.h │ ├── video.cpp │ ├── video.h │ ├── video_colorspace.cpp │ ├── video_colorspace.h │ └── zwpad.h ├── src_assets/ │ ├── common/ │ │ └── assets/ │ │ └── web/ │ │ ├── Checkbox.vue │ │ ├── ClientCard.vue │ │ ├── Navbar.vue │ │ ├── PlatformLayout.vue │ │ ├── ResourceCard.vue │ │ ├── ThemeToggle.vue │ │ ├── apollo_version.js │ │ ├── apps.html │ │ ├── config.html │ │ ├── configs/ │ │ │ └── tabs/ │ │ │ ├── Advanced.vue │ │ │ ├── AudioVideo.vue │ │ │ ├── ContainerEncoders.vue │ │ │ ├── Files.vue │ │ │ ├── General.vue │ │ │ ├── Inputs.vue │ │ │ ├── Network.vue │ │ │ ├── audiovideo/ │ │ │ │ ├── AdapterNameSelector.vue │ │ │ │ ├── DisplayDeviceOptions.vue │ │ │ │ ├── DisplayModesSettings.vue │ │ │ │ └── DisplayOutputSelector.vue │ │ │ └── encoders/ │ │ │ ├── AmdAmfEncoder.vue │ │ │ ├── IntelQuickSyncEncoder.vue │ │ │ ├── NvidiaNvencEncoder.vue │ │ │ ├── SoftwareEncoder.vue │ │ │ ├── VAAPIEncoder.vue │ │ │ └── VideotoolboxEncoder.vue │ │ ├── index.html │ │ ├── init.js │ │ ├── locale.js │ │ ├── login.html │ │ ├── password.html │ │ ├── pin.html │ │ ├── platform-i18n.js │ │ ├── public/ │ │ │ └── assets/ │ │ │ ├── css/ │ │ │ │ └── apollo.css │ │ │ └── locale/ │ │ │ ├── bg.json │ │ │ ├── cs.json │ │ │ ├── de.json │ │ │ ├── en.json │ │ │ ├── en_GB.json │ │ │ ├── en_US.json │ │ │ ├── es.json │ │ │ ├── fr.json │ │ │ ├── hu.json │ │ │ ├── it.json │ │ │ ├── ja.json │ │ │ ├── ko.json │ │ │ ├── pl.json │ │ │ ├── pt.json │ │ │ ├── pt_BR.json │ │ │ ├── ru.json │ │ │ ├── sv.json │ │ │ ├── tr.json │ │ │ ├── uk.json │ │ │ ├── vi.json │ │ │ ├── zh.json │ │ │ └── zh_TW.json │ │ ├── template_header.html │ │ ├── theme.js │ │ ├── troubleshooting.html │ │ └── welcome.html │ ├── linux/ │ │ ├── assets/ │ │ │ ├── apps.json │ │ │ └── shaders/ │ │ │ └── opengl/ │ │ │ ├── ConvertUV.frag │ │ │ ├── ConvertUV.vert │ │ │ ├── ConvertY.frag │ │ │ ├── Scene.frag │ │ │ └── Scene.vert │ │ └── misc/ │ │ ├── 60-sunshine.conf │ │ ├── 60-sunshine.rules │ │ └── postinst │ ├── macos/ │ │ ├── assets/ │ │ │ ├── Info.plist │ │ │ └── apps.json │ │ └── misc/ │ │ └── uninstall_pkg.sh │ └── windows/ │ ├── assets/ │ │ ├── apps.json │ │ └── shaders/ │ │ └── directx/ │ │ ├── convert_yuv420_packed_uv_type0_ps.hlsl │ │ ├── convert_yuv420_packed_uv_type0_ps_linear.hlsl │ │ ├── convert_yuv420_packed_uv_type0_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_packed_uv_type0_vs.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps_linear.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_packed_uv_type0s_vs.hlsl │ │ ├── convert_yuv420_planar_y_ps.hlsl │ │ ├── convert_yuv420_planar_y_ps_linear.hlsl │ │ ├── convert_yuv420_planar_y_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv420_planar_y_vs.hlsl │ │ ├── convert_yuv444_packed_ayuv_ps.hlsl │ │ ├── convert_yuv444_packed_ayuv_ps_linear.hlsl │ │ ├── convert_yuv444_packed_vs.hlsl │ │ ├── convert_yuv444_packed_y410_ps.hlsl │ │ ├── convert_yuv444_packed_y410_ps_linear.hlsl │ │ ├── convert_yuv444_packed_y410_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv444_planar_ps.hlsl │ │ ├── convert_yuv444_planar_ps_linear.hlsl │ │ ├── convert_yuv444_planar_ps_perceptual_quantizer.hlsl │ │ ├── convert_yuv444_planar_vs.hlsl │ │ ├── cursor_ps.hlsl │ │ ├── cursor_ps_normalize_white.hlsl │ │ ├── cursor_vs.hlsl │ │ └── include/ │ │ ├── base_vs.hlsl │ │ ├── base_vs_types.hlsl │ │ ├── common.hlsl │ │ ├── convert_base.hlsl │ │ ├── convert_linear_base.hlsl │ │ ├── convert_perceptual_quantizer_base.hlsl │ │ ├── convert_yuv420_packed_uv_ps_base.hlsl │ │ ├── convert_yuv420_planar_y_ps_base.hlsl │ │ └── convert_yuv444_ps_base.hlsl │ ├── drivers/ │ │ └── sudovda/ │ │ ├── SudoVDA.inf │ │ ├── install.bat │ │ ├── sudovda.cat │ │ ├── sudovda.cer │ │ └── uninstall.bat │ └── misc/ │ ├── autostart/ │ │ └── autostart-service.bat │ ├── firewall/ │ │ ├── add-firewall-rule.bat │ │ └── delete-firewall-rule.bat │ ├── gamepad/ │ │ ├── install-gamepad.ps1 │ │ └── uninstall-gamepad.ps1 │ ├── migration/ │ │ └── migrate-config.bat │ ├── path/ │ │ └── update-path.bat │ └── service/ │ ├── install-service.bat │ └── uninstall-service.bat ├── tests/ │ ├── CMakeLists.txt │ ├── fixtures/ │ │ └── http/ │ │ ├── hello-redirect.txt │ │ └── hello.txt │ ├── integration/ │ │ ├── test_config_consistency.cpp │ │ ├── test_external_commands.cpp │ │ └── test_locale_consistency.cpp │ ├── tests_common.h │ ├── tests_environment.h │ ├── tests_events.h │ ├── tests_log_checker.h │ ├── tests_main.cpp │ └── unit/ │ ├── platform/ │ │ └── test_common.cpp │ ├── test_audio.cpp │ ├── test_display_device.cpp │ ├── test_entry_handler.cpp │ ├── test_file_handler.cpp │ ├── test_http_pairing.cpp │ ├── test_httpcommon.cpp │ ├── test_logging.cpp │ ├── test_mouse.cpp │ ├── test_network.cpp │ ├── test_rswrapper.cpp │ ├── test_stream.cpp │ └── test_video.cpp ├── third-party/ │ ├── .clang-format-ignore │ ├── glad/ │ │ ├── include/ │ │ │ ├── EGL/ │ │ │ │ └── eglplatform.h │ │ │ ├── KHR/ │ │ │ │ └── khrplatform.h │ │ │ └── glad/ │ │ │ ├── egl.h │ │ │ └── gl.h │ │ └── src/ │ │ ├── egl.c │ │ └── gl.c │ ├── nvfbc/ │ │ ├── NvFBC.h │ │ └── helper_math.h │ └── sudovda/ │ ├── sudovda-ioctl.h │ └── sudovda.h ├── tools/ │ ├── CMakeLists.txt │ ├── audio.cpp │ ├── dxgi.cpp │ ├── sunshinesvc.cpp │ ├── utils.cpp │ └── utils.h └── vite.config.js
SYMBOL INDEX (2122 symbols across 173 files)
FILE: docs/api.js
function generateExamples (line 1) | function generateExamples(endpoint, method, body = null) {
function hashString (line 41) | function hashString(str) {
function createTabs (line 51) | function createTabs(examples) {
function copyContent (line 88) | function copyContent() {
function openTab (line 111) | function openTab(evt, lang) {
FILE: packaging/sunshine.rb
class Formula (line 3) | class @PROJECT_NAME@ < Formula
method install (line 73) | def install
method post_install (line 139) | def post_install
method caveats (line 157) | def caveats
FILE: scripts/_locale.py
function x_extract (line 50) | def x_extract():
function babel_init (line 112) | def babel_init(locale_code: str):
function babel_update (line 130) | def babel_update():
function babel_compile (line 145) | def babel_compile():
FILE: scripts/update_clang_format.py
function clang_format (line 21) | def clang_format(file: str):
function main (line 26) | def main():
FILE: src/audio.cpp
type audio (line 20) | namespace audio {
function encodeThread (line 86) | void encodeThread(sample_queue_t samples, config_t config, void *chann...
function capture (line 130) | void capture(safe::mail_t mail, config_t config, void *channel_data) {
function audio_ctx_ref_t (line 253) | audio_ctx_ref_t get_audio_ctx_ref() {
function is_audio_ctx_sink_available (line 258) | bool is_audio_ctx_sink_available(const audio_ctx_t &ctx) {
function map_stream (line 271) | int map_stream(int channels, bool quality) {
function start_audio_control (line 284) | int start_audio_control(audio_ctx_t &ctx) {
function stop_audio_control (line 311) | void stop_audio_control(audio_ctx_t &ctx) {
function apply_surround_params (line 325) | void apply_surround_params(opus_stream_config_t &stream, const stream_...
FILE: src/audio.h
function namespace (line 14) | namespace audio {
FILE: src/cbs.cpp
type cbs (line 21) | namespace cbs {
function close (line 22) | void close(CodedBitstreamContext *c) {
class frag_t (line 28) | class frag_t: public CodedBitstreamFragment {
method frag_t (line 30) | frag_t(frag_t &&o) {
method frag_t (line 37) | frag_t() {
method frag_t (line 41) | frag_t &operator=(frag_t &&o) {
function write (line 57) | util::buffer_t<std::uint8_t> write(cbs::ctx_t &cbs_ctx, std::uint8_t n...
function write (line 82) | util::buffer_t<std::uint8_t> write(std::uint8_t nal, void *uh, AVCodec...
function h264_t (line 89) | h264_t make_sps_h264(const AVCodecContext *avctx, const AVPacket *pack...
function hevc_t (line 145) | hevc_t make_sps_hevc(const AVCodecContext *avctx, const AVPacket *pack...
function validate_sps (line 222) | bool validate_sps(const AVPacket *packet, int codec_id) {
FILE: src/cbs.h
type AVPacket (line 10) | struct AVPacket
type AVCodecContext (line 11) | struct AVCodecContext
function namespace (line 13) | namespace cbs {
FILE: src/config.cpp
type config (line 51) | namespace config {
type nv (line 53) | namespace nv {
function twopass_from_view (line 55) | nvenc::nvenc_two_pass twopass_from_view(const ::std::string_view &pr...
type amd (line 71) | namespace amd {
type quality_av1_e (line 122) | enum class quality_av1_e : int {
type quality_hevc_e (line 128) | enum class quality_hevc_e : int {
type quality_h264_e (line 134) | enum class quality_h264_e : int {
type rc_av1_e (line 140) | enum class rc_av1_e : int {
type rc_hevc_e (line 147) | enum class rc_hevc_e : int {
type rc_h264_e (line 154) | enum class rc_h264_e : int {
type usage_av1_e (line 161) | enum class usage_av1_e : int {
type usage_hevc_e (line 169) | enum class usage_hevc_e : int {
type usage_h264_e (line 177) | enum class usage_h264_e : int {
type coder_e (line 185) | enum coder_e : int {
function quality_from_view (line 192) | ::std::optional<int> quality_from_view(const ::std::string_view &qua...
function rc_from_view (line 204) | ::std::optional<int> rc_from_view(const ::std::string_view &rc, cons...
function usage_from_view (line 217) | ::std::optional<int> usage_from_view(const ::std::string_view &usage...
function coder_from_view (line 230) | int coder_from_view(const ::std::string_view &coder) {
type qsv (line 245) | namespace qsv {
type preset_e (line 246) | enum preset_e : int {
type cavlc_e (line 256) | enum cavlc_e : int {
function preset_from_view (line 262) | ::std::optional<int> preset_from_view(const ::std::string_view &pres...
function coder_from_view (line 277) | ::std::optional<int> coder_from_view(const ::std::string_view &coder) {
type vt (line 292) | namespace vt {
type coder_e (line 294) | enum coder_e : int {
function coder_from_view (line 300) | int coder_from_view(const ::std::string_view &coder) {
function allow_software_from_view (line 314) | int allow_software_from_view(const ::std::string_view &software) {
function force_software_from_view (line 322) | int force_software_from_view(const ::std::string_view &software) {
function rt_from_view (line 330) | int rt_from_view(const ::std::string_view &rt) {
type sw (line 340) | namespace sw {
function svtav1_preset_from_view (line 341) | int svtav1_preset_from_view(const ::std::string_view &preset) {
type dd (line 359) | namespace dd {
function config_option_from_view (line 360) | video_t::dd_t::config_option_e config_option_from_view(const ::std::...
function resolution_option_from_view (line 373) | video_t::dd_t::resolution_option_e resolution_option_from_view(const...
function refresh_rate_option_from_view (line 386) | video_t::dd_t::refresh_rate_option_e refresh_rate_option_from_view(c...
function hdr_option_from_view (line 399) | video_t::dd_t::hdr_option_e hdr_option_from_view(const ::std::string...
function mode_remapping_from_view (line 411) | video_t::dd_t::mode_remapping_t mode_remapping_from_view(const ::std...
function endline (line 606) | bool endline(char ch) {
function space_tab (line 610) | bool space_tab(char ch) {
function whitespace (line 614) | bool whitespace(char ch) {
function to_string (line 618) | std::string to_string(const char *begin, const char *end) {
function It (line 634) | It skip_list(It skipper, It end) {
function parse_config (line 691) | std::unordered_map<std::string, std::string> parse_config(const ::std:...
function string_f (line 716) | void string_f(std::unordered_map<std::string, std::string> &vars, cons...
function generic_f (line 728) | void generic_f(std::unordered_map<std::string, std::string> &vars, con...
function string_restricted_f (line 736) | void string_restricted_f(std::unordered_map<std::string, std::string> ...
function path_f (line 748) | void path_f(std::unordered_map<std::string, std::string> &vars, const ...
function path_f (line 772) | void path_f(std::unordered_map<std::string, std::string> &vars, const ...
function int_f (line 780) | void int_f(std::unordered_map<std::string, std::string> &vars, const s...
function int_f (line 804) | void int_f(std::unordered_map<std::string, std::string> &vars, const s...
function int_f (line 829) | void int_f(std::unordered_map<std::string, std::string> &vars, const s...
function int_f (line 838) | void int_f(std::unordered_map<std::string, std::string> &vars, const s...
function int_between_f (line 846) | void int_between_f(std::unordered_map<std::string, std::string> &vars,...
function to_bool (line 857) | bool to_bool(std::string &boolean) {
function bool_f (line 870) | void bool_f(std::unordered_map<std::string, std::string> &vars, const ...
function double_f (line 881) | void double_f(std::unordered_map<std::string, std::string> &vars, cons...
function double_between_f (line 899) | void double_between_f(std::unordered_map<std::string, std::string> &va...
function list_string_f (line 910) | void list_string_f(std::unordered_map<std::string, std::string> &vars,...
function list_prep_cmd_f (line 949) | void list_prep_cmd_f(std::unordered_map<std::string, std::string> &var...
function list_server_cmd_f (line 975) | void list_server_cmd_f(std::unordered_map<std::string, std::string> &v...
function list_int_f (line 1001) | void list_int_f(std::unordered_map<std::string, std::string> &vars, co...
function map_int_int_f (line 1034) | void map_int_int_f(std::unordered_map<std::string, std::string> &vars,...
function apply_flags (line 1053) | int apply_flags(const char *line) {
function apply_config (line 1090) | void apply_config(std::unordered_map<std::string, std::string> &&vars) {
function parse (line 1387) | int parse(int argc, char *argv[]) {
FILE: src/config.h
function namespace (line 18) | namespace config {
FILE: src/confighttp.cpp
type confighttp (line 49) | namespace confighttp {
type op_e (line 58) | enum class op_e {
function print_req (line 71) | void print_req(const req_https_t &request) {
function send_response (line 89) | void send_response(resp_https_t response, const nlohmann::json &output...
function send_unauthorized (line 102) | void send_unauthorized(resp_https_t response, req_https_t request) {
function send_redirect (line 124) | void send_redirect(resp_https_t response, req_https_t request, const c...
function getCookieValue (line 141) | std::string getCookieValue(const std::string& cookieString, const std:...
function checkIPOrigin (line 159) | bool checkIPOrigin(resp_https_t response, req_https_t request) {
function authenticate (line 179) | bool authenticate(resp_https_t response, req_https_t request, bool nee...
function not_found (line 220) | void not_found(resp_https_t response, [[maybe_unused]] req_https_t req...
function bad_request (line 239) | void bad_request(resp_https_t response, [[maybe_unused]] req_https_t r...
function validateContentType (line 260) | bool validateContentType(resp_https_t response, req_https_t request, c...
function getIndexPage (line 295) | void getIndexPage(resp_https_t response, req_https_t request) {
function getPinPage (line 315) | void getPinPage(resp_https_t response, req_https_t request) {
function getAppsPage (line 335) | void getAppsPage(resp_https_t response, req_https_t request) {
function getClientsPage (line 356) | void getClientsPage(resp_https_t response, req_https_t request) {
function getConfigPage (line 376) | void getConfigPage(resp_https_t response, req_https_t request) {
function getPasswordPage (line 396) | void getPasswordPage(resp_https_t response, req_https_t request) {
function getLoginPage (line 418) | void getLoginPage(resp_https_t response, req_https_t request) {
function getWelcomePage (line 441) | void getWelcomePage(resp_https_t response, req_https_t request) {
function getTroubleshootingPage (line 462) | void getTroubleshootingPage(resp_https_t response, req_https_t request) {
function getFaviconImage (line 482) | void getFaviconImage(resp_https_t response, req_https_t request) {
function getApolloLogoImage (line 501) | void getApolloLogoImage(resp_https_t response, req_https_t request) {
function isChildPath (line 518) | bool isChildPath(fs::path const &base, fs::path const &query) {
function getNodeModules (line 528) | void getNodeModules(resp_https_t response, req_https_t request) {
function getApps (line 572) | void getApps(resp_https_t response, req_https_t request) {
function saveApp (line 627) | void saveApp(resp_https_t response, req_https_t request) {
function closeApp (line 673) | void closeApp(resp_https_t response, req_https_t request) {
function reorderApps (line 693) | void reorderApps(resp_https_t response, req_https_t request) {
function deleteApp (line 807) | void deleteApp(resp_https_t response, req_https_t request) {
function getClients (line 863) | void getClients(resp_https_t response, req_https_t request) {
function updateClient (line 897) | void updateClient(resp_https_t response, req_https_t request) {
function unpair (line 950) | void unpair(resp_https_t response, req_https_t request) {
function unpairAll (line 978) | void unpairAll(resp_https_t response, req_https_t request) {
function getConfig (line 997) | void getConfig(resp_https_t response, req_https_t request) {
function getLocale (line 1025) | void getLocale(resp_https_t response, req_https_t request) {
function saveConfig (line 1049) | void saveConfig(resp_https_t response, req_https_t request) {
function uploadCover (line 1088) | void uploadCover(resp_https_t response, req_https_t request) {
function getLogs (line 1138) | void getLogs(resp_https_t response, req_https_t request) {
function savePassword (line 1175) | void savePassword(resp_https_t response, req_https_t request) {
function getOTP (line 1232) | void getOTP(resp_https_t response, req_https_t request) {
function savePin (line 1279) | void savePin(resp_https_t response, req_https_t request) {
function resetDisplayDevicePersistence (line 1308) | void resetDisplayDevicePersistence(resp_https_t response, req_https_t ...
function restart (line 1327) | void restart(resp_https_t response, req_https_t request) {
function quit (line 1347) | void quit(resp_https_t response, req_https_t request) {
function launchApp (line 1379) | void launchApp(resp_https_t response, req_https_t request) {
function disconnect (line 1435) | void disconnect(resp_https_t response, req_https_t request) {
function login (line 1469) | void login(resp_https_t response, req_https_t request) {
function start (line 1507) | void start() {
FILE: src/confighttp.h
function namespace (line 19) | namespace confighttp {
FILE: src/crypto.cpp
type crypto (line 12) | namespace crypto {
function openssl_verify_cb (line 29) | static int openssl_verify_cb(int ok, X509_STORE_CTX *ctx) {
type cipher (line 89) | namespace cipher {
function init_decrypt_gcm (line 91) | static int init_decrypt_gcm(cipher_ctx_t &ctx, aes_t *key, aes_t *iv...
function init_encrypt_gcm (line 114) | static int init_encrypt_gcm(cipher_ctx_t &ctx, aes_t *key, aes_t *iv...
function init_encrypt_cbc (line 134) | static int init_encrypt_cbc(cipher_ctx_t &ctx, aes_t *key, aes_t *iv...
function aes_t (line 320) | aes_t gen_aes_key(const std::array<uint8_t, 16> &salt, const std::stri...
function sha256_t (line 336) | sha256_t hash(const std::string_view &plaintext) {
function x509_t (line 342) | x509_t x509(const std::string_view &x) {
function pkey_t (line 353) | pkey_t pkey(const std::string_view &k) {
function pem (line 364) | std::string pem(x509_t &x509) {
function pem (line 374) | std::string pem(pkey_t &pkey) {
function signature (line 384) | std::string_view signature(const x509_t &x) {
function rand (line 393) | std::string rand(std::size_t bytes) {
function sign (line 402) | std::vector<uint8_t> sign(const pkey_t &pkey, const std::string_view &...
function creds_t (line 426) | creds_t gen_creds(const std::string_view &cn, std::uint32_t key_bits) {
function sign256 (line 469) | std::vector<uint8_t> sign256(const pkey_t &pkey, const std::string_vie...
function verify (line 473) | bool verify(const x509_t &x509, const std::string_view &data, const st...
function verify256 (line 493) | bool verify256(const x509_t &x509, const std::string_view &data, const...
function md_ctx_destroy (line 497) | void md_ctx_destroy(EVP_MD_CTX *ctx) {
function rand_alphabet (line 501) | std::string rand_alphabet(std::size_t bytes, const std::string_view &a...
FILE: src/crypto.h
function namespace (line 21) | namespace crypto {
FILE: src/display_device.cpp
type display_device (line 30) | namespace display_device {
class sunshine_audio_context_t (line 50) | class sunshine_audio_context_t: public AudioContextInterface {
method capture (line 52) | [[nodiscard]] bool capture() override {
method isCaptured (line 63) | [[nodiscard]] bool isCaptured() const override {
method release (line 75) | void release() override {
type audio_context_t (line 97) | struct audio_context_t {
function stou (line 124) | unsigned int stou(const std::string &value) {
function parse_resolution_string (line 150) | bool parse_resolution_string(const std::string &input, std::optional<R...
function parse_refresh_rate_string (line 198) | bool parse_refresh_rate_string(const std::string &input, std::optional...
function parse_device_prep_option (line 271) | std::optional<SingleDisplayConfiguration::DevicePreparation> parse_dev...
function parse_resolution_option (line 306) | bool parse_resolution_option(const config::video_t &video_config, cons...
function parse_refresh_rate_option (line 364) | bool parse_refresh_rate_option(const config::video_t &video_config, co...
function parse_hdr_option (line 411) | std::optional<HdrState> parse_hdr_option(const config::video_t &video_...
type remapping_type_e (line 427) | enum class remapping_type_e {
function determine_remapping_type (line 438) | std::optional<remapping_type_e> determine_remapping_type(const config:...
type parsed_remapping_entry_t (line 461) | struct parsed_remapping_entry_t {
function is_resolution_mapped (line 473) | bool is_resolution_mapped(const remapping_type_e type) {
function is_fps_mapped (line 482) | bool is_fps_mapped(const remapping_type_e type) {
function parse_remapping_entry (line 492) | std::optional<parsed_remapping_entry_t> parse_remapping_entry(const co...
function remap_display_mode_if_needed (line 523) | bool remap_display_mode_if_needed(const config::video_t &video_config,...
function make_settings_manager (line 615) | std::unique_ptr<SettingsManagerInterface> make_settings_manager([[mayb...
type revert_option_e (line 635) | enum class revert_option_e {
function revert_configuration_unlocked (line 645) | void revert_configuration_unlocked(const revert_option_e option) {
function init (line 704) | std::unique_ptr<platf::deinit_t> init(const std::filesystem::path &per...
function map_output_name (line 754) | std::string map_output_name(const std::string &output_name) {
function map_display_name (line 766) | std::string map_display_name(const std::string &display_name) {
function configure_display (line 783) | void configure_display(const config::video_t &video_config, const rtsp...
function configure_display (line 799) | void configure_display(const SingleDisplayConfiguration &config) {
function revert_configuration (line 816) | void revert_configuration() {
function reset_persistence (line 821) | bool reset_persistence() {
function EnumeratedDeviceList (line 836) | EnumeratedDeviceList enumerate_devices() {
function parse_configuration (line 848) | std::variant<failed_to_parse_tag_t, configuration_disabled_tag_t, Sing...
FILE: src/display_device.h
function namespace (line 15) | namespace platf {
function namespace (line 19) | namespace config {
function namespace (line 23) | namespace rtsp_stream {
function namespace (line 27) | namespace display_device {
FILE: src/entry_handler.cpp
function launch_ui (line 29) | void launch_ui(const std::optional<std::string> &path) {
type args (line 37) | namespace args {
function creds (line 38) | int creds(const char *name, int argc, char *argv[]) {
function help (line 48) | int help(const char *name) {
function version (line 53) | int version() {
function restore_nvprefs_undo (line 59) | int restore_nvprefs_undo() {
type lifetime (line 69) | namespace lifetime {
function exit_sunshine (line 73) | void exit_sunshine(int exit_code, bool async) {
function debug_trap (line 88) | void debug_trap() {
function log_publisher_data (line 103) | void log_publisher_data() {
function is_gamestream_enabled (line 110) | bool is_gamestream_enabled() {
type service_ctrl (line 125) | namespace service_ctrl {
class service_controller (line 126) | class service_controller {
method service_controller (line 132) | service_controller(DWORD service_desired_access) {
method start_service (line 161) | bool start_service() {
method query_service_status (line 181) | bool query_service_status(SERVICE_STATUS &status) {
function is_service_running (line 200) | bool is_service_running() {
function start_service (line 211) | bool start_service() {
function wait_for_ui_ready (line 236) | bool wait_for_ui_ready() {
FILE: src/entry_handler.h
function namespace (line 28) | namespace args {
function namespace (line 74) | namespace lifetime {
function namespace (line 111) | namespace service_ctrl {
FILE: src/file_handler.cpp
type file_handler (line 14) | namespace file_handler {
function get_parent_directory (line 15) | std::string get_parent_directory(const std::string &path) {
function make_directory (line 26) | bool make_directory(const std::string &path) {
function read_file (line 35) | std::string read_file(const char *path) {
function write_file (line 45) | int write_file(const char *path, const std::string_view &contents) {
FILE: src/file_handler.h
function namespace (line 13) | namespace file_handler {
FILE: src/globals.h
function namespace (line 34) | namespace mail {
FILE: src/httpcommon.cpp
type http (line 35) | namespace http {
function init (line 47) | int init() {
function save_user_creds (line 71) | int save_user_creds(const std::string &file, const std::string &userna...
function user_creds_exist (line 100) | bool user_creds_exist(const std::string &file) {
function reload_user_creds (line 118) | int reload_user_creds(const std::string &file) {
function create_creds (line 132) | int create_creds(const std::string &pkey, const std::string &cert) {
function download_file (line 183) | bool download_file(const std::string &url, const std::string &file, lo...
function url_escape (line 221) | std::string url_escape(const std::string &url) {
function url_get_host (line 228) | std::string url_get_host(const std::string &url) {
FILE: src/httpcommon.h
function namespace (line 15) | namespace http {
FILE: src/input.cpp
type input (line 38) | namespace input {
type button_state_e (line 54) | enum class button_state_e {
function alloc_id (line 61) | int alloc_id(std::bitset<N> &gamepad_mask) {
function free_id (line 73) | void free_id(std::bitset<N> &gamepad_mask, int id) {
function key_press_id_t (line 79) | key_press_id_t make_kpid(uint16_t vk, uint8_t flags) {
function vk_from_kpid (line 83) | uint16_t vk_from_kpid(key_press_id_t kpid) {
function flags_from_kpid (line 87) | uint8_t flags_from_kpid(key_press_id_t kpid) {
function from_netfloat (line 96) | float from_netfloat(netfloat f) {
function from_clamped_netfloat (line 107) | float from_clamped_netfloat(netfloat f, float min, float max) {
function free_gamepad (line 118) | void free_gamepad(platf::input_t &platf_input, int id) {
type gamepad_t (line 125) | struct gamepad_t {
method gamepad_t (line 126) | gamepad_t():
type input_t (line 155) | struct input_t {
type shortkey_e (line 156) | enum shortkey_e {
method input_t (line 163) | input_t(
function apply_shortcut (line 203) | inline int apply_shortcut(short keyCode) {
function print (line 223) | void print(PNV_REL_MOUSE_MOVE_PACKET packet) {
function print (line 231) | void print(PNV_ABS_MOUSE_MOVE_PACKET packet) {
function print (line 241) | void print(PNV_MOUSE_BUTTON_PACKET packet) {
function print (line 249) | void print(PNV_SCROLL_PACKET packet) {
function print (line 256) | void print(PSS_HSCROLL_PACKET packet) {
function print (line 263) | void print(PNV_KEYBOARD_PACKET packet) {
function print (line 273) | void print(PNV_UNICODE_PACKET packet) {
function print (line 281) | void print(PNV_MULTI_CONTROLLER_PACKET packet) {
function print (line 301) | void print(PSS_TOUCH_PACKET packet) {
function print (line 319) | void print(PSS_PEN_PACKET packet) {
function print (line 339) | void print(PSS_CONTROLLER_ARRIVAL_PACKET packet) {
function print (line 353) | void print(PSS_CONTROLLER_TOUCH_PACKET packet) {
function print (line 369) | void print(PSS_CONTROLLER_MOTION_PACKET packet) {
function print (line 384) | void print(PSS_CONTROLLER_BATTERY_PACKET packet) {
function print (line 393) | void print(void *payload) {
function passthrough (line 444) | void passthrough(std::shared_ptr<input_t> &input, PNV_REL_MOUSE_MOVE_P...
function client_to_touchport (line 460) | std::optional<std::pair<float, float>> client_to_touchport(std::shared...
function multiply_polar_by_cartesian_scalar (line 493) | float multiply_polar_by_cartesian_scalar(float r, float angle, const s...
function scale_client_contact_area (line 506) | std::pair<float, float> scale_client_contact_area(const std::pair<floa...
function passthrough (line 519) | void passthrough(std::shared_ptr<input_t> &input, PNV_ABS_MOUSE_MOVE_P...
function passthrough (line 558) | void passthrough(std::shared_ptr<input_t> &input, PNV_MOUSE_BUTTON_PAC...
function map_keycode (line 619) | short map_keycode(short keycode) {
function update_shortcutFlags (line 631) | inline void update_shortcutFlags(int *flags, short keyCode, bool relea...
function is_modifier (line 663) | bool is_modifier(uint16_t keyCode) {
function send_key_and_modifiers (line 680) | void send_key_and_modifiers(uint16_t key_code, bool release, uint8_t f...
function repeat_key (line 710) | void repeat_key(uint16_t key_code, uint8_t flags, uint8_t synthetic_mo...
function passthrough (line 722) | void passthrough(std::shared_ptr<input_t> &input, PNV_KEYBOARD_PACKET ...
function passthrough (line 782) | void passthrough(std::shared_ptr<input_t> &input, PNV_SCROLL_PACKET pa...
function passthrough (line 805) | void passthrough(std::shared_ptr<input_t> &input, PSS_HSCROLL_PACKET p...
function passthrough (line 823) | void passthrough(PNV_UNICODE_PACKET packet) {
function passthrough (line 837) | void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_ARRIV...
function passthrough (line 877) | void passthrough(std::shared_ptr<input_t> &input, PSS_TOUCH_PACKET pac...
function passthrough (line 933) | void passthrough(std::shared_ptr<input_t> &input, PSS_PEN_PACKET packe...
function passthrough (line 991) | void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_TOUCH...
function passthrough (line 1024) | void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_MOTIO...
function passthrough (line 1056) | void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_BATTE...
function passthrough (line 1081) | void passthrough(std::shared_ptr<input_t> &input, PNV_MULTI_CONTROLLER...
type batch_result_e (line 1196) | enum class batch_result_e {
function batch_result_e (line 1208) | batch_result_e batch(PNV_REL_MOUSE_MOVE_PACKET dest, PNV_REL_MOUSE_MOV...
function batch_result_e (line 1231) | batch_result_e batch(PNV_ABS_MOUSE_MOVE_PACKET dest, PNV_ABS_MOUSE_MOV...
function batch_result_e (line 1248) | batch_result_e batch(PNV_SCROLL_PACKET dest, PNV_SCROLL_PACKET src) {
function batch_result_e (line 1268) | batch_result_e batch(PSS_HSCROLL_PACKET dest, PSS_HSCROLL_PACKET src) {
function batch_result_e (line 1287) | batch_result_e batch(PNV_MULTI_CONTROLLER_PACKET dest, PNV_MULTI_CONTR...
function batch_result_e (line 1315) | batch_result_e batch(PSS_TOUCH_PACKET dest, PSS_TOUCH_PACKET src) {
function batch_result_e (line 1349) | batch_result_e batch(PSS_PEN_PACKET dest, PSS_PEN_PACKET src) {
function batch_result_e (line 1382) | batch_result_e batch(PSS_CONTROLLER_TOUCH_PACKET dest, PSS_CONTROLLER_...
function batch_result_e (line 1422) | batch_result_e batch(PSS_CONTROLLER_MOTION_PACKET dest, PSS_CONTROLLER...
function batch_result_e (line 1445) | batch_result_e batch(PNV_INPUT_HEADER dest, PNV_INPUT_HEADER src) {
function passthrough_next_message (line 1481) | void passthrough_next_message(std::shared_ptr<input_t> input) {
function passthrough (line 1579) | void passthrough(std::shared_ptr<input_t> &input, std::vector<std::uin...
function reset (line 1646) | void reset(std::shared_ptr<input_t> &input) {
class deinit_t (line 1670) | class deinit_t: public platf::deinit_t {
function init (line 1677) | [[nodiscard]] std::unique_ptr<platf::deinit_t> init() {
function probe_gamepads (line 1683) | bool probe_gamepads() {
function alloc (line 1694) | std::shared_ptr<input_t> alloc(safe::mail_t mail) {
FILE: src/input.h
function namespace (line 15) | namespace input {
FILE: src/logging.cpp
function init (line 150) | [[nodiscard]] std::unique_ptr<deinit_t> init(int min_log_level, const st...
function setup_av_logging (line 201) | void setup_av_logging(int min_log_level) {
function setup_libdisplaydevice_logging (line 229) | void setup_libdisplaydevice_logging(int min_log_level) {
function log_flush (line 260) | void log_flush() {
function print_help (line 266) | void print_help(const char *name) {
function bracket (line 286) | std::string bracket(const std::string &input) {
function bracket (line 290) | std::wstring bracket(const std::wstring &input) {
FILE: src/logging.h
function namespace (line 29) | namespace logging {
FILE: src/main.cpp
function on_signal_forwarder (line 41) | void on_signal_forwarder(int sig) {
function on_signal (line 46) | void on_signal(int sig, FN &&fn) {
function LRESULT (line 70) | LRESULT CALLBACK SessionMonitorWindowProc(HWND hwnd, UINT uMsg, WPARAM w...
function WINAPI (line 90) | WINAPI BOOL ConsoleCtrlHandler(DWORD type) {
function mainThreadLoop (line 105) | void mainThreadLoop(const std::shared_ptr<safe::event_t<bool>> &shutdown...
function main (line 138) | int main(int argc, char *argv[]) {
FILE: src/move_by_copy.h
function namespace (line 13) | namespace move_by_copy_util {
FILE: src/network.cpp
type net (line 19) | namespace net {
function net_e (line 39) | net_e from_enum_string(const std::string_view &view) {
function net_e (line 50) | net_e from_address(const std::string_view &view) {
function to_enum_string (line 82) | std::string_view to_enum_string(net_e net) {
function af_e (line 96) | af_e af_from_enum_string(const std::string_view &view) {
function af_to_any_address_string (line 108) | std::string_view af_to_any_address_string(af_e af) {
function normalize_address (line 120) | boost::asio::ip::address normalize_address(boost::asio::ip::address ad...
function addr_to_normalized_string (line 132) | std::string addr_to_normalized_string(boost::asio::ip::address address) {
function addr_to_url_escaped_string (line 136) | std::string addr_to_url_escaped_string(boost::asio::ip::address addres...
function encryption_mode_for_address (line 147) | int encryption_mode_for_address(boost::asio::ip::address address) {
function host_t (line 156) | host_t host_create(af_e af, ENetAddress &addr, std::uint16_t port) {
function free_host (line 175) | void free_host(ENetHost *host) {
function map_port (line 187) | std::uint16_t map_port(int port) {
function mdns_instance_name (line 204) | std::string mdns_instance_name(const std::string_view &hostname) {
FILE: src/network.h
function namespace (line 18) | namespace net {
FILE: src/nvenc/nvenc_base.cpp
function GUID (line 29) | GUID quality_preset_guid_from_number(unsigned number) {
function equal_guids (line 59) | bool equal_guids(const GUID &guid1, const GUID &guid2) {
function quality_preset_string_from_guid (line 63) | auto quality_preset_string_from_guid(const GUID &guid) {
type nvenc (line 90) | namespace nvenc {
function nvenc_encoded_frame (line 490) | nvenc_encoded_frame nvenc_base::encode_frame(uint64_t frame_index, boo...
FILE: src/nvenc/nvenc_base.h
function namespace (line 20) | namespace nvenc {
FILE: src/nvenc/nvenc_colorspace.h
function namespace (line 10) | namespace nvenc {
FILE: src/nvenc/nvenc_config.h
function namespace (line 7) | namespace nvenc {
FILE: src/nvenc/nvenc_d3d11.cpp
type nvenc (line 11) | namespace nvenc {
FILE: src/nvenc/nvenc_d3d11.h
function namespace (line 15) | namespace nvenc {
FILE: src/nvenc/nvenc_d3d11_native.cpp
type nvenc (line 12) | namespace nvenc {
function ID3D11Texture2D (line 26) | ID3D11Texture2D *
FILE: src/nvenc/nvenc_d3d11_native.h
function namespace (line 14) | namespace nvenc {
FILE: src/nvenc/nvenc_d3d11_on_cuda.cpp
type nvenc (line 12) | namespace nvenc {
function ID3D11Texture2D (line 55) | ID3D11Texture2D *nvenc_d3d11_on_cuda::get_input_texture() {
FILE: src/nvenc/nvenc_d3d11_on_cuda.h
function namespace (line 13) | namespace nvenc {
FILE: src/nvenc/nvenc_encoded_frame.h
function namespace (line 11) | namespace nvenc {
FILE: src/nvenc/nvenc_utils.cpp
type nvenc (line 11) | namespace nvenc {
function DXGI_FORMAT (line 14) | DXGI_FORMAT dxgi_format_from_nvenc_format(NV_ENC_BUFFER_FORMAT format) {
function NV_ENC_BUFFER_FORMAT (line 34) | NV_ENC_BUFFER_FORMAT nvenc_format_from_sunshine_format(platf::pix_fmt_...
function nvenc_colorspace_t (line 53) | nvenc_colorspace_t nvenc_colorspace_from_sunshine_colorspace(const vid...
FILE: src/nvenc/nvenc_utils.h
function namespace (line 20) | namespace nvenc {
FILE: src/nvhttp.cpp
type nvhttp (line 48) | namespace nvhttp {
type client_t (line 56) | struct client_t {
type pair_session_t (line 60) | struct pair_session_t
class SunshineHTTPSServer (line 68) | class SunshineHTTPSServer: public SimpleWeb::ServerBase<SunshineHTTPS> {
method SunshineHTTPSServer (line 70) | SunshineHTTPSServer(const std::string &certification_file, const std...
method after_bind (line 86) | void after_bind() override {
method accept (line 97) | void accept() override {
type conf_intern_t (line 144) | struct conf_intern_t {
type op_e (line 159) | enum class op_e {
function get_arg (line 164) | std::string get_arg(const args_t &args, const char *name, const char *...
function cmd_list_t (line 177) | cmd_list_t extract_command_entries(const nlohmann::json& j, const std:...
function save_state (line 206) | void save_state() {
function load_state (line 289) | void load_state() {
function add_authorized_client (line 368) | void add_authorized_client(const p_named_cert_t& named_cert_p) {
function make_launch_session (line 382) | std::shared_ptr<rtsp_stream::launch_session_t> make_launch_session(boo...
function remove_session (line 473) | void remove_session(const pair_session_t &sess) {
function fail_pair (line 477) | void fail_pair(pair_session_t &sess, pt::ptree &tree, const std::strin...
function getservercert (line 485) | void getservercert(pair_session_t &sess, pt::ptree &tree, const std::s...
function clientchallenge (line 509) | void clientchallenge(pair_session_t &sess, pt::ptree &tree, const std:...
function serverchallengeresp (line 552) | void serverchallengeresp(pair_session_t &sess, pt::ptree &tree, const ...
function clientpairingsecret (line 581) | void clientpairingsecret(pair_session_t &sess, pt::ptree &tree, const ...
type tunnel (line 653) | struct tunnel
type tunnel<SunshineHTTPS> (line 656) | struct tunnel<SunshineHTTPS> {
type tunnel<SimpleWeb::HTTP> (line 661) | struct tunnel<SimpleWeb::HTTP> {
function print_req (line 670) | void print_req(std::shared_ptr<typename SimpleWeb::ServerBase<T>::Requ...
function not_found (line 690) | void not_found(std::shared_ptr<typename SimpleWeb::ServerBase<T>::Resp...
function pair (line 704) | void pair(std::shared_ptr<typename SimpleWeb::ServerBase<T>::Response>...
function pin (line 831) | bool pin(std::string pin, std::string name) {
function serverinfo (line 883) | void serverinfo(std::shared_ptr<typename SimpleWeb::ServerBase<T>::Res...
function get_all_clients (line 1015) | nlohmann::json get_all_clients() {
function applist (line 1069) | void applist(resp_https_t response, req_https_t request) {
function launch (line 1151) | void launch(bool &host_audio, resp_https_t response, req_https_t reque...
function resume (line 1348) | void resume(bool &host_audio, resp_https_t response, req_https_t reque...
function cancel (line 1459) | void cancel(resp_https_t response, req_https_t request) {
function appasset (line 1495) | void appasset(resp_https_t response, req_https_t request) {
function getClipboard (line 1526) | void getClipboard(resp_https_t response, req_https_t request) {
function setClipboard (line 1573) | void
function setup (line 1631) | void setup(const std::string &pkey, const std::string &cert) {
function start (line 1636) | void start() {
function request_otp (line 1773) | std::string request_otp(const std::string& passphrase, const std::stri...
function erase_all_clients (line 1786) | void
function stop_session (line 1795) | void stop_session(stream::session_t& session, bool graceful) {
function find_and_stop_session (line 1803) | bool find_and_stop_session(const std::string& uuid, bool graceful) {
function update_session_info (line 1812) | void update_session_info(stream::session_t& session, const std::string...
function find_and_udpate_session_info (line 1816) | bool find_and_udpate_session_info(const std::string& uuid, const std::...
function update_device_info (line 1825) | bool update_device_info(
function unpair_client (line 1859) | bool unpair_client(const std::string_view uuid) {
FILE: src/nvhttp.h
function namespace (line 28) | namespace nvhttp {
FILE: src/platform/common.h
type sockaddr (line 36) | struct sockaddr
type AVFrame (line 37) | struct AVFrame
type AVBufferRef (line 38) | struct AVBufferRef
type AVHWFramesContext (line 39) | struct AVHWFramesContext
type AVCodecContext (line 40) | struct AVCodecContext
type AVDictionary (line 41) | struct AVDictionary
function namespace (line 46) | namespace boost {
function namespace (line 66) | namespace video {
function namespace (line 70) | namespace nvenc {
function namespace (line 74) | namespace platf {
type speaker_e (line 195) | enum speaker_e {
type class (line 231) | enum class
type class (line 240) | enum class
function std (line 251) | inline std::string_view from_pix_fmt(pix_fmt_e pix_fmt) {
type touch_port_t (line 272) | struct touch_port_t {
function namespace (line 278) | namespace platform_caps {
type gamepad_state_t (line 285) | struct gamepad_state_t {
type gamepad_id_t (line 295) | struct gamepad_id_t {
type gamepad_arrival_t (line 306) | struct gamepad_arrival_t {
type gamepad_touch_t (line 312) | struct gamepad_touch_t {
type gamepad_motion_t (line 321) | struct gamepad_motion_t {
type gamepad_battery_t (line 332) | struct gamepad_battery_t {
type touch_input_t (line 338) | struct touch_input_t {
type pen_input_t (line 349) | struct pen_input_t {
function class (line 362) | class deinit_t {
function img_t (line 367) | struct img_t: std::enable_shared_from_this<img_t> {
type sink_t (line 387) | struct sink_t {
type encode_device_t (line 402) | struct encode_device_t {
function encode_device_t (line 410) | struct avcodec_encode_device_t: encode_device_t {
function encode_device_t (line 451) | struct nvenc_encode_device_t: encode_device_t {
function capture_e (line 457) | enum class capture_e : int {
type send_info_t (line 699) | struct send_info_t {
function qos_data_type_e (line 713) | enum class qos_data_type_e : int {
FILE: src/platform/linux/audio.cpp
type platf (line 22) | namespace platf {
function to_string (line 36) | std::string to_string(const char *name, const std::uint8_t *mapping, i...
type mic_attr_t (line 53) | struct mic_attr_t: public mic_t {
method capture_e (line 56) | capture_e sample(std::vector<float> &sample_buf) override {
function microphone (line 71) | std::unique_ptr<mic_t> microphone(const std::uint8_t *mapping, int cha...
type pa (line 105) | namespace pa {
type add_const_helper (line 107) | struct add_const_helper
type add_const_helper<true, T> (line 110) | struct add_const_helper<true, T> {
type add_const_helper<false, T> (line 115) | struct add_const_helper<false, T> {
function pa_free (line 123) | void pa_free(T *p) {
function cb (line 136) | void cb(ctx_t::pointer ctx, add_const_t<T> i, void *userdata) {
function cb (line 148) | void cb(ctx_t::pointer ctx, add_const_t<T> i, int eol, void *userdat...
function cb_i (line 159) | void cb_i(ctx_t::pointer ctx, std::uint32_t i, void *userdata) {
function ctx_state_cb (line 165) | void ctx_state_cb(ctx_t::pointer ctx, void *userdata) {
function success_cb (line 171) | void success_cb(ctx_t::pointer ctx, int status, void *userdata) {
class server_t (line 178) | class server_t: public audio_control_t {
type ctx_event_e (line 179) | enum ctx_event_e : int {
method init (line 201) | int init() {
method load_null (line 257) | int load_null(const char *name, const std::uint8_t *channel_mappin...
method unload_null (line 274) | int unload_null(std::uint32_t i) {
method sink_info (line 295) | std::optional<sink_t> sink_info() override {
method get_default_sink_name (line 390) | std::string get_default_sink_name() {
method get_monitor_name (line 412) | std::string get_monitor_name(const std::string &sink_name) {
method microphone (line 443) | std::unique_ptr<mic_t> microphone(const std::uint8_t *mapping, int...
method is_sink_available (line 462) | bool is_sink_available(const std::string &sink) override {
method set_sink (line 467) | int set_sink(const std::string &sink) override {
function audio_control (line 516) | std::unique_ptr<audio_control_t> audio_control() {
FILE: src/platform/linux/cuda.cpp
type cuda (line 43) | namespace cuda {
function pass_error (line 47) | void pass_error(const std::string_view &sv, const char *name, const ch...
function cff (line 51) | void cff(CudaFunctions *cf) {
function check (line 59) | inline static int check(CUresult result, const std::string_view &sv) {
function freeStream (line 74) | void freeStream(CUstream stream) {
function unregisterResource (line 78) | void unregisterResource(CUgraphicsResource resource) {
class img_t (line 84) | class img_t: public platf::img_t {
function init (line 89) | int init() {
class cuda_t (line 102) | class cuda_t: public platf::avcodec_encode_device_t {
method init (line 104) | int init(int in_width, int in_height) {
method set_frame (line 118) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override {
method apply_colorspace (line 156) | void apply_colorspace() override {
method cudaTextureObject_t (line 184) | cudaTextureObject_t tex_obj(const tex_t &tex) const {
class cuda_ram_t (line 199) | class cuda_ram_t: public cuda_t {
method convert (line 201) | int convert(platf::img_t &img) override {
method set_frame (line 205) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override {
class cuda_vram_t (line 223) | class cuda_vram_t: public cuda_t {
method convert (line 225) | int convert(platf::img_t &img) override {
function file_t (line 235) | file_t open_drm_fd_for_cuda_device(int index) {
class gl_cuda_vram_t (line 276) | class gl_cuda_vram_t: public platf::avcodec_encode_device_t {
method init (line 286) | int init(int in_width, int in_height, int offset_x, int offset_y) {
method set_frame (line 333) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx_buf) overri...
method convert (line 380) | int convert(platf::img_t &img) override {
method apply_colorspace (line 433) | void apply_colorspace() override {
function make_avcodec_encode_device (line 461) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_de...
function make_avcodec_gl_encode_device (line 489) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_gl_encode...
type nvfbc (line 503) | namespace nvfbc {
function NVFBC_BOOL (line 507) | static constexpr inline NVFBC_BOOL nv_bool(bool b) {
function init (line 513) | int init() {
class ctx_t (line 551) | class ctx_t {
method ctx_t (line 553) | ctx_t(NVFBC_SESSION_HANDLE handle) {
class handle_t (line 573) | class handle_t {
type flag_e (line 574) | enum flag_e {
method handle_t (line 581) | handle_t() = default;
method handle_t (line 583) | handle_t(handle_t &&other):
method handle_t (line 589) | handle_t &operator=(handle_t &&other) {
method make (line 596) | static std::optional<handle_t> make() {
method status (line 622) | std::optional<NVFBC_GET_STATUS_PARAMS> status() {
method capture (line 635) | int capture(NVFBC_CREATE_CAPTURE_SESSION_PARAMS &capture_params) {
method stop (line 655) | int stop() {
method reset (line 673) | int reset() {
class display_t (line 701) | class display_t: public platf::display_t {
method init (line 703) | int init(const std::string_view &display_name, const ::video::conf...
method capture (line 764) | platf::capture_e capture(const push_captured_image_cb_t &push_capt...
method reinit (line 824) | platf::capture_e reinit(bool cursor) {
method snapshot (line 892) | platf::capture_e snapshot(const pull_free_image_cb_t &pull_free_im...
method make_avcodec_encode_device (line 932) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encod...
method alloc_img (line 936) | std::shared_ptr<platf::img_t> alloc_img() override {
method dummy_img (line 955) | int dummy_img(platf::img_t *) override {
type platf (line 969) | namespace platf {
function nvfbc_display (line 970) | std::shared_ptr<display_t> nvfbc_display(mem_type_e hwdevice_type, con...
function nvfbc_display_names (line 985) | std::vector<std::string> nvfbc_display_names() {
FILE: src/platform/linux/cuda.h
function namespace (line 18) | namespace platf {
function namespace (line 23) | namespace cuda {
type cudaArray (line 44) | struct cudaArray
type CUstream_st (line 47) | struct CUstream_st
type cudaTextureObject_t (line 48) | typedef unsigned long long cudaTextureObject_t;
type struct (line 50) | typedef __location__(device_builtin) struct
function namespace (line 54) | namespace cuda {
FILE: src/platform/linux/graphics.cpp
type gl (line 32) | namespace gl {
function drain_errors (line 35) | void drain_errors(const std::string_view &prefix) {
function tex_t (line 48) | tex_t tex_t::make(std::size_t count) {
function frame_buf_t (line 73) | frame_buf_t frame_buf_t::make(std::size_t count) {
function GLuint (line 122) | GLuint shader_t::handle() const {
function buffer_t (line 126) | buffer_t buffer_t::make(util::buffer_t<GLint> &&offsets, const char *b...
function GLuint (line 139) | GLuint buffer_t::handle() const {
function GLuint (line 260) | GLuint program_t::handle() const {
type gbm (line 266) | namespace gbm {
function init (line 270) | int init() {
type egl (line 299) | namespace egl {
function fail (line 323) | bool fail() {
function display_t (line 330) | display_t make_display(std::variant<gbm::gbm_t::pointer, wl_display *,...
function make_ctx (line 395) | std::optional<ctx_t> make_ctx(display_t::pointer display) {
type plane_attr_t (line 447) | struct plane_attr_t {
function plane_attr_t (line 455) | inline plane_attr_t get_plane(std::uint32_t plane_indice) {
function surface_descriptor_to_egl_attribs (line 500) | std::vector<EGLAttrib> surface_descriptor_to_egl_attribs(const surface...
function import_source (line 537) | std::optional<rgb_t> import_source(display_t::pointer egl_display, con...
function rgb_t (line 567) | rgb_t create_blank(platf::img_t &img) {
function import_target (line 591) | std::optional<nv12_t> import_target(display_t::pointer egl_display, st...
function create_target (line 646) | std::optional<nv12_t> create_target(int width, int height, AVPixelForm...
function free_frame (line 992) | void free_frame(AVFrame *frame) {
FILE: src/platform/linux/graphics.h
type _XDisplay (line 30) | struct _XDisplay
type AVFrame (line 32) | struct AVFrame
function namespace (line 37) | namespace gl {
function class (line 53) | class frame_buf_t: public util::buffer_t<GLuint> {
function class (line 100) | class shader_t {
function class (line 118) | class buffer_t {
function namespace (line 168) | namespace gbm {
function namespace (line 182) | namespace egl {
FILE: src/platform/linux/input/inputtino.cpp
type platf (line 22) | namespace platf {
function input_t (line 24) | input_t input() {
function allocate_client_input_context (line 28) | std::unique_ptr<client_input_t> allocate_client_input_context(input_t ...
function freeInput (line 32) | void freeInput(void *p) {
function move_mouse (line 37) | void move_mouse(input_t &input, int deltaX, int deltaY) {
function abs_mouse (line 42) | void abs_mouse(input_t &input, const touch_port_t &touch_port, float x...
function button_mouse (line 47) | void button_mouse(input_t &input, int button, bool release) {
function scroll (line 52) | void scroll(input_t &input, int high_res_distance) {
function hscroll (line 57) | void hscroll(input_t &input, int high_res_distance) {
function keyboard_update (line 62) | void keyboard_update(input_t &input, uint16_t modcode, bool release, u...
function unicode (line 67) | void unicode(input_t &input, char *utf8, int size) {
function touch_update (line 72) | void touch_update(client_input_t *input, const touch_port_t &touch_por...
function pen_update (line 77) | void pen_update(client_input_t *input, const touch_port_t &touch_port,...
function alloc_gamepad (line 82) | int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepa...
function free_gamepad (line 87) | void free_gamepad(input_t &input, int nr) {
function gamepad_update (line 92) | void gamepad_update(input_t &input, int nr, const gamepad_state_t &gam...
function gamepad_touch (line 97) | void gamepad_touch(input_t &input, const gamepad_touch_t &touch) {
function gamepad_motion (line 102) | void gamepad_motion(input_t &input, const gamepad_motion_t &motion) {
function gamepad_battery (line 107) | void gamepad_battery(input_t &input, const gamepad_battery_t &battery) {
function get_capabilities (line 112) | platform_caps::caps_t get_capabilities() {
function get_mouse_loc (line 125) | util::point_t get_mouse_loc(input_t &input) {
FILE: src/platform/linux/input/inputtino_common.h
function namespace (line 20) | namespace platf {
function client_input_t (line 66) | struct client_input_raw_t: public client_input_t {
function deg2rad (line 99) | inline float deg2rad(float degree) {
FILE: src/platform/linux/input/inputtino_gamepad.cpp
type platf::gamepad (line 20) | namespace platf::gamepad {
type GamepadStatus (line 22) | enum GamepadStatus {
function create_xbox_one (line 29) | auto create_xbox_one() {
function create_switch (line 37) | auto create_switch() {
function create_ds5 (line 45) | auto create_ds5(int globalIndex) {
function alloc (line 56) | int alloc(input_raw_t *raw, const gamepad_id_t &id, const gamepad_arri...
function free (line 182) | void free(input_raw_t *raw, int nr) {
function update (line 188) | void update(input_raw_t *raw, int nr, const gamepad_state_t &gamepad_s...
function touch (line 203) | void touch(input_raw_t *raw, const gamepad_touch_t &touch) {
function motion (line 218) | void motion(input_raw_t *raw, const gamepad_motion_t &motion) {
function battery (line 236) | void battery(input_raw_t *raw, const gamepad_battery_t &battery) {
FILE: src/platform/linux/input/inputtino_gamepad.h
function namespace (line 18) | namespace platf::gamepad {
FILE: src/platform/linux/input/inputtino_keyboard.cpp
type platf::keyboard (line 20) | namespace platf::keyboard {
function to_hex (line 29) | std::string to_hex(const std::basic_string<char32_t> &str) {
function update (line 151) | void update(input_raw_t *raw, uint16_t modcode, bool release, uint8_t ...
function unicode (line 161) | void unicode(input_raw_t *raw, char *utf8, int size) {
FILE: src/platform/linux/input/inputtino_keyboard.h
function namespace (line 17) | namespace platf::keyboard {
FILE: src/platform/linux/input/inputtino_mouse.cpp
type platf::mouse (line 20) | namespace platf::mouse {
function move (line 22) | void move(input_raw_t *raw, int deltaX, int deltaY) {
function move_abs (line 28) | void move_abs(input_raw_t *raw, const touch_port_t &touch_port, float ...
function button (line 34) | void button(input_raw_t *raw, int button, bool release) {
function scroll (line 65) | void scroll(input_raw_t *raw, int high_res_distance) {
function hscroll (line 71) | void hscroll(input_raw_t *raw, int high_res_distance) {
function get_location (line 77) | util::point_t get_location(input_raw_t *raw) {
FILE: src/platform/linux/input/inputtino_mouse.h
function namespace (line 17) | namespace platf::mouse {
FILE: src/platform/linux/input/inputtino_pen.cpp
type platf::pen (line 20) | namespace platf::pen {
function update (line 21) | void update(client_input_raw_t *raw, const touch_port_t &touch_port, c...
FILE: src/platform/linux/input/inputtino_pen.h
function namespace (line 18) | namespace platf::pen {
FILE: src/platform/linux/input/inputtino_touch.cpp
type platf::touch (line 20) | namespace platf::touch {
function update (line 21) | void update(client_input_raw_t *raw, const touch_port_t &touch_port, c...
FILE: src/platform/linux/input/inputtino_touch.h
function namespace (line 18) | namespace platf::touch {
FILE: src/platform/linux/kmsgrab.cpp
type platf (line 35) | namespace platf {
type kms (line 37) | namespace kms {
class cap_sys_admin (line 39) | class cap_sys_admin {
method cap_sys_admin (line 41) | cap_sys_admin() {
class wrapper_fb (line 61) | class wrapper_fb {
method wrapper_fb (line 63) | wrapper_fb(drmModeFB *fb):
method wrapper_fb (line 77) | wrapper_fb(drmModeFB2 *fb2):
function plane_type (line 126) | std::string_view plane_type(std::uint64_t val) {
type connector_t (line 139) | struct connector_t {
type monitor_t (line 155) | struct monitor_t {
type card_descriptor_t (line 166) | struct card_descriptor_t {
function from_view (line 174) | static std::uint32_t from_view(const std::string_view &string) {
class plane_it_t (line 231) | class plane_it_t: public round_robin_util::it_wrap_t<plane_t::elemen...
method plane_it_t (line 233) | plane_it_t(int fd, std::uint32_t *plane_p, std::uint32_t *end):
method plane_it_t (line 240) | plane_it_t(int fd, std::uint32_t *end):
method load_next_valid_plane (line 246) | void load_next_valid_plane() {
method inc (line 261) | void inc() {
method eq (line 266) | bool eq(const plane_it_t &other) const {
method get (line 270) | plane_t::pointer get() {
type cursor_t (line 281) | struct cursor_t {
class card_t (line 295) | class card_t {
method init (line 299) | int init(const char *path) {
method fb_t (line 354) | fb_t fb(plane_t::pointer plane) {
method crtc_t (line 370) | crtc_t crtc(std::uint32_t id) {
method encoder_t (line 374) | encoder_t encoder(std::uint32_t id) {
method res_t (line 378) | res_t res() {
method is_nvidia (line 382) | bool is_nvidia() {
method is_cursor (line 387) | bool is_cursor(std::uint32_t plane_id) {
method prop_value_by_name (line 402) | std::optional<std::uint64_t> prop_value_by_name(const std::vector<...
method get_panel_orientation (line 411) | std::uint32_t get_panel_orientation(std::uint32_t plane_id) {
method get_crtc_index_by_id (line 422) | int get_crtc_index_by_id(std::uint32_t crtc_id) {
method connector_interal_t (line 432) | connector_interal_t connector(std::uint32_t id) {
method monitors (line 436) | std::vector<connector_t> monitors(conn_type_count_t &conn_type_cou...
method file_t (line 470) | file_t handleFD(std::uint32_t handle) {
method props (line 481) | std::vector<std::pair<prop_t, std::uint64_t>> props(std::uint32_t ...
method plane_props (line 497) | std::vector<std::pair<prop_t, std::uint64_t>> plane_props(std::uin...
method crtc_props (line 501) | std::vector<std::pair<prop_t, std::uint64_t>> crtc_props(std::uint...
method connector_props (line 505) | std::vector<std::pair<prop_t, std::uint64_t>> connector_props(std:...
method plane_t (line 509) | plane_t operator[](std::uint32_t index) {
method count (line 513) | std::uint32_t count() {
method plane_it_t (line 517) | plane_it_t begin() const {
method plane_it_t (line 521) | plane_it_t end() const {
function map_crtc_to_monitor (line 530) | std::map<std::uint32_t, monitor_t> map_crtc_to_monitor(const std::ve...
type kms_img_t (line 543) | struct kms_img_t: public img_t {
function print (line 550) | void print(plane_t::pointer plane, fb_t::pointer fb, crtc_t::pointer...
class display_t (line 582) | class display_t: public platf::display_t {
method display_t (line 584) | display_t(mem_type_e mem_type):
method init (line 589) | int init(const std::string &display_name, const ::video::config_t ...
method is_hdr (line 783) | bool is_hdr() {
method get_hdr_metadata (line 829) | bool get_hdr_metadata(SS_HDR_METADATA &metadata) {
method update_cursor (line 858) | void update_cursor() {
method capture_e (line 1039) | inline capture_e refresh(file_t *file, egl::surface_descriptor_t *...
class display_ram_t (line 1123) | class display_ram_t: public display_t {
method display_ram_t (line 1125) | display_ram_t(mem_type_e mem_type):
method init (line 1129) | int init(const std::string &display_name, const ::video::config_t ...
method capture_e (line 1160) | capture_e capture(const push_captured_image_cb_t &push_captured_im...
method make_avcodec_encode_device (line 1205) | std::unique_ptr<avcodec_encode_device_t> make_avcodec_encode_devic...
method blend_cursor (line 1221) | void blend_cursor(img_t &img) {
method capture_e (line 1269) | capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb,...
method alloc_img (line 1311) | std::shared_ptr<img_t> alloc_img() override {
method dummy_img (line 1322) | int dummy_img(platf::img_t *img) override {
class display_vram_t (line 1331) | class display_vram_t: public display_t {
method display_vram_t (line 1333) | display_vram_t(mem_type_e mem_type):
method make_avcodec_encode_device (line 1337) | std::unique_ptr<avcodec_encode_device_t> make_avcodec_encode_devic...
method alloc_img (line 1354) | std::shared_ptr<img_t> alloc_img() override {
method dummy_img (line 1369) | int dummy_img(platf::img_t *img) override {
method capture_e (line 1374) | capture_e capture(const push_captured_image_cb_t &push_captured_im...
method capture_e (line 1419) | capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb,...
method init (line 1461) | int init(const std::string &display_name, const ::video::config_t ...
function kms_display (line 1488) | std::shared_ptr<display_t> kms_display(mem_type_e hwdevice_type, const...
function correlate_to_wayland (line 1518) | void correlate_to_wayland(std::vector<kms::card_descriptor_t> &cds) {
function kms_display_names (line 1572) | std::vector<std::string> kms_display_names(mem_type_e hwdevice_type) {
FILE: src/platform/linux/misc.cpp
type dyn (line 59) | namespace dyn {
function load (line 83) | int load(void *handle, const std::vector<std::tuple<apiproc *, const c...
type platf (line 101) | namespace platf {
function ifaddr_t (line 104) | ifaddr_t get_ifaddrs() {
function appdata (line 117) | fs::path appdata() {
function from_sockaddr (line 195) | std::string from_sockaddr(const sockaddr *const ip_addr) {
function from_sockaddr_ex (line 208) | std::pair<std::uint16_t, std::string> from_sockaddr_ex(const sockaddr ...
function get_mac_address (line 224) | std::string get_mac_address(const std::string_view &address) {
function get_local_ip_for_gateway (line 241) | std::string get_local_ip_for_gateway() {
function run_command (line 321) | bp::child run_command(bool elevated, bool interactive, const std::stri...
function open_url (line 346) | void open_url(const std::string &url) {
function adjust_thread_priority (line 362) | void adjust_thread_priority(thread_priority_e priority) {
function streaming_will_start (line 366) | void streaming_will_start() {
function streaming_will_stop (line 370) | void streaming_will_stop() {
function restart_on_exit (line 374) | void restart_on_exit() {
function restart (line 396) | void restart() {
function set_env (line 402) | int set_env(const std::string &name, const std::string &value) {
function unset_env (line 406) | int unset_env(const std::string &name) {
function request_process_group_exit (line 410) | bool request_process_group_exit(std::uintptr_t native_handle) {
function process_group_running (line 420) | bool process_group_running(std::uintptr_t native_handle) {
function to_sockaddr (line 424) | struct sockaddr_in to_sockaddr(boost::asio::ip::address_v4 address, ui...
function to_sockaddr (line 436) | struct sockaddr_in6 to_sockaddr(boost::asio::ip::address_v6 address, u...
function send_batch (line 449) | bool send_batch(batched_send_info_t &send_info) {
function send (line 656) | bool send(send_info_t &send_info) {
class qos_t (line 761) | class qos_t: public deinit_t {
method qos_t (line 763) | qos_t(int sockfd, std::vector<std::tuple<int, int, int>> options):
function enable_socket_qos (line 793) | std::unique_ptr<deinit_t> enable_socket_qos(uintptr_t native_socket, b...
function get_host_name (line 856) | std::string get_host_name() {
type source (line 865) | namespace source {
type source_e (line 866) | enum source_e : std::size_t {
function verify_nvfbc (line 889) | bool verify_nvfbc() {
function verify_wl (line 898) | bool verify_wl() {
function verify_kms (line 907) | bool verify_kms() {
function verify_x11 (line 916) | bool verify_x11() {
function display_names (line 921) | std::vector<std::string> display_names(mem_type_e hwdevice_type) {
function needs_encoder_reenumeration (line 950) | bool needs_encoder_reenumeration() {
function display (line 955) | std::shared_ptr<display_t> display(mem_type_e hwdevice_type, const std...
function init (line 984) | std::unique_ptr<deinit_t> init() {
class linux_high_precision_timer (line 1051) | class linux_high_precision_timer: public high_precision_timer {
method sleep_for (line 1053) | void sleep_for(const std::chrono::nanoseconds &duration) override {
function create_high_precision_timer (line 1062) | std::unique_ptr<high_precision_timer> create_high_precision_timer() {
function get_clipboard (line 1066) | std::string
function set_clipboard (line 1072) | bool
FILE: src/platform/linux/misc.h
function window_system_e (line 20) | enum class window_system_e {
FILE: src/platform/linux/publish.cpp
type avahi (line 19) | namespace avahi {
type err_e (line 24) | enum err_e {
type proto (line 90) | enum proto {
type ServerState (line 96) | enum ServerState {
type ClientState (line 104) | enum ClientState {
type EntryGroupState (line 112) | enum EntryGroupState {
type ClientFlags (line 120) | enum ClientFlags {
type PublishFlags (line 128) | enum PublishFlags {
type EntryGroup (line 143) | struct EntryGroup
type Poll (line 144) | struct Poll
type SimplePoll (line 145) | struct SimplePoll
type Client (line 146) | struct Client
function init_common (line 206) | int init_common() {
function init_client (line 241) | int init_client() {
type platf::publish (line 281) | namespace platf::publish {
function free (line 284) | void free(T *p) {
function entry_group_callback (line 302) | void entry_group_callback(avahi::EntryGroup *g, avahi::EntryGroupState...
function create_services (line 325) | void create_services(avahi::Client *c) {
function client_callback (line 383) | void client_callback(avahi::Client *c, avahi::ClientState state, void ...
class deinit_t (line 402) | class deinit_t: public ::platf::deinit_t {
method deinit_t (line 406) | deinit_t(std::thread poll_thread):
function start (line 421) | [[nodiscard]] std::unique_ptr<::platf::deinit_t> start() {
FILE: src/platform/linux/vaapi.cpp
function VAStatus (line 18) | VAStatus
type AVBufferRef (line 40) | struct AVBufferRef
type va (line 42) | namespace va {
type DRMPRIMESurfaceDescriptor (line 52) | struct DRMPRIMESurfaceDescriptor {
class va_t (line 98) | class va_t: public platf::avcodec_encode_device_t {
method init (line 100) | int init(int in_width, int in_height, file_t &&render_device) {
method VAEntrypoint (line 140) | VAEntrypoint select_va_entrypoint(VAProfile profile) {
method is_va_profile_supported (line 170) | bool is_va_profile_supported(VAProfile profile) {
method VAProfile (line 188) | VAProfile get_va_profile(AVCodecContext *ctx) {
method init_codec_options (line 220) | void init_codec_options(AVCodecContext *ctx, AVDictionary **options)...
method set_frame (line 294) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx_buf) overri...
method apply_colorspace (line 371) | void apply_colorspace() override {
class va_ram_t (line 392) | class va_ram_t: public va_t {
method convert (line 394) | int convert(platf::img_t &img) override {
class va_vram_t (line 402) | class va_vram_t: public va_t {
method convert (line 404) | int convert(platf::img_t &img) override {
method init (line 430) | int init(int in_width, int in_height, file_t &&render_device, int of...
type VAAPIDevicePriv (line 455) | struct VAAPIDevicePriv {
type AVVAAPIDeviceContext (line 469) | struct AVVAAPIDeviceContext {
function __log (line 484) | static void __log(void *level, const char *msg) {
function vaapi_hwdevice_ctx_free (line 488) | static void vaapi_hwdevice_ctx_free(AVHWDeviceContext *ctx) {
function vaapi_init_avcodec_hardware_input_buffer (line 497) | int vaapi_init_avcodec_hardware_input_buffer(platf::avcodec_encode_dev...
function query (line 552) | static bool query(display_t::pointer display, VAProfile profile) {
function validate (line 573) | bool validate(int fd) {
function make_avcodec_encode_device (line 608) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_de...
function make_avcodec_encode_device (line 628) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_de...
function make_avcodec_encode_device (line 642) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_de...
FILE: src/platform/linux/vaapi.h
function namespace (line 11) | namespace egl {
function namespace (line 15) | namespace va {
FILE: src/platform/linux/wayland.cpp
type wl (line 35) | namespace wl {
function classCall (line 39) | static auto classCall(void *data, Params... params) -> decltype(((*rei...
type zwp_linux_buffer_params_v1_listener (line 46) | struct zwp_linux_buffer_params_v1_listener
type pollfd (line 88) | struct pollfd
function wl_registry (line 106) | wl_registry *display_t::registry() {
type zwp_linux_buffer_params_v1 (line 447) | struct zwp_linux_buffer_params_v1
type wl_buffer (line 448) | struct wl_buffer
type zwp_linux_buffer_params_v1 (line 463) | struct zwp_linux_buffer_params_v1
function monitors (line 536) | std::vector<std::unique_ptr<monitor_t>> monitors(const char *display_n...
function validate (line 562) | static bool validate() {
function init (line 568) | int init() {
FILE: src/platform/linux/wayland.h
function class (line 28) | class frame_t {
function class (line 36) | class dmabuf_t {
type gbm_device (line 94) | struct gbm_device
type gbm_bo (line 95) | struct gbm_bo
type wl_buffer (line 96) | struct wl_buffer
function y_invert (line 97) | bool y_invert {false};
function class (line 100) | class monitor_t {
type bind_t (line 134) | struct bind_t {
type interface_e (line 140) | enum interface_e {
function const (line 156) | bool operator[](interface_e bit) const {
function zwlr_screencopy_manager_v1 (line 161) | zwlr_screencopy_manager_v1 *screencopy_manager {nullptr};
FILE: src/platform/linux/wlgrab.cpp
type wl (line 18) | namespace wl {
type img_t (line 22) | struct img_t: public platf::img_t {
class wlr_t (line 29) | class wlr_t: public platf::display_t {
method init (line 31) | int init(platf::mem_type_e hwdevice_type, const std::string &display...
method dummy_img (line 85) | int dummy_img(platf::img_t *img) override {
method snapshot (line 89) | inline platf::capture_e snapshot(const pull_free_image_cb_t &pull_fr...
class wlr_ram_t (line 125) | class wlr_ram_t: public wlr_t {
method capture (line 127) | platf::capture_e capture(const push_captured_image_cb_t &push_captur...
method snapshot (line 172) | platf::capture_e snapshot(const pull_free_image_cb_t &pull_free_imag...
method init (line 206) | int init(platf::mem_type_e hwdevice_type, const std::string &display...
method make_avcodec_encode_device (line 226) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_...
method alloc_img (line 242) | std::shared_ptr<platf::img_t> alloc_img() override {
class wlr_vram_t (line 257) | class wlr_vram_t: public wlr_t {
method capture (line 259) | platf::capture_e capture(const push_captured_image_cb_t &push_captur...
method snapshot (line 304) | platf::capture_e snapshot(const pull_free_image_cb_t &pull_free_imag...
method alloc_img (line 331) | std::shared_ptr<platf::img_t> alloc_img() override {
method make_avcodec_encode_device (line 346) | std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_...
method dummy_img (line 362) | int dummy_img(platf::img_t *img) override {
type platf (line 372) | namespace platf {
function wl_display (line 373) | std::shared_ptr<display_t> wl_display(mem_type_e hwdevice_type, const ...
function wl_display_names (line 396) | std::vector<std::string> wl_display_names() {
FILE: src/platform/linux/x11grab.cpp
type platf (line 35) | namespace platf {
type x11 (line 39) | namespace x11 {
type rr (line 53) | namespace rr {
function init (line 61) | static int init() {
type fix (line 95) | namespace fix {
function init (line 98) | static int init() {
function init (line 126) | static int init() {
function xdisplay_t (line 871) | xdisplay_t make_display() {
function freeDisplay (line 875) | void freeDisplay(_XDisplay *xdisplay) {
function freeCursorCtx (line 879) | void freeCursorCtx(cursor_ctx_t::pointer ctx) {
type xcb (line 159) | namespace xcb {
function init_shm (line 177) | int init_shm() {
function init (line 207) | int init() {
class shm_id_t (line 256) | class shm_id_t {
method shm_id_t (line 258) | shm_id_t():
method shm_id_t (line 262) | shm_id_t(int id):
method shm_id_t (line 266) | shm_id_t(shm_id_t &&other) noexcept:
class shm_data_t (line 281) | class shm_data_t {
method shm_data_t (line 283) | shm_data_t():
method shm_data_t (line 287) | shm_data_t(void *data):
method shm_data_t (line 291) | shm_data_t(shm_data_t &&other) noexcept:
type x11_img_t (line 305) | struct x11_img_t: public img_t {
type shm_img_t (line 309) | struct shm_img_t: public img_t {
function blend_cursor (line 316) | static void blend_cursor(Display *display, img_t &img, int offsetX, in...
type x11_attr_t (line 365) | struct x11_attr_t: public display_t {
method x11_attr_t (line 380) | x11_attr_t(mem_type_e mem_type):
method init (line 388) | int init(const std::string &display_name, const ::video::config_t &c...
method refresh (line 455) | void refresh() {
method capture_e (line 459) | capture_e capture(const push_captured_image_cb_t &push_captured_imag...
method capture_e (line 504) | capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, s...
method alloc_img (line 535) | std::shared_ptr<img_t> alloc_img() override {
method make_avcodec_encode_device (line 539) | std::unique_ptr<avcodec_encode_device_t> make_avcodec_encode_device(...
method dummy_img (line 555) | int dummy_img(img_t *img) override {
type shm_attr_t (line 570) | struct shm_attr_t: public x11_attr_t {
method delayed_refresh (line 582) | void delayed_refresh() {
method shm_attr_t (line 588) | shm_attr_t(mem_type_e mem_type):
method capture_e (line 598) | capture_e capture(const push_captured_image_cb_t &push_captured_imag...
method capture_e (line 643) | capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, s...
method alloc_img (line 673) | std::shared_ptr<img_t> alloc_img() override {
method dummy_img (line 684) | int dummy_img(platf::img_t *img) override {
method init (line 688) | int init(const std::string &display_name, const ::video::config_t &c...
method frame_size (line 727) | std::uint32_t frame_size() {
function x11_display (line 732) | std::shared_ptr<display_t> x11_display(platf::mem_type_e hwdevice_type...
function x11_display_names (line 766) | std::vector<std::string> x11_display_names() {
function freeImage (line 803) | void freeImage(XImage *p) {
function freeX (line 807) | void freeX(XFixesCursorImage *p) {
function load_xcb (line 811) | int load_xcb() {
function load_x11 (line 818) | int load_x11() {
type x11 (line 827) | namespace x11 {
type rr (line 53) | namespace rr {
function init (line 61) | static int init() {
type fix (line 95) | namespace fix {
function init (line 98) | static int init() {
function init (line 126) | static int init() {
function xdisplay_t (line 871) | xdisplay_t make_display() {
function freeDisplay (line 875) | void freeDisplay(_XDisplay *xdisplay) {
function freeCursorCtx (line 879) | void freeCursorCtx(cursor_ctx_t::pointer ctx) {
FILE: src/platform/linux/x11grab.h
type _XDisplay (line 15) | struct _XDisplay
function namespace (line 17) | namespace egl {
function namespace (line 21) | namespace platf::x11 {
FILE: src/platform/macos/av_audio.h
function interface (line 15) | interface AVAudio: NSObject <AVCaptureAudioDataOutputSampleBufferDelegat...
FILE: src/platform/macos/av_img_t.h
function namespace (line 14) | namespace platf {
function img_t (line 52) | struct av_img_t: img_t {
type temp_retain_av_img_t (line 57) | struct temp_retain_av_img_t {
FILE: src/platform/macos/av_video.h
type CaptureSession (line 11) | struct CaptureSession {
FILE: src/platform/macos/input.cpp
type platf (line 29) | namespace platf {
type macos_input_t (line 32) | struct macos_input_t {
type KeyCodeMap (line 49) | struct KeyCodeMap {
function keysym (line 231) | int keysym(int keycode) {
function keyboard_update (line 249) | void keyboard_update(input_t &input, uint16_t modcode, bool release, u...
function unicode (line 297) | void unicode(input_t &input, char *utf8, int size) {
function alloc_gamepad (line 301) | int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepa...
function free_gamepad (line 306) | void free_gamepad(input_t &input, int nr) {
function gamepad_update (line 310) | void gamepad_update(input_t &input, int nr, const gamepad_state_t &gam...
function get_mouse_loc (line 315) | util::point_t get_mouse_loc(input_t &input) {
function post_mouse (line 327) | void post_mouse(
function CGEventType (line 367) | inline CGEventType event_type_mouse(input_t &input) {
function move_mouse (line 382) | void move_mouse(
function abs_mouse (line 393) | void abs_mouse(
function button_mouse (line 412) | void button_mouse(input_t &input, const int button, const bool release) {
function scroll (line 451) | void scroll(input_t &input, const int high_res_distance) {
function hscroll (line 463) | void hscroll(input_t &input, int high_res_distance) {
function allocate_client_input_context (line 472) | std::unique_ptr<client_input_t> allocate_client_input_context(input_t ...
function touch_update (line 483) | void touch_update(client_input_t *input, const touch_port_t &touch_por...
function pen_update (line 493) | void pen_update(client_input_t *input, const touch_port_t &touch_port,...
function gamepad_touch (line 502) | void gamepad_touch(input_t &input, const gamepad_touch_t &touch) {
function gamepad_motion (line 511) | void gamepad_motion(input_t &input, const gamepad_motion_t &motion) {
function gamepad_battery (line 520) | void gamepad_battery(input_t &input, const gamepad_battery_t &battery) {
function input_t (line 524) | input_t input() {
function freeInput (line 570) | void freeInput(void *p) {
function get_capabilities (line 592) | platform_caps::caps_t get_capabilities() {
FILE: src/platform/macos/misc.h
function namespace (line 13) | namespace platf {
function namespace (line 17) | namespace dyn {
FILE: src/platform/macos/nv12_zero_device.cpp
type platf (line 17) | namespace platf {
function free_frame (line 19) | void free_frame(AVFrame *frame) {
function free_buffer (line 23) | void free_buffer(void *opaque, uint8_t *data) {
FILE: src/platform/macos/nv12_zero_device.h
type AVFrame (line 10) | struct AVFrame
function namespace (line 12) | namespace platf {
FILE: src/platform/macos/publish.cpp
type platf::publish (line 19) | namespace platf::publish {
type ServiceRefDeleter (line 22) | struct ServiceRefDeleter {
class deinit_t (line 34) | class deinit_t: public ::platf::deinit_t, std::unique_ptr<DNSServiceRe...
method deinit_t (line 43) | deinit_t(DNSServiceRef serviceRef):
method deinit_t (line 72) | deinit_t(const deinit_t &) = delete;
method deinit_t (line 73) | deinit_t &operator=(const deinit_t &) = delete;
function registrationCallback (line 83) | void registrationCallback(DNSServiceRef /*serviceRef*/, DNSServiceFlag...
function start (line 103) | [[nodiscard]] std::unique_ptr<::platf::deinit_t> start() {
FILE: src/platform/windows/PolicyConfig.h
function interface (line 42) | interface IPolicyConfig: public IUnknown {
FILE: src/platform/windows/audio.cpp
type sample_format_e (line 59) | enum class sample_format_e {
function WAVEFORMATEXTENSIBLE (line 68) | constexpr WAVEFORMATEXTENSIBLE create_waveformat(sample_format_e sample_...
function virtual_sink_waveformats_t (line 130) | virtual_sink_waveformats_t create_virtual_sink_waveformats() {
function waveformat_to_pretty_string (line 169) | std::string waveformat_to_pretty_string(const WAVEFORMATEXTENSIBLE &wave...
type platf::audio (line 205) | namespace platf::audio {
function Release (line 207) | void Release(T *p) {
function co_task_free (line 212) | void co_task_free(T *p) {
class co_init_t (line 227) | class co_init_t: public deinit_t {
method co_init_t (line 229) | co_init_t() {
class prop_var_t (line 238) | class prop_var_t {
method prop_var_t (line 240) | prop_var_t() {
type format_t (line 251) | struct format_t {
function audio_client_t (line 279) | audio_client_t make_audio_client(device_t &device, const format_t &for...
function device_t (line 338) | device_t default_device(device_enum_t &device_enum) {
class audio_notification_t (line 356) | class audio_notification_t: public ::IMMNotificationClient {
method audio_notification_t (line 358) | audio_notification_t() {
method AddRef (line 362) | AddRef() {
method Release (line 366) | Release() {
method QueryInterface (line 370) | QueryInterface(REFIID riid, VOID **ppvInterface) {
method OnDefaultDeviceChanged (line 386) | OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR pwstrDevi...
method OnDeviceAdded (line 393) | OnDeviceAdded(LPCWSTR pwstrDeviceId) {
method OnDeviceRemoved (line 397) | OnDeviceRemoved(LPCWSTR pwstrDeviceId) {
method OnDeviceStateChanged (line 401) | OnDeviceStateChanged(
method OnPropertyValueChanged (line 408) | OnPropertyValueChanged(
method check_default_render_device_changed (line 419) | bool check_default_render_device_changed() {
class mic_wasapi_t (line 427) | class mic_wasapi_t: public mic_t {
method capture_e (line 429) | capture_e sample(std::vector<float> &sample_out) override {
method init (line 450) | int init(std::uint32_t sample_rate, std::uint32_t frame_size, std::u...
method capture_e (line 571) | capture_e _fill_buffer() {
class audio_control_t (line 685) | class audio_control_t: public ::platf::audio_control_t {
method sink_info (line 687) | std::optional<sink_t> sink_info() override {
method is_sink_available (line 732) | bool is_sink_available(const std::string &sink) override {
method extract_virtual_sink_info (line 744) | std::optional<std::pair<std::wstring, std::reference_wrapper<const f...
method microphone (line 764) | std::unique_ptr<mic_t> microphone(const std::uint8_t *mapping, int c...
method set_format (line 793) | std::optional<std::wstring> set_format(const std::string &sink) {
method set_sink (line 853) | int set_sink(const std::string &sink) override {
type match_field_e (line 883) | enum class match_field_e {
method match_steam_speakers (line 893) | audio_control_t::match_fields_list_t match_steam_speakers() {
method match_all_fields (line 899) | audio_control_t::match_fields_list_t match_all_fields(const std::wst...
method find_device_id (line 913) | std::optional<matched_field_t> find_device_id(const match_fields_lis...
method reset_default_device (line 987) | void reset_default_device() {
method install_steam_audio_drivers (line 1048) | bool install_steam_audio_drivers() {
method init (line 1115) | int init() {
type platf (line 1155) | namespace platf {
type dxgi (line 1158) | namespace dxgi {
function audio_control (line 1162) | std::unique_ptr<audio_control_t> audio_control() {
function init (line 1179) | std::unique_ptr<deinit_t> init() {
FILE: src/platform/windows/display.h
function namespace (line 22) | namespace platf::dxgi {
function namespace (line 65) | namespace video {
type cursor_t (line 76) | struct cursor_t {
function class (line 84) | class gpu_cursor_t {
function class (line 157) | class display_base_t: public display_t {
function class (line 251) | class display_ram_t: public display_base_t {
function class (line 286) | class duplication_t {
function class (line 367) | class display_wgc_ram_t: public display_ram_t {
function class (line 379) | class display_wgc_vram_t: public display_vram_t {
FILE: src/platform/windows/display_base.cpp
type _D3DKMT_GPU_PREFERENCE_QUERY_STATE (line 21) | enum _D3DKMT_GPU_PREFERENCE_QUERY_STATE: DWORD {
type platf (line 38) | namespace platf {
function display (line 996) | std::shared_ptr<display_t> display(mem_type_e hwdevice_type, const std...
function display_names (line 1033) | std::vector<std::string> display_names(mem_type_e) {
function needs_encoder_reenumeration (line 1103) | bool needs_encoder_reenumeration() {
type platf::dxgi (line 42) | namespace platf::dxgi {
function capture_e (line 127) | capture_e duplication_t::next_frame(DXGI_OUTDUPL_FRAME_INFO &frame_inf...
function capture_e (line 159) | capture_e duplication_t::reset(dup_t::pointer dup_p) {
function capture_e (line 167) | capture_e duplication_t::release_frame() {
function capture_e (line 195) | capture_e display_base_t::capture(const push_captured_image_cb_t &push...
function test_dxgi_duplication (line 347) | bool test_dxgi_duplication(adapter_t &adapter, output_t &output, bool ...
function NTSTATUS (line 417) | NTSTATUS __stdcall NtGdiDdDDIGetCachedHybridQueryValueHook(D3DKMT_GPU_...
type platf (line 991) | namespace platf {
function display (line 996) | std::shared_ptr<display_t> display(mem_type_e hwdevice_type, const std...
function display_names (line 1033) | std::vector<std::string> display_names(mem_type_e) {
function needs_encoder_reenumeration (line 1103) | bool needs_encoder_reenumeration() {
FILE: src/platform/windows/display_ram.cpp
type platf (line 10) | namespace platf {
type platf::dxgi (line 14) | namespace platf::dxgi {
type img_t (line 15) | struct img_t: public ::platf::img_t {
function blend_cursor_monochrome (line 22) | void blend_cursor_monochrome(const cursor_t &cursor, img_t &img) {
function apply_color_alpha (line 84) | void apply_color_alpha(int *img_pixel_p, int cursor_pixel) {
function apply_color_masked (line 99) | void apply_color_masked(int *img_pixel_p, int cursor_pixel) {
function blend_cursor_color (line 109) | void blend_cursor_color(const cursor_t &cursor, img_t &img, const bool...
function blend_cursor (line 155) | void blend_cursor(const cursor_t &cursor, img_t &img) {
function capture_e (line 171) | capture_e display_ddup_ram_t::snapshot(const pull_free_image_cb_t &pul...
function capture_e (line 318) | capture_e display_ddup_ram_t::release_snapshot() {
FILE: src/platform/windows/display_vram.cpp
type platf (line 35) | namespace platf {
function free_frame (line 39) | static void free_frame(AVFrame *frame) {
type platf::dxgi (line 45) | namespace platf::dxgi {
function buf_t (line 48) | buf_t make_buffer(device_t::pointer device, const T &t) {
function blend_t (line 71) | blend_t make_blend(device_t::pointer device, bool enable, bool invert) {
type img_d3d_t (line 131) | struct img_d3d_t: public platf::img_t {
type texture_lock_helper (line 160) | struct texture_lock_helper {
method texture_lock_helper (line 164) | texture_lock_helper(const texture_lock_helper &) = delete;
method texture_lock_helper (line 165) | texture_lock_helper &operator=(const texture_lock_helper &) = delete;
method texture_lock_helper (line 167) | texture_lock_helper(texture_lock_helper &&other) {
method texture_lock_helper (line 173) | texture_lock_helper &operator=(texture_lock_helper &&other) {
method texture_lock_helper (line 183) | texture_lock_helper(IDXGIKeyedMutex *mutex):
method lock (line 196) | bool lock() {
function make_cursor_xor_image (line 210) | util::buffer_t<std::uint8_t> make_cursor_xor_image(const util::buffer_...
function make_cursor_alpha_image (line 279) | util::buffer_t<std::uint8_t> make_cursor_alpha_image(const util::buffe...
function blob_t (line 352) | blob_t compile_shader(LPCSTR file, LPCSTR entrypoint, LPCSTR shader_mo...
function blob_t (line 378) | blob_t compile_pixel_shader(LPCSTR file) {
function blob_t (line 382) | blob_t compile_vertex_shader(LPCSTR file) {
class d3d_base_encode_device (line 386) | class d3d_base_encode_device final {
method convert (line 388) | int convert(platf::img_t &img_base) {
method apply_colorspace (line 459) | void apply_colorspace(const ::video::sunshine_colorspace_t &colorspa...
method init_output (line 484) | int init_output(ID3D11Texture2D *frame_texture, int width, int heigh...
method init (line 711) | int init(std::shared_ptr<platf::display_t> display, adapter_t::point...
type encoder_img_ctx_t (line 831) | struct encoder_img_ctx_t {
method reset (line 842) | void reset() {
method initialize_image_context (line 851) | int initialize_image_context(const img_d3d_t &img, encoder_img_ctx_t...
method shader_res_t (line 896) | shader_res_t create_black_texture_for_rtv_clear() {
class d3d_avcodec_encode_device_t (line 969) | class d3d_avcodec_encode_device_t: public avcodec_encode_device_t {
method init (line 971) | int init(std::shared_ptr<platf::display_t> display, adapter_t::point...
method convert (line 977) | int convert(platf::img_t &img_base) override {
method apply_colorspace (line 981) | void apply_colorspace() override {
method init_hwframes (line 985) | void init_hwframes(AVHWFramesContext *frames) override {
method prepare_to_derive_context (line 999) | int prepare_to_derive_context(int hw_device_type) override {
method set_frame (line 1016) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override {
class d3d_nvenc_encode_device_t (line 1059) | class d3d_nvenc_encode_device_t: public nvenc_encode_device_t {
method init_device (line 1061) | bool init_device(std::shared_ptr<platf::display_t> display, adapter_...
method init_encoder (line 1082) | bool init_encoder(const ::video::config_t &client_config, const ::vi...
method convert (line 1096) | int convert(platf::img_t &img_base) override {
function set_cursor_texture (line 1106) | bool set_cursor_texture(device_t::pointer device, gpu_cursor_t &cursor...
function capture_e (line 1150) | capture_e display_ddup_vram_t::snapshot(const pull_free_image_cb_t &pu...
function capture_e (line 1559) | capture_e display_ddup_vram_t::release_snapshot() {
function capture_e (line 1649) | capture_e display_wgc_vram_t::snapshot(const pull_free_image_cb_t &pul...
function capture_e (line 1702) | capture_e display_wgc_vram_t::release_snapshot() {
function init (line 1938) | int init() {
FILE: src/platform/windows/display_wgc.cpp
type platf (line 21) | namespace platf {
type winrt (line 25) | namespace winrt {
type WINRT_IMPL_HAS_DECLSPEC_UUID (line 40) | struct
type platf::dxgi (line 63) | namespace platf::dxgi {
function capture_e (line 192) | capture_e wgc_capture_t::next_frame(std::chrono::milliseconds timeout,...
function capture_e (line 223) | capture_e wgc_capture_t::release_frame() {
function capture_e (line 258) | capture_e display_wgc_ram_t::snapshot(const pull_free_image_cb_t &pull...
function capture_e (line 343) | capture_e display_wgc_ram_t::release_snapshot() {
FILE: src/platform/windows/input.cpp
type platf (line 32) | namespace platf {
type gp_touch_context_t (line 65) | struct gp_touch_context_t {
type gamepad_context_t (line 71) | struct gamepad_context_t {
function ds4_update_motion (line 143) | static void ds4_update_motion(gamepad_context_t &gamepad, uint8_t moti...
class vigem_t (line 198) | class vigem_t {
method init (line 200) | int init() {
method alloc_gamepad_internal (line 224) | int alloc_gamepad_internal(const gamepad_id_t &id, feedback_queue_t ...
method free_target (line 291) | void free_target(int nr) {
method rumble (line 329) | void rumble(target_t::pointer target, std::uint8_t largeMotor, std::...
method set_rgb_led (line 367) | void set_rgb_led(target_t::pointer target, std::uint8_t r, std::uint...
function x360_notify (line 409) | void CALLBACK x360_notify(
function ds4_notify (line 424) | void CALLBACK ds4_notify(
type input_raw_t (line 443) | struct input_raw_t {
function input_t (line 455) | input_t input() {
function send_input (line 477) | void send_input(INPUT &i) {
function inject_synthetic_pointer_input (line 499) | bool inject_synthetic_pointer_input(input_raw_t *input, HSYNTHETICPOIN...
function abs_mouse (line 512) | void abs_mouse(input_t &input, const touch_port_t &touch_port, float x...
function move_mouse (line 534) | void move_mouse(input_t &input, int deltaX, int deltaY) {
function get_mouse_loc (line 547) | util::point_t get_mouse_loc(input_t &input) {
function button_mouse (line 561) | void button_mouse(input_t &input, int button, bool release) {
function scroll (line 584) | void scroll(input_t &input, int distance) {
function hscroll (line 596) | void hscroll(input_t &input, int distance) {
function keyboard_update (line 608) | void keyboard_update(input_t &input, uint16_t modcode, bool release, u...
type client_input_raw_t (line 663) | struct client_input_raw_t: public client_input_t {
method client_input_raw_t (line 664) | client_input_raw_t(input_t &input) {
function allocate_client_input_context (line 706) | std::unique_ptr<client_input_t> allocate_client_input_context(input_t ...
function perform_touch_compaction (line 715) | void perform_touch_compaction(client_input_raw_t *raw) {
function POINTER_TYPE_INFO (line 746) | POINTER_TYPE_INFO *pointer_by_id(client_input_raw_t *raw, uint32_t poi...
function populate_common_pointer_info (line 786) | void populate_common_pointer_info(POINTER_INFO &pointerInfo, const tou...
function repeat_touch (line 846) | void repeat_touch(client_input_raw_t *raw) {
function repeat_pen (line 859) | void repeat_pen(client_input_raw_t *raw) {
function cancel_all_active_touches (line 872) | void cancel_all_active_touches(client_input_raw_t *raw) {
function touch_update (line 908) | void touch_update(client_input_t *input, const touch_port_t &touch_por...
function pen_update (line 1034) | void pen_update(client_input_t *input, const touch_port_t &touch_port,...
function unicode (line 1147) | void unicode(input_t &input, char *utf8, int size) {
function alloc_gamepad (line 1175) | int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepa...
function free_gamepad (line 1229) | void free_gamepad(input_t &input, int nr) {
function XUSB_BUTTON (line 1244) | static XUSB_BUTTON x360_buttons(const gamepad_state_t &gamepad_state) {
function x360_update_state (line 1302) | static void x360_update_state(gamepad_context_t &gamepad, const gamepa...
function DS4_DPAD_DIRECTIONS (line 1314) | static DS4_DPAD_DIRECTIONS ds4_dpad(const gamepad_state_t &gamepad_sta...
function DS4_BUTTONS (line 1352) | static DS4_BUTTONS ds4_buttons(const gamepad_state_t &gamepad_state) {
function DS4_SPECIAL_BUTTONS (line 1397) | static DS4_SPECIAL_BUTTONS ds4_special_buttons(const gamepad_state_t &...
function to_ds4_triggerX (line 1417) | static std::uint8_t to_ds4_triggerX(std::int16_t v) {
function to_ds4_triggerY (line 1421) | static std::uint8_t to_ds4_triggerY(std::int16_t v) {
function ds4_update_state (line 1432) | static void ds4_update_state(gamepad_context_t &gamepad, const gamepad...
function ds4_update_ts_and_send (line 1454) | void ds4_update_ts_and_send(vigem_t *vigem, int nr) {
function gamepad_update (line 1489) | void gamepad_update(input_t &input, int nr, const gamepad_state_t &gam...
function gamepad_touch (line 1521) | void gamepad_touch(input_t &input, const gamepad_touch_t &touch) {
function gamepad_motion (line 1627) | void gamepad_motion(input_t &input, const gamepad_motion_t &motion) {
function gamepad_battery (line 1654) | void gamepad_battery(input_t &input, const gamepad_battery_t &battery) {
function freeInput (line 1722) | void freeInput(void *p) {
function get_capabilities (line 1763) | platform_caps::caps_t get_capabilities() {
FILE: src/platform/windows/keylayout.h
function namespace (line 11) | namespace platf {
FILE: src/platform/windows/misc.cpp
function nt_set_timer_resolution_max (line 81) | bool nt_set_timer_resolution_max() {
function nt_set_timer_resolution_min (line 90) | bool nt_set_timer_resolution_min() {
type platf (line 109) | namespace platf {
function appdata (line 129) | std::filesystem::path appdata() {
function from_sockaddr (line 135) | std::string from_sockaddr(const sockaddr *const socket_address) {
function from_sockaddr_ex (line 148) | std::pair<std::uint16_t, std::string> from_sockaddr_ex(const sockaddr ...
function adapteraddrs_t (line 164) | adapteraddrs_t get_adapteraddrs() {
function get_mac_address (line 175) | std::string get_mac_address(const std::string_view &address) {
function get_local_ip_for_gateway (line 196) | std::string get_local_ip_for_gateway() {
function HDESK (line 251) | HDESK syncThreadDesktop() {
function print_status (line 270) | void print_status(const std::string_view &prefix, HRESULT status) {
function IsUserAdmin (line 278) | bool IsUserAdmin(HANDLE user_token) {
function HANDLE (line 312) | HANDLE retrieve_users_token(bool elevated) {
function merge_user_environment_block (line 373) | bool merge_user_environment_block(bp::environment &env, HANDLE shell_t...
function is_running_as_system (line 413) | bool is_running_as_system() {
function append_string_to_environment_block (line 443) | void append_string_to_environment_block(wchar_t *env_block, int &offse...
function create_environment_block (line 448) | std::wstring create_environment_block(bp::environment &env) {
function LPPROC_THREAD_ATTRIBUTE_LIST (line 477) | LPPROC_THREAD_ATTRIBUTE_LIST allocate_proc_thread_attr_list(DWORD attr...
function free_proc_thread_attr_list (line 494) | void free_proc_thread_attr_list(LPPROC_THREAD_ATTRIBUTE_LIST list) {
function create_boost_child_from_results (line 507) | bp::child create_boost_child_from_results(bool process_launched, const...
function impersonate_current_user (line 543) | std::error_code impersonate_current_user(HANDLE user_token, std::funct...
function STARTUPINFOEXW (line 580) | STARTUPINFOEXW create_startup_info(FILE *file, HANDLE *job, std::error...
function override_per_user_predefined_keys (line 627) | bool override_per_user_predefined_keys(HANDLE token) {
function escape_argument (line 683) | std::wstring escape_argument(const std::wstring &argument) {
function escape_argument_for_cmd (line 720) | std::wstring escape_argument_for_cmd(const std::wstring &argument) {
function resolve_command_string (line 744) | std::wstring resolve_command_string(const std::string &raw_cmd, const ...
function run_command (line 955) | bp::child run_command(bool elevated, bool interactive, const std::stri...
function open_url (line 1067) | void open_url(const std::string &url) {
function adjust_thread_priority (line 1081) | void adjust_thread_priority(thread_priority_e priority) {
function streaming_will_start (line 1108) | void streaming_will_start() {
function streaming_will_stop (line 1222) | void streaming_will_stop() {
function restart_on_exit (line 1255) | void restart_on_exit() {
function restart (line 1277) | void restart() {
function set_env (line 1289) | int set_env(const std::string &name, const std::string &value) {
function unset_env (line 1293) | int unset_env(const std::string &name) {
type enum_wnd_context_t (line 1297) | struct enum_wnd_context_t {
function BOOL (line 1302) | static BOOL CALLBACK prgrp_enum_windows(HWND hwnd, LPARAM lParam) {
function request_process_group_exit (line 1328) | bool request_process_group_exit(std::uintptr_t native_handle) {
function process_group_running (line 1369) | bool process_group_running(std::uintptr_t native_handle) {
function SOCKADDR_IN (line 1381) | SOCKADDR_IN to_sockaddr(boost::asio::ip::address_v4 address, uint16_t ...
function SOCKADDR_IN6 (line 1393) | SOCKADDR_IN6 to_sockaddr(boost::asio::ip::address_v6 address, uint16_t...
function send_batch (line 1408) | bool send_batch(batched_send_info_t &send_info) {
function send (line 1511) | bool send(send_info_t &send_info) {
class qos_t (line 1591) | class qos_t: public deinit_t {
method qos_t (line 1593) | qos_t(QOS_FLOWID flow_id):
function enable_socket_qos (line 1616) | std::unique_ptr<deinit_t> enable_socket_qos(uintptr_t native_socket, b...
function qpc_counter (line 1725) | int64_t qpc_counter() {
function qpc_time_difference (line 1733) | std::chrono::nanoseconds qpc_time_difference(int64_t performance_count...
function from_utf8 (line 1747) | std::wstring from_utf8(const std::string_view &string) {
function to_utf8 (line 1773) | std::string to_utf8(const std::wstring_view &string) {
function get_host_name (line 1799) | std::string get_host_name() {
class win32_high_precision_timer (line 1808) | class win32_high_precision_timer: public high_precision_timer {
method win32_high_precision_timer (line 1810) | win32_high_precision_timer() {
method sleep_for (line 1827) | void sleep_for(const std::chrono::nanoseconds &duration) override {
function create_high_precision_timer (line 1855) | std::unique_ptr<high_precision_timer> create_high_precision_timer() {
function get_clipboard (line 1859) | std::string
function set_clipboard (line 1865) | bool
function ensureCrLf (line 1872) | static std::string ensureCrLf(const std::string& utf8Str) {
function getClipboardData (line 1886) | static std::wstring getClipboardData() {
function setClipboardData (line 1914) | static int setClipboardData(const std::wstring& utf16Str) {
FILE: src/platform/windows/misc.h
function namespace (line 15) | namespace platf {
FILE: src/platform/windows/nvprefs/driver_settings.cpp
function nvapi_error_message (line 16) | void nvapi_error_message(NvAPI_Status status) {
function fill_nvapi_string (line 22) | void fill_nvapi_string(NvAPI_UnicodeString &dest, const wchar_t *src) {
type nvprefs (line 29) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/driver_settings.h
function namespace (line 18) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/nvapi_opensource_wrapper.cpp
function NvAPI_Status (line 21) | NvAPI_Status call_interface(const char *name, Args... args) {
function NVAPI_INTERFACE (line 38) | NVAPI_INTERFACE
function NVAPI_INTERFACE (line 63) | NVAPI_INTERFACE NvAPI_Unload() {
function NVAPI_INTERFACE (line 72) | NVAPI_INTERFACE NvAPI_GetErrorMessage(NvAPI_Status nr, NvAPI_ShortString...
function NVAPI_INTERFACE (line 78) | NVAPI_INTERFACE NvAPI_DRS_CreateSession(NvDRSSessionHandle *phSession) {
function NVAPI_INTERFACE (line 82) | NVAPI_INTERFACE NvAPI_DRS_DestroySession(NvDRSSessionHandle hSession) {
function NVAPI_INTERFACE (line 86) | NVAPI_INTERFACE NvAPI_DRS_LoadSettings(NvDRSSessionHandle hSession) {
function NVAPI_INTERFACE (line 90) | NVAPI_INTERFACE NvAPI_DRS_SaveSettings(NvDRSSessionHandle hSession) {
function NVAPI_INTERFACE (line 94) | NVAPI_INTERFACE NvAPI_DRS_CreateProfile(NvDRSSessionHandle hSession, NVD...
function NVAPI_INTERFACE (line 98) | NVAPI_INTERFACE NvAPI_DRS_FindProfileByName(NvDRSSessionHandle hSession,...
function NVAPI_INTERFACE (line 102) | NVAPI_INTERFACE NvAPI_DRS_CreateApplication(NvDRSSessionHandle hSession,...
function NVAPI_INTERFACE (line 106) | NVAPI_INTERFACE NvAPI_DRS_GetApplicationInfo(NvDRSSessionHandle hSession...
function NVAPI_INTERFACE (line 110) | NVAPI_INTERFACE NvAPI_DRS_SetSetting(NvDRSSessionHandle hSession, NvDRSP...
function NVAPI_INTERFACE (line 114) | NVAPI_INTERFACE NvAPI_DRS_GetSetting(NvDRSSessionHandle hSession, NvDRSP...
function NVAPI_INTERFACE (line 118) | NVAPI_INTERFACE NvAPI_DRS_DeleteProfileSetting(NvDRSSessionHandle hSessi...
function NVAPI_INTERFACE (line 122) | NVAPI_INTERFACE NvAPI_DRS_GetBaseProfile(NvDRSSessionHandle hSession, Nv...
FILE: src/platform/windows/nvprefs/nvprefs_common.cpp
type nvprefs (line 12) | namespace nvprefs {
function info_message (line 14) | void info_message(const std::wstring &message) {
function info_message (line 18) | void info_message(const std::string &message) {
function error_message (line 22) | void error_message(const std::wstring &message) {
function error_message (line 26) | void error_message(const std::string &message) {
function nvprefs_options (line 30) | nvprefs_options get_nvprefs_options() {
FILE: src/platform/windows/nvprefs/nvprefs_common.h
function namespace (line 17) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/nvprefs_interface.cpp
type nvprefs (line 20) | namespace nvprefs {
type nvprefs_interface::impl (line 22) | struct nvprefs_interface::impl {
FILE: src/platform/windows/nvprefs/nvprefs_interface.h
function namespace (line 10) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/undo_data.cpp
type nlohmann (line 16) | namespace nlohmann {
type adl_serializer<std::optional<T>> (line 21) | struct adl_serializer<std::optional<T>> {
method to_json (line 22) | static void to_json(json &j, const std::optional<T> &opt) {
method from_json (line 30) | static void from_json(const json &j, std::optional<T> &opt) {
type adl_serializer<data_t> (line 40) | struct adl_serializer<data_t> {
method to_json (line 41) | static void to_json(json &j, const data_t &data) {
method from_json (line 45) | static void from_json(const json &j, data_t &data) {
type adl_serializer<opengl_swapchain_t> (line 51) | struct adl_serializer<opengl_swapchain_t> {
method to_json (line 52) | static void to_json(json &j, const opengl_swapchain_t &opengl_swapch...
method from_json (line 59) | static void from_json(const json &j, opengl_swapchain_t &opengl_swap...
type nvprefs (line 66) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/undo_data.h
function namespace (line 13) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/undo_file.cpp
function DWORD (line 12) | DWORD relax_permissions(HANDLE file_handle) {
type nvprefs (line 50) | namespace nvprefs {
FILE: src/platform/windows/nvprefs/undo_file.h
function namespace (line 14) | namespace nvprefs {
FILE: src/platform/windows/publish.cpp
type _DNS_SERVICE_INSTANCE (line 44) | struct _DNS_SERVICE_INSTANCE {
type _DNS_SERVICE_CANCEL (line 75) | struct _DNS_SERVICE_CANCEL {
type _DNS_SERVICE_REGISTER_REQUEST (line 79) | struct _DNS_SERVICE_REGISTER_REQUEST {
type platf::publish (line 95) | namespace platf::publish {
function VOID (line 96) | VOID WINAPI register_cb(DWORD status, PVOID pQueryContext, PDNS_SERVIC...
function service (line 106) | static int service(bool enable, PDNS_SERVICE_INSTANCE &existing_instan...
class mdns_registration_t (line 172) | class mdns_registration_t: public ::platf::deinit_t {
method mdns_registration_t (line 174) | mdns_registration_t():
function load_funcs (line 199) | int load_funcs(HMODULE handle) {
function start (line 217) | std::unique_ptr<::platf::deinit_t> start() {
FILE: src/platform/windows/utils.cpp
function acpToUtf16 (line 10) | std::wstring acpToUtf16(const std::string& origStr) {
function utf16ToAcp (line 24) | std::string utf16ToAcp(const std::wstring& utf16Str) {
function utf8ToAcp (line 38) | std::string utf8ToAcp(const std::string& utf8Str) {
function acpToUtf8 (line 54) | std::string acpToUtf8(const std::string& origStr) {
function currentCodePageToCharset (line 72) | std::string currentCodePageToCharset() {
function get_error_string (line 114) | std::string
function query_display_config (line 145) | bool
function is_user_session_locked (line 184) | bool
function test_no_access_to_ccd_api (line 215) | bool
function is_changing_settings_going_to_fail (line 234) | bool
FILE: src/platform/windows/virtual_display.cpp
type VDISPLAY (line 19) | namespace VDISPLAY {
type positionwidthheight (line 26) | struct positionwidthheight
type coordinates (line 37) | struct coordinates
type coordinates (line 27) | struct coordinates
type coordinatesdifferences (line 28) | struct coordinatesdifferences
type coordinates (line 45) | struct coordinates
type coordinates (line 46) | struct coordinates
type coordinates (line 47) | struct coordinates
type coordinates (line 48) | struct coordinates
type coordinates (line 29) | struct coordinates
type positionwidthheight (line 35) | struct positionwidthheight
type coordinates (line 37) | struct coordinates
type coordinatesdifferences (line 43) | struct coordinatesdifferences
type coordinates (line 45) | struct coordinates
type coordinates (line 46) | struct coordinates
type coordinates (line 47) | struct coordinates
type coordinates (line 48) | struct coordinates
type positionwidthheight (line 53) | struct positionwidthheight
type coordinates (line 37) | struct coordinates
type positionwidthheight (line 53) | struct positionwidthheight
type coordinates (line 37) | struct coordinates
type positionwidthheight (line 54) | struct positionwidthheight
type coordinates (line 37) | struct coordinates
type coordinates (line 55) | struct coordinates
type coordinates (line 55) | struct coordinates
type coordinates (line 55) | struct coordinates
function LONG (line 59) | LONG getDeviceSettings(const wchar_t* deviceName, DEVMODEW& devMode) {
function LONG (line 64) | LONG changeDisplaySettings2(const wchar_t* deviceName, int width, int ...
function LONG (line 265) | LONG changeDisplaySettings(const wchar_t* deviceName, int width, int h...
function getPrimaryDisplay (line 312) | std::wstring getPrimaryDisplay() {
function setPrimaryDisplay (line 330) | bool setPrimaryDisplay(const wchar_t* primaryDeviceName) {
function findDisplayIds (line 386) | bool findDisplayIds(const wchar_t* displayName, LUID& adapterId, uint3...
function getDisplayHDR (line 425) | bool getDisplayHDR(const LUID& adapterLuid, const wchar_t* displayName) {
function setDisplayHDR (line 518) | bool setDisplayHDR(const LUID& adapterId, const uint32_t& targetId, bo...
function getDisplayHDRByName (line 529) | bool getDisplayHDRByName(const wchar_t* displayName) {
function setDisplayHDRByName (line 541) | bool setDisplayHDRByName(const wchar_t* displayName, bool enableAdvanc...
function closeVDisplayDevice (line 552) | void closeVDisplayDevice() {
function DRIVER_STATUS (line 562) | DRIVER_STATUS openVDisplayDevice() {
function startPingThread (line 588) | bool startPingThread(std::function<void()> failCb) {
function setRenderAdapterByName (line 624) | bool setRenderAdapterByName(const std::wstring& adapterName) {
function createVirtualDisplay (line 656) | std::wstring createVirtualDisplay(
function removeVirtualDisplay (line 691) | bool removeVirtualDisplay(const GUID& guid) {
function printAllDisplays (line 706) | std::string printAllDisplays(std::vector< struct positionwidthheight*>...
function moveToBeConnected (line 732) | std::vector < struct coordinates > moveToBeConnected(std::vector < str...
function rearrangeVirtualDisplayForLowerRight (line 914) | std::vector< struct positionwidthheight*>rearrangeVirtualDisplayForLow...
function matchDisplay (line 1177) | std::vector <std::wstring> matchDisplay(std::wstring sMatch) {
FILE: src/platform/windows/virtual_display.h
function namespace (line 14) | namespace VDISPLAY {
FILE: src/process.cpp
type proc (line 51) | namespace proc {
function onVDisplayWatchdogFailed (line 65) | void onVDisplayWatchdogFailed() {
function initVDisplayDriver (line 70) | void initVDisplayDriver() {
class deinit_t (line 81) | class deinit_t: public platf::deinit_t {
function init (line 88) | std::unique_ptr<platf::deinit_t> init() {
function terminate_process_group (line 92) | void terminate_process_group(boost::process::v1::child &proc, boost::p...
function find_working_directory (line 130) | boost::filesystem::path find_working_directory(const std::string &cmd,...
function find_match (line 859) | std::string_view::iterator find_match(std::string_view::iterator begin...
function parse_env_val (line 880) | std::string parse_env_val(boost::process::v1::native_environment &env,...
function validate_app_image_path (line 935) | std::string validate_app_image_path(std::string app_image_path) {
function calculate_sha256 (line 971) | std::optional<std::string> calculate_sha256(const std::string &filenam...
function calculate_crc32 (line 1006) | uint32_t calculate_crc32(const std::string &input) {
function calculate_app_id (line 1012) | std::tuple<std::string, std::string> calculate_app_id(const std::strin...
function migrate_apps (line 1063) | void migrate_apps(nlohmann::json* fileTree_p, nlohmann::json* inputTre...
function migration_v2 (line 1117) | void migration_v2(nlohmann::json& fileTree) {
function migrate (line 1216) | void migrate(nlohmann::json& fileTree, const std::string& fileName) {
function parse (line 1230) | std::optional<proc::proc_t> parse(const std::string &file_name) {
function refresh (line 1565) | void refresh(const std::string &file_name, bool needs_terminate) {
FILE: src/process.h
function namespace (line 42) | namespace proc {
FILE: src/round_robin.h
function namespace (line 15) | namespace round_robin_util {
function dec (line 164) | void dec() {
function eq (line 172) | bool eq(const round_robin_t &other) const {
FILE: src/rswrapper.c
function reed_solomon_init (line 124) | void reed_solomon_init(void) {
FILE: src/rswrapper.h
type reed_solomon (line 11) | typedef struct _reed_solomon reed_solomon;
type reed_solomon (line 13) | typedef reed_solomon *(*reed_solomon_new_t)(int data_shards, int parity_...
FILE: src/rtsp.cpp
type rtsp_stream (line 42) | namespace rtsp_stream {
function free_msg (line 43) | void free_msg(PRTSP_MESSAGE msg) {
type encrypted_rtsp_header_t (line 51) | struct encrypted_rtsp_header_t {
method payload_length (line 60) | std::uint32_t payload_length() {
method is_encrypted (line 64) | bool is_encrypted() {
class rtsp_server_t (line 80) | class rtsp_server_t
method bind (line 407) | int bind(net::af_e af, std::uint16_t port, boost::system::error_code...
method handle_msg (line 436) | void handle_msg(tcp::socket &sock, launch_session_t &session, msg_t ...
method handle_accept (line 448) | void handle_accept(const boost::system::error_code &ec) {
method map (line 482) | void map(const std::string_view &type, cmd_func_t cb) {
method session_raise (line 492) | void session_raise(std::shared_ptr<launch_session_t> launch_session) {
method session_clear (line 517) | void session_clear(uint32_t launch_session_id) {
method session_count (line 535) | int session_count() {
method clear (line 549) | void clear(bool all = true) {
method remove (line 569) | void remove(const std::shared_ptr<stream::session_t> &session) {
method insert (line 578) | void insert(const std::shared_ptr<stream::session_t> &session) {
method iterate (line 587) | void iterate() {
method stop (line 600) | void stop() {
method find_session (line 606) | std::shared_ptr<stream::session_t>
method get_all_session_uuids (line 619) | std::list<std::string>
class socket_t (line 89) | class socket_t: public std::enable_shared_from_this<socket_t> {
method socket_t (line 91) | socket_t(boost::asio::io_context &io_context, std::function<void(tcp...
method read (line 99) | void read() {
method handle_read_encrypted_header (line 133) | static void handle_read_encrypted_header(std::shared_ptr<socket_t> &...
method handle_read_encrypted_message (line 182) | static void handle_read_encrypted_message(std::shared_ptr<socket_t> ...
method read_plaintext_payload (line 244) | void read_plaintext_payload() {
method handle_plaintext_payload (line 273) | static void handle_plaintext_payload(std::shared_ptr<socket_t> &sock...
method handle_read_plaintext (line 343) | static void handle_read_plaintext(std::shared_ptr<socket_t> &socket,...
method handle_data (line 385) | void handle_data(msg_t &&req) {
class rtsp_server_t (line 401) | class rtsp_server_t {
method bind (line 407) | int bind(net::af_e af, std::uint16_t port, boost::system::error_code...
method handle_msg (line 436) | void handle_msg(tcp::socket &sock, launch_session_t &session, msg_t ...
method handle_accept (line 448) | void handle_accept(const boost::system::error_code &ec) {
method map (line 482) | void map(const std::string_view &type, cmd_func_t cb) {
method session_raise (line 492) | void session_raise(std::shared_ptr<launch_session_t> launch_session) {
method session_clear (line 517) | void session_clear(uint32_t launch_session_id) {
method session_count (line 535) | int session_count() {
method clear (line 549) | void clear(bool all = true) {
method remove (line 569) | void remove(const std::shared_ptr<stream::session_t> &session) {
method insert (line 578) | void insert(const std::shared_ptr<stream::session_t> &session) {
method iterate (line 587) | void iterate() {
method stop (line 600) | void stop() {
method find_session (line 606) | std::shared_ptr<stream::session_t>
method get_all_session_uuids (line 619) | std::list<std::string>
function launch_session_raise (line 645) | void launch_session_raise(std::shared_ptr<launch_session_t> launch_ses...
function launch_session_clear (line 649) | void launch_session_clear(uint32_t launch_session_id) {
function session_count (line 653) | int session_count() {
function find_session (line 660) | std::shared_ptr<stream::session_t> find_session(const std::string_view...
function get_all_session_uuids (line 664) | std::list<std::string> get_all_session_uuids() {
function terminate_sessions (line 668) | void terminate_sessions() {
function send (line 672) | int send(tcp::socket &sock, const std::string_view &sv) {
function respond (line 688) | void respond(tcp::socket &sock, launch_session_t &session, msg_t &resp) {
function respond (line 756) | void respond(tcp::socket &sock, launch_session_t &session, POPTION_ITE...
function cmd_not_found (line 763) | void cmd_not_found(tcp::socket &sock, launch_session_t &session, msg_t...
function cmd_option (line 767) | void cmd_option(rtsp_server_t *server, tcp::socket &sock, launch_sessi...
function cmd_describe (line 779) | void cmd_describe(rtsp_server_t *server, tcp::socket &sock, launch_ses...
function cmd_setup (line 862) | void cmd_setup(rtsp_server_t *server, tcp::socket &sock, launch_sessio...
function cmd_announce (line 921) | void cmd_announce(rtsp_server_t *server, tcp::socket &sock, launch_ses...
function cmd_play (line 1173) | void cmd_play(rtsp_server_t *server, tcp::socket &sock, launch_session...
function start (line 1185) | void start() {
function print_msg (line 1227) | void print_msg(PRTSP_MESSAGE msg) {
FILE: src/rtsp.h
function namespace (line 21) | namespace stream {
function namespace (line 25) | namespace rtsp_stream {
FILE: src/stat_trackers.cpp
type stat_trackers (line 8) | namespace stat_trackers {
function one_digit_after_decimal (line 10) | boost::format one_digit_after_decimal() {
function two_digits_after_decimal (line 14) | boost::format two_digits_after_decimal() {
FILE: src/stat_trackers.h
function namespace (line 15) | namespace stat_trackers {
FILE: src/stream.cpp
type stream (line 87) | namespace stream {
type socket_e (line 89) | enum class socket_e : int {
type video_short_frame_header_t (line 96) | struct video_short_frame_header_t {
type video_packet_raw_t (line 127) | struct video_packet_raw_t {
type video_packet_enc_prefix_t (line 138) | struct video_packet_enc_prefix_t {
type audio_packet_t (line 144) | struct audio_packet_t {
type control_header_v2 (line 148) | struct control_header_v2 {
type control_terminate_t (line 157) | struct control_terminate_t {
type control_rumble_t (line 163) | struct control_rumble_t {
type control_rumble_triggers_t (line 173) | struct control_rumble_triggers_t {
type control_set_motion_event_t (line 181) | struct control_set_motion_event_t {
type control_set_rgb_led_t (line 189) | struct control_set_rgb_led_t {
type control_adaptive_triggers_t (line 198) | struct control_adaptive_triggers_t {
type control_hdr_mode_t (line 213) | struct control_hdr_mode_t {
type control_encrypted_t (line 222) | struct control_encrypted_t {
type audio_fec_packet_t (line 236) | struct audio_fec_packet_t {
function round_to_pkcs7_padded (line 243) | constexpr std::size_t round_to_pkcs7_padded(std::size_t size) {
function encode_audio (line 257) | static inline int encode_audio(bool encrypted, const audio::buffer_t &...
function while_starting_do_nothing (line 267) | static inline void while_starting_do_nothing(std::atomic<session::stat...
class control_server_t (line 273) | class control_server_t {
method bind (line 275) | int bind(net::af_e address_family, std::uint16_t port) {
method map (line 302) | void map(uint16_t type, std::function<void(session_t *, const std::s...
method send (line 306) | int send(const std::string_view &payload, net::peer_t peer) {
method flush (line 317) | void flush() {
type broadcast_ctx_t (line 334) | struct broadcast_ctx_t {
type session_t (line 350) | struct session_t {
function encode_control (line 435) | static inline std::string_view encode_control(session_t *session, cons...
function session_t (line 490) | session_t *control_server_t::get_session(const net::peer_t peer, uint3...
type fec (line 618) | namespace fec {
type fec_t (line 623) | struct fec_t {
method size (line 644) | size_t size() const {
function fec_t (line 649) | static fec_t encode(const std::string_view &payload, size_t blocksiz...
method size (line 644) | size_t size() const {
function concat_and_insert (line 735) | std::vector<uint8_t> concat_and_insert(uint64_t insert_size, uint64_t ...
function replace (line 773) | std::vector<uint8_t> replace(const std::string_view &original, const s...
function send_feedback_msg (line 796) | int send_feedback_msg(session_t *session, platf::gamepad_feedback_msg_...
function send_hdr_mode (line 901) | int send_hdr_mode(session_t *session, video::hdr_info_t hdr_info) {
function controlBroadcastThread (line 930) | void controlBroadcastThread(control_server_t *server) {
function recvThread (line 1234) | void recvThread(broadcast_ctx_t &ctx) {
function videoBroadcastThread (line 1327) | void videoBroadcastThread(udp::socket &sock) {
function audioBroadcastThread (line 1651) | void audioBroadcastThread(udp::socket &sock) {
function start_broadcast (line 1755) | int start_broadcast(broadcast_ctx_t &ctx) {
function end_broadcast (line 1815) | void end_broadcast(broadcast_ctx_t &ctx) {
function recv_ping (line 1849) | int recv_ping(session_t *session, decltype(broadcast)::ptr_t ref, sock...
function videoThread (line 1902) | void videoThread(session_t *session) {
function audioThread (line 1923) | void audioThread(session_t *session) {
type session (line 1944) | namespace session {
function state_e (line 1947) | state_e state(session_t &session) {
function send (line 1951) | inline bool send(session_t& session, const std::string_view &payload) {
function uuid (line 1955) | std::string uuid(const session_t& session) {
function uuid_match (line 1959) | bool uuid_match(const session_t &session, const std::string_view& uu...
function update_device_info (line 1963) | bool update_device_info(session_t& session, const std::string& name,...
function stop (line 1981) | void stop(session_t &session) {
function graceful_stop (line 1992) | void graceful_stop(session_t& session) {
function join (line 2025) | void join(session_t &session) {
function start (line 2089) | int start(session_t &session, const std::string &addr_string) {
function alloc (line 2148) | std::shared_ptr<session_t> alloc(config_t &config, rtsp_stream::laun...
FILE: src/stream.h
function namespace (line 18) | namespace stream {
FILE: src/system_tray.cpp
type system_tray (line 62) | namespace system_tray {
function tray_open_ui_cb (line 70) | void tray_open_ui_cb([[maybe_unused]] struct tray_menu *item) {
function tray_force_stop_cb (line 75) | void
function tray_reset_display_device_config_cb (line 81) | void tray_reset_display_device_config_cb([[maybe_unused]] struct tray_...
function tray_restart_cb (line 87) | void tray_restart_cb([[maybe_unused]] struct tray_menu *item) {
function tray_quit_cb (line 94) | void tray_quit_cb([[maybe_unused]] struct tray_menu *item) {
type tray (line 112) | struct tray
type tray_menu (line 116) | struct tray_menu
function init_tray (line 143) | int init_tray() {
function process_tray_events (line 216) | int process_tray_events() {
function end_tray (line 230) | int end_tray() {
function update_tray_playing (line 238) | void update_tray_playing(std::string app_name) {
function update_tray_pausing (line 267) | void update_tray_pausing(std::string app_name) {
function update_tray_stopped (line 291) | void update_tray_stopped(std::string app_name) {
function update_tray_launch_error (line 316) | void
function update_tray_require_pin (line 345) | void update_tray_require_pin() {
function update_tray_paired (line 367) | void
function update_tray_client_connected (line 390) | void
function tray_thread_worker (line 415) | static void tray_thread_worker() {
function init_tray_threaded (line 444) | int init_tray_threaded() {
function end_tray_threaded (line 499) | int end_tray_threaded() {
FILE: src/system_tray.h
function namespace (line 10) | namespace system_tray {
FILE: src/task_pool.h
function namespace (line 22) | namespace task_pool_util {
FILE: src/thread_pool.h
function namespace (line 13) | namespace thread_pool_util {
FILE: src/thread_safe.h
function peek (line 119) | bool peek() {
function status_t (line 145) | status_t _status {util::false_v<status_t>};
function ring (line 156) | void ring(const status_t &status) {
function ring (line 164) | void ring(status_t &&status) {
function reset (line 231) | void reset() {
function _rang (line 241) | bool _rang {false};
function peek (line 278) | bool peek() {
function stop (line 327) | void stop() {
function ptr_t (line 357) | struct ptr_t {
function release (line 413) | void release() {
function cleanup (line 538) | void cleanup() {
function cleanup (line 557) | inline void cleanup(mail_raw_t *mail) {
FILE: src/upnp.cpp
type upnp (line 27) | namespace upnp {
type mapping_t (line 29) | struct mapping_t {
function status_string (line 39) | static std::string_view status_string(int status) {
function UPNP_GetValidIGDStatus (line 58) | int UPNP_GetValidIGDStatus(device_t &device, urls_t *urls, IGDdatas *d...
class deinit_t (line 66) | class deinit_t: public platf::deinit_t {
method deinit_t (line 68) | deinit_t() {
method create_ipv6_pinholes (line 104) | bool create_ipv6_pinholes() {
method map_upnp_port (line 173) | bool map_upnp_port(const IGDdatas &data, const urls_t &urls, const s...
method unmap_all_upnp_ports (line 281) | void unmap_all_upnp_ports(const urls_t &urls, const IGDdatas &data) {
method upnp_thread_proc (line 302) | void upnp_thread_proc() {
function start (line 369) | std::unique_ptr<platf::deinit_t> start() {
FILE: src/upnp.h
function namespace (line 16) | namespace upnp {
FILE: src/utility.h
type U (line 33) | typedef U type;
function namespace (line 127) | namespace util {
function disable (line 188) | void disable() {
function failure (line 192) | bool failure {true};
function string (line 299) | string log_hex(const T &value) {
function is_convertable (line 356) | auto is_convertable = [](char ch) -> bool {
function convert (line 375) | auto convert = [](char ch) -> std::uint8_t {
function is_convertable (line 410) | auto is_convertable = [](char ch) -> bool {
function convert (line 429) | auto convert = [](char ch) -> std::uint8_t {
function has_left (line 529) | constexpr bool has_left() const {
function X (line 545) | const X &left() const {
function _p (line 567) | constexpr uniq_ptr(std::nullptr_t) noexcept:
function reset (line 613) | void reset(pointer p = pointer()) {
function pointer (line 621) | pointer release() {
function pointer (line 627) | pointer get() {
function const_reference (line 805) | const_reference operator*() const {
function reference (line 809) | reference operator*() {
function const_pointer (line 813) | const_pointer operator->() const {
function pointer (line 817) | pointer operator->() {
function explicit (line 890) | explicit buffer_t(size_t elements, const T &t):
function string_view (line 983) | string_view view(It begin, It end) {
FILE: src/uuid.h
function namespace (line 14) | namespace uuid_util {
function uuid_t (line 35) | static uuid_t generate() {
FILE: src/video.cpp
type video (line 43) | namespace video {
function allow_encoder_probing (line 49) | bool allow_encoder_probing() {
function free_ctx (line 84) | void free_ctx(AVCodecContext *ctx) {
function free_frame (line 88) | void free_frame(AVFrame *frame) {
function free_buffer (line 92) | void free_buffer(AVBufferRef *ref) {
type nv (line 96) | namespace nv {
type profile_h264_e (line 98) | enum class profile_h264_e : int {
type profile_hevc_e (line 103) | enum class profile_hevc_e : int {
type qsv (line 111) | namespace qsv {
type profile_h264_e (line 113) | enum class profile_h264_e : int {
type profile_hevc_e (line 118) | enum class profile_hevc_e : int {
type profile_av1_e (line 124) | enum class profile_av1_e : int {
class avcodec_software_encode_device_t (line 136) | class avcodec_software_encode_device_t: public platf::avcodec_encode_d...
method convert (line 138) | int convert(platf::img_t &img) override {
method set_frame (line 184) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override {
method apply_colorspace (line 201) | void apply_colorspace() override {
method prefill (line 209) | void prefill() {
method init (line 217) | int init(int in_width, int in_height, AVFrame *frame, AVPixelFormat ...
type flag_e (line 300) | enum flag_e : uint32_t {
class avcodec_encode_session_t (line 315) | class avcodec_encode_session_t: public encode_session_t {
method avcodec_encode_session_t (line 317) | avcodec_encode_session_t() = default;
method avcodec_encode_session_t (line 319) | avcodec_encode_session_t(avcodec_ctx_t &&avcodec_ctx, std::unique_pt...
method avcodec_encode_session_t (line 325) | avcodec_encode_session_t(avcodec_encode_session_t &&other) noexcept ...
method avcodec_encode_session_t (line 340) | avcodec_encode_session_t &operator=(avcodec_encode_session_t &&other) {
method convert (line 352) | int convert(platf::img_t &img) override {
method request_idr_frame (line 359) | void request_idr_frame() override {
method request_normal_frame (line 367) | void request_normal_frame() override {
method invalidate_ref_frames (line 375) | void invalidate_ref_frames(int64_t first_frame, int64_t last_frame) ...
class nvenc_encode_session_t (line 392) | class nvenc_encode_session_t: public encode_session_t {
method nvenc_encode_session_t (line 394) | nvenc_encode_session_t(std::unique_ptr<platf::nvenc_encode_device_t>...
method convert (line 398) | int convert(platf::img_t &img) override {
method request_idr_frame (line 405) | void request_idr_frame() override {
method request_normal_frame (line 409) | void request_normal_frame() override {
method invalidate_ref_frames (line 413) | void invalidate_ref_frames(int64_t first_frame, int64_t last_frame) ...
method encode_frame (line 423) | nvenc::nvenc_encoded_frame encode_frame(uint64_t frame_index) {
type sync_session_ctx_t (line 438) | struct sync_session_ctx_t {
type sync_session_t (line 451) | struct sync_session_t {
type capture_ctx_t (line 459) | struct capture_ctx_t {
type capture_thread_async_ctx_t (line 464) | struct capture_thread_async_ctx_t {
type capture_thread_sync_ctx_t (line 473) | struct capture_thread_sync_ctx_t {
function encoder_t (line 526) | encoder_t nvenc {
function dxgi_init_avcodec_hardware_input_buffer (line 2960) | util::Either<avcodec_buffer_t, int> dxgi_init_avcodec_hardware_input_b...
function start_capture_async (line 2987) | int start_capture_async(capture_thread_async_ctx_t &capture_thread_ctx) {
function end_capture_async (line 3004) | void end_capture_async(capture_thread_async_ctx_t &capture_thread_ctx) {
function start_capture_sync (line 3010) | int start_capture_sync(capture_thread_sync_ctx_t &ctx) {
function end_capture_sync (line 3015) | void end_capture_sync(capture_thread_sync_ctx_t &ctx) {
function map_base_dev_type (line 3018) | platf::mem_type_e map_base_dev_type(AVHWDeviceType type) {
function map_pix_fmt (line 3037) | platf::pix_fmt_e map_pix_fmt(AVPixelFormat fmt) {
function vaapi_init_avcodec_hardware_input_buffer (line 2903) | util::Either<avcodec_buffer_t, int> vaapi_init_avcodec_hardware_input_bu...
function cuda_init_avcodec_hardware_input_buffer (line 2927) | util::Either<avcodec_buffer_t, int> cuda_init_avcodec_hardware_input_buf...
function vt_init_avcodec_hardware_input_buffer (line 2940) | util::Either<avcodec_buffer_t, int> vt_init_avcodec_hardware_input_buffe...
function do_nothing (line 2956) | void do_nothing(void *) {
type video (line 2959) | namespace video {
function allow_encoder_probing (line 49) | bool allow_encoder_probing() {
function free_ctx (line 84) | void free_ctx(AVCodecContext *ctx) {
function free_frame (line 88) | void free_frame(AVFrame *frame) {
function free_buffer (line 92) | void free_buffer(AVBufferRef *ref) {
type nv (line 96) | namespace nv {
type profile_h264_e (line 98) | enum class profile_h264_e : int {
type profile_hevc_e (line 103) | enum class profile_hevc_e : int {
type qsv (line 111) | namespace qsv {
type profile_h264_e (line 113) | enum class profile_h264_e : int {
type profile_hevc_e (line 118) | enum class profile_hevc_e : int {
type profile_av1_e (line 124) | enum class profile_av1_e : int {
class avcodec_software_encode_device_t (line 136) | class avcodec_software_encode_device_t: public platf::avcodec_encode_d...
method convert (line 138) | int convert(platf::img_t &img) override {
method set_frame (line 184) | int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override {
method apply_colorspace (line 201) | void apply_colorspace() override {
method prefill (line 209) | void prefill() {
method init (line 217) | int init(int in_width, int in_height, AVFrame *frame, AVPixelFormat ...
type flag_e (line 300) | enum flag_e : uint32_t {
class avcodec_encode_session_t (line 315) | class avcodec_encode_session_t: public encode_session_t {
method avcodec_encode_session_t (line 317) | avcodec_encode_session_t() = default;
method avcodec_encode_session_t (line 319) | avcodec_encode_session_t(avcodec_ctx_t &&avcodec_ctx, std::unique_pt...
method avcodec_encode_session_t (line 325) | avcodec_encode_session_t(avcodec_encode_session_t &&other) noexcept ...
method avcodec_encode_session_t (line 340) | avcodec_encode_session_t &operator=(avcodec_encode_session_t &&other) {
method convert (line 352) | int convert(platf::img_t &img) override {
method request_idr_frame (line 359) | void request_idr_frame() override {
method request_normal_frame (line 367) | void request_normal_frame() override {
method invalidate_ref_frames (line 375) | void invalidate_ref_frames(int64_t first_frame, int64_t last_frame) ...
class nvenc_encode_session_t (line 392) | class nvenc_encode_session_t: public encode_session_t {
method nvenc_encode_session_t (line 394) | nvenc_encode_session_t(std::unique_ptr<platf::nvenc_encode_device_t>...
method convert (line 398) | int convert(platf::img_t &img) override {
method request_idr_frame (line 405) | void request_idr_frame() override {
method request_normal_frame (line 409) | void request_normal_frame() override {
method invalidate_ref_frames (line 413) | void invalidate_ref_frames(int64_t first_frame, int64_t last_frame) ...
method encode_frame (line 423) | nvenc::nvenc_encoded_frame encode_frame(uint64_t frame_index) {
type sync_session_ctx_t (line 438) | struct sync_session_ctx_t {
type sync_session_t (line 451) | struct sync_session_t {
type capture_ctx_t (line 459) | struct capture_ctx_t {
type capture_thread_async_ctx_t (line 464) | struct capture_thread_async_ctx_t {
type capture_thread_sync_ctx_t (line 473) | struct capture_thread_sync_ctx_t {
function encoder_t (line 526) | encoder_t nvenc {
function dxgi_init_avcodec_hardware_input_buffer (line 2960) | util::Either<avcodec_buffer_t, int> dxgi_init_avcodec_hardware_input_b...
function start_capture_async (line 2987) | int start_capture_async(capture_thread_async_ctx_t &capture_thread_ctx) {
function end_capture_async (line 3004) | void end_capture_async(capture_thread_async_ctx_t &capture_thread_ctx) {
function start_capture_sync (line 3010) | int start_capture_sync(capture_thread_sync_ctx_t &ctx) {
function end_capture_sync (line 3015) | void end_capture_sync(capture_thread_sync_ctx_t &ctx) {
function map_base_dev_type (line 3018) | platf::mem_type_e map_base_dev_type(AVHWDeviceType type) {
function map_pix_fmt (line 3037) | platf::pix_fmt_e map_pix_fmt(AVPixelFormat fmt) {
FILE: src/video.h
type AVPacket (line 18) | struct AVPacket
function namespace (line 20) | namespace video {
function encoder_platform_formats_t (line 109) | struct encoder_platform_formats_nvenc: encoder_platform_formats_t {
type encoder_t (line 125) | struct encoder_t {
type option_t (line 154) | struct option_t {
function codec_t (line 189) | const codec_t &codec_from_config(const config_t &config) const {
type encode_session_t (line 206) | struct encode_session_t {
function packet_raw_avcodec (line 238) | struct packet_raw_t {
function is_idr (line 276) | bool is_idr() override {
function frame_index (line 280) | int64_t frame_index() override {
function data_size (line 288) | size_t data_size() override {
function packet_raw_t (line 295) | struct packet_raw_generic: packet_raw_t {
FILE: src/video_colorspace.cpp
type video (line 16) | namespace video {
function colorspace_is_hdr (line 18) | bool colorspace_is_hdr(const sunshine_colorspace_t &colorspace) {
function sunshine_colorspace_t (line 22) | sunshine_colorspace_t colorspace_from_client_config(const config_t &co...
function avcodec_colorspace_t (line 81) | avcodec_colorspace_t avcodec_colorspace_from_sunshine_colorspace(const...
function color_t (line 125) | const color_t *color_vectors_from_colorspace(const sunshine_colorspace...
function color_t (line 129) | const color_t *color_vectors_from_colorspace(colorspace_e colorspace, ...
function color_t (line 183) | const color_t *new_color_vectors_from_colorspace(const sunshine_colors...
FILE: src/video_colorspace.h
function namespace (line 11) | namespace video {
FILE: src/zwpad.h
function namespace (line 7) | namespace zwpad
FILE: src_assets/common/assets/web/apollo_version.js
class ApolloVersion (line 1) | class ApolloVersion {
method constructor (line 2) | constructor(release = null, version = null) {
method parseVersion (line 23) | parseVersion(version) {
method isGreater (line 47) | isGreater(otherVersion, checkIncremental) {
FILE: src_assets/common/assets/web/init.js
function initApp (line 8) | function initApp(app, config) {
FILE: src_assets/common/assets/web/platform-i18n.js
class PlatformMessageI18n (line 3) | class PlatformMessageI18n {
method constructor (line 7) | constructor(platform) {
method getPlatformKey (line 16) | getPlatformKey(key, platform) {
method getMessageUsingPlatform (line 25) | getMessageUsingPlatform(key, defaultMsg) {
function usePlatformI18n (line 56) | function usePlatformI18n(platform) {
function $tp (line 77) | function $tp(key, defaultMsg) {
FILE: src_assets/common/assets/web/theme.js
function setupThemeToggleListener (line 53) | function setupThemeToggleListener() {
function loadAutoTheme (line 67) | function loadAutoTheme() {
FILE: tests/integration/test_config_consistency.cpp
class ConfigConsistencyTest (line 23) | class ConfigConsistencyTest: public ::testing::Test {
method SetUp (line 25) | void SetUp() override {
method extractConfigCppOptions (line 44) | static std::set<std::string, std::less<>> extractConfigCppOptions() {
method findClosingBrace (line 72) | static size_t findClosingBrace(const std::string &content, const size_...
method extractTabId (line 89) | static std::string extractTabId(const std::string &tabObject) {
method extractTabsContent (line 100) | static std::string extractTabsContent(const std::string &content) {
method extractOptionsFromTabGeneric (line 126) | static void extractOptionsFromTabGeneric(const std::string &tabObject,...
method processTabObjects (line 163) | static void processTabObjects(const std::string &tabsContent, Containe...
method trimWhitespace (line 181) | static void trimWhitespace(std::string &str) {
method extractOptionFromMarkdownLine (line 186) | static std::string extractOptionFromMarkdownLine(const std::string &li...
method extractConfigHtmlOptions (line 197) | static std::map<std::string, std::string, std::less<>> extractConfigHt...
method extractOptionsFromTab (line 211) | static void extractOptionsFromTab(const std::string &tabObject, std::m...
method extractConfigHtmlOptionsWithOrder (line 216) | static std::map<std::string, std::vector<std::string>, std::less<>> ex...
method processSectionHeader (line 230) | static bool processSectionHeader(const std::string &line, std::string ...
method processOptionHeader (line 243) | static bool processOptionHeader(const std::string &line, const std::st...
method extractConfigMdOptions (line 257) | static std::map<std::string, std::string, std::less<>> extractConfigMd...
method processMarkdownOptionLine (line 277) | static void processMarkdownOptionLine(const std::string &line, const s...
method extractConfigMdOptionsWithOrder (line 288) | static std::map<std::string, std::vector<std::string>, std::less<>> ex...
method findConfigSectionEnd (line 308) | static size_t findConfigSectionEnd(const std::string &content, size_t ...
method extractKeysFromConfigSection (line 326) | static void extractKeysFromConfigSection(const std::string_view config...
method extractEnJsonConfigOptions (line 337) | static std::set<std::string, std::less<>> extractEnJsonConfigOptions() {
method isOptionInHtml (line 362) | static bool isOptionInHtml(const std::string &option, const std::map<s...
method isOptionInMd (line 367) | static bool isOptionInMd(const std::string &option, const std::map<std...
method validateOptionExistence (line 372) | static void validateOptionExistence(const std::string &option, const s...
method checkTabCorrespondence (line 387) | static void checkTabCorrespondence(const std::string &tab, const std::...
method checkTestDummyDetection (line 408) | static void checkTestDummyDetection(const std::vector<std::string> &mi...
method buildCommaSeparatedString (line 427) | static std::string buildCommaSeparatedString(const std::vector<std::st...
function TEST_F (line 439) | TEST_F(ConfigConsistencyTest, AllConfigOptionsExistInAllFiles) {
function TEST_F (line 470) | TEST_F(ConfigConsistencyTest, ConfigTabsMatchDocumentationSections) {
function TEST_F (line 509) | TEST_F(ConfigConsistencyTest, ConfigOptionsInSameOrderWithinSections) {
function TEST_F (line 569) | TEST_F(ConfigConsistencyTest, DummyConfigOptionsDoNotExist) {
function TEST_F (line 616) | TEST_F(ConfigConsistencyTest, TestFrameworkDetectsMissingOptions) {
FILE: tests/integration/test_external_commands.cpp
type ExternalCommandTestData (line 20) | struct ExternalCommandTestData {
method ExternalCommandTestData (line 30) | ExternalCommandTestData(std::string cmd, std::string plat, const bool ...
class ExternalCommandTest (line 40) | class ExternalCommandTest: public ::testing::TestWithParam<ExternalComma...
method SetUp (line 42) | void SetUp() override {
method shouldRunOnCurrentPlatform (line 52) | [[nodiscard]] bool shouldRunOnCurrentPlatform(const std::string_view &...
method runCommand (line 57) | static std::pair<int, std::string> runCommand(const std::string &cmd, ...
function TEST_P (line 117) | TEST_P(ExternalCommandTest, RunExternalCommand) {
FILE: tests/integration/test_locale_consistency.cpp
class LocaleConsistencyTest (line 26) | class LocaleConsistencyTest: public ::testing::Test {
method extractConfigCppLocales (line 29) | static std::set<std::string, std::less<>> extractConfigCppLocales() {
method extractGeneralVueLocales (line 52) | static std::map<std::string, std::string, std::less<>> extractGeneralV...
method getAvailableLocaleFiles (line 77) | static std::set<std::string, std::less<>> getAvailableLocaleFiles() {
method isValidLocaleFile (line 96) | static bool isValidLocaleFile(const std::string &localeCode) {
function TEST_F (line 117) | TEST_F(LocaleConsistencyTest, AllLocaleFilesHaveConfigCppEntries) {
function TEST_F (line 139) | TEST_F(LocaleConsistencyTest, AllLocaleFilesHaveGeneralVueEntries) {
function TEST_F (line 161) | TEST_F(LocaleConsistencyTest, AllConfigCppLocalesHaveFiles) {
function TEST_F (line 183) | TEST_F(LocaleConsistencyTest, AllGeneralVueLocalesHaveFiles) {
function TEST_F (line 205) | TEST_F(LocaleConsistencyTest, ConfigCppAndGeneralVueLocalesMatch) {
function TEST_F (line 247) | TEST_F(LocaleConsistencyTest, AllLocaleFilesAreValid) {
function TEST_F (line 267) | TEST_F(LocaleConsistencyTest, LocaleDisplayNamesAreConsistent) {
function TEST_F (line 299) | TEST_F(LocaleConsistencyTest, NoOrphanedLocaleReferences) {
function TEST_F (line 328) | TEST_F(LocaleConsistencyTest, TestFrameworkDetectsLocaleInconsistencies) {
FILE: tests/tests_common.h
function namespace (line 12) | namespace test_utils {
function Test (line 129) | struct PlatformTestSuite: testing::Test {
FILE: tests/tests_environment.h
function Environment (line 8) | struct SunshineEnvironment: testing::Environment {
FILE: tests/tests_events.h
function EmptyTestEventListener (line 8) | struct SunshineEventListener: testing::EmptyTestEventListener {
FILE: tests/tests_log_checker.h
function namespace (line 13) | namespace log_checker {
FILE: tests/tests_main.cpp
function main (line 9) | int main(int argc, char **argv) {
FILE: tests/unit/platform/test_common.cpp
type SetEnvTest (line 10) | struct SetEnvTest: ::testing::TestWithParam<std::tuple<std::string, std:...
method TearDown (line 12) | void TearDown() override {
function TEST_P (line 19) | TEST_P(SetEnvTest, SetEnvironmentVariableTests) {
function TEST_P (line 32) | TEST_P(SetEnvTest, UnsetEnvironmentVariableTests) {
function TEST (line 52) | TEST(HostnameTests, TestAsioEquality) {
FILE: tests/unit/test_audio.cpp
type AudioTest (line 11) | struct AudioTest: PlatformTestSuite, testing::WithParamInterface<std::tu...
method SetUp (line 12) | void SetUp() override {
function config_flags (line 21) | constexpr std::bitset<config_t::MAX_FLAGS> config_flags(const int flag =...
function TEST_P (line 43) | TEST_P(AudioTest, TestEncode) {
FILE: tests/unit/test_display_device.cpp
type failed_to_parse_resolution_tag_t (line 25) | struct failed_to_parse_resolution_tag_t {}
type failed_to_parse_refresh_rate_tag_t (line 27) | struct failed_to_parse_refresh_rate_tag_t {}
type no_refresh_rate_tag_t (line 29) | struct no_refresh_rate_tag_t {}
type no_resolution_tag_t (line 31) | struct no_resolution_tag_t {}
type client_resolution_t (line 33) | struct client_resolution_t {
type DisplayDeviceConfigTest (line 46) | struct DisplayDeviceConfigTest: testing::TestWithParam<T> {}
function TEST_P (line 60) | TEST_P(ParseDeviceId, IntegrationTest) {
function TEST_P (line 84) | TEST_P(ParseConfigOption, IntegrationTest) {
function TEST_P (line 110) | TEST_P(ParseHdrOption, IntegrationTest) {
function TEST_P (line 176) | TEST_P(ParseResolutionOption, IntegrationTest) {
function TEST_P (line 260) | TEST_P(ParseRefreshRateOption, IntegrationTest) {
type no_value_t (line 295) | struct no_value_t {}
type auto_value_t (line 298) | struct auto_value_t {
type manual_value_t (line 303) | struct manual_value_t {
type failed_to_remap_t (line 310) | struct failed_to_remap_t {}
type final_values_t (line 312) | struct final_values_t {
function TEST_P (line 458) | TEST_P(DisplayModeRemapping, IntegrationTest) {
FILE: tests/unit/test_entry_handler.cpp
function TEST (line 10) | TEST(EntryHandlerTests, LogPublisherDataTest) {
FILE: tests/unit/test_file_handler.cpp
type FileHandlerParentDirectoryTest (line 10) | struct FileHandlerParentDirectoryTest: testing::TestWithParam<std::tuple...
function TEST_P (line 12) | TEST_P(FileHandlerParentDirectoryTest, Run) {
type FileHandlerMakeDirectoryTest (line 27) | struct FileHandlerMakeDirectoryTest: testing::TestWithParam<std::tuple<s...
function TEST_P (line 29) | TEST_P(FileHandlerMakeDirectoryTest, Run) {
type FileHandlerTests (line 55) | struct FileHandlerTests: testing::TestWithParam<std::tuple<int, std::str...
function TEST_P (line 81) | TEST_P(FileHandlerTests, WriteFileTest) {
function TEST_P (line 87) | TEST_P(FileHandlerTests, ReadFileTest) {
function TEST (line 93) | TEST(FileHandlerTests, ReadMissingFileTest) {
FILE: tests/unit/test_http_pairing.cpp
type pairing_input (line 12) | struct pairing_input {
type pairing_output (line 25) | struct pairing_output {
type PairingTest (line 79) | struct PairingTest: testing::TestWithParam<std::tuple<pairing_input, pai...
function TEST_P (line 81) | TEST_P(PairingTest, Run) {
function TEST (line 242) | TEST(PairingTest, OutOfOrderCalls) {
FILE: tests/unit/test_httpcommon.cpp
type UrlEscapeTest (line 14) | struct UrlEscapeTest: testing::TestWithParam<std::tuple<std::string, std...
function TEST_P (line 16) | TEST_P(UrlEscapeTest, Run) {
type UrlGetHostTest (line 31) | struct UrlGetHostTest: testing::TestWithParam<std::tuple<std::string, st...
function TEST_P (line 33) | TEST_P(UrlGetHostTest, Run) {
type DownloadFileTest (line 48) | struct DownloadFileTest: testing::TestWithParam<std::tuple<std::string, ...
function TEST_P (line 50) | TEST_P(DownloadFileTest, Run) {
FILE: tests/unit/test_logging.cpp
type LogLevelsTest (line 25) | struct LogLevelsTest: testing::TestWithParam<decltype(log_levels)::value...
function TEST_P (line 36) | TEST_P(LogLevelsTest, PutMessage) {
FILE: tests/unit/test_mouse.cpp
type MouseHIDTest (line 9) | struct MouseHIDTest: PlatformTestSuite, testing::WithParamInterface<util...
method SetUp (line 10) | void SetUp() override {
method TearDown (line 22) | void TearDown() override {
function TEST_P (line 38) | TEST_P(MouseHIDTest, MoveInputTest) {
function TEST_P (line 73) | TEST_P(MouseHIDTest, AbsMoveInputTest) {
FILE: tests/unit/test_network.cpp
type MdnsInstanceNameTest (line 9) | struct MdnsInstanceNameTest: testing::TestWithParam<std::tuple<std::stri...
function TEST_P (line 11) | TEST_P(MdnsInstanceNameTest, Run) {
FILE: tests/unit/test_rswrapper.cpp
function TEST (line 11) | TEST(ReedSolomonWrapperTests, InitTest) {
function TEST (line 21) | TEST(ReedSolomonWrapperTests, EncodeTest) {
FILE: tests/unit/test_stream.cpp
type stream (line 11) | namespace stream {
function TEST (line 17) | TEST(ConcatAndInsertTests, ConcatNoInsertionTest) {
function TEST (line 25) | TEST(ConcatAndInsertTests, ConcatLargeStrideTest) {
function TEST (line 33) | TEST(ConcatAndInsertTests, ConcatSmallStrideTest) {
FILE: tests/unit/test_video.cpp
type EncoderTest (line 9) | struct EncoderTest: PlatformTestSuite, testing::WithParamInterface<video...
method SetUp (line 10) | void SetUp() override {
function TEST_P (line 48) | TEST_P(EncoderTest, ValidateEncoder) {
FILE: third-party/glad/include/EGL/eglplatform.h
type HDC (line 63) | typedef HDC EGLNativeDisplayType;
type HBITMAP (line 64) | typedef HBITMAP EGLNativePixmapType;
type HWND (line 65) | typedef HWND EGLNativeWindowType;
type EGLNativeDisplayType (line 69) | typedef int EGLNativeDisplayType;
type EGLNativePixmapType (line 70) | typedef int EGLNativePixmapType;
type EGLNativeWindowType (line 71) | typedef int EGLNativeWindowType;
type EGLNativeDisplayType (line 75) | typedef int EGLNativeDisplayType;
type wl_display (line 81) | struct wl_display
type wl_egl_pixmap (line 82) | struct wl_egl_pixmap
type wl_egl_window (line 83) | struct wl_egl_window
type gbm_device (line 87) | struct gbm_device
type gbm_bo (line 88) | struct gbm_bo
type ANativeWindow (line 93) | struct ANativeWindow
type egl_native_pixmap_t (line 94) | struct egl_native_pixmap_t
type egl_native_pixmap_t (line 97) | struct egl_native_pixmap_t
type ANativeWindow (line 98) | struct ANativeWindow
type EGLNativeDisplayType (line 102) | typedef intptr_t EGLNativeDisplayType;
type EGLNativePixmapType (line 103) | typedef intptr_t EGLNativePixmapType;
type EGLNativeWindowType (line 104) | typedef intptr_t EGLNativeWindowType;
type khronos_uintptr_t (line 109) | typedef khronos_uintptr_t EGLNativePixmapType;
type khronos_uintptr_t (line 110) | typedef khronos_uintptr_t EGLNativeWindowType;
type Display (line 118) | typedef Display *EGLNativeDisplayType;
type Pixmap (line 119) | typedef Pixmap EGLNativePixmapType;
type Window (line 120) | typedef Window EGLNativeWindowType;
type EGLNativeDisplayType (line 124) | typedef int EGLNativeDisplayType;
type khronos_uintptr_t (line 133) | typedef khronos_uintptr_t EGLNativePixmapType;
type khronos_uintptr_t (line 134) | typedef khronos_uintptr_t EGLNativeWindowType;
type khronos_uintptr_t (line 139) | typedef khronos_uintptr_t EGLNativePixmapType;
type khronos_uintptr_t (line 140) | typedef khronos_uintptr_t EGLNativeWindowType;
type EGLNativeDisplayType (line 147) | typedef EGLNativeDisplayType NativeDisplayType;
type EGLNativePixmapType (line 148) | typedef EGLNativePixmapType NativePixmapType;
type EGLNativeWindowType (line 149) | typedef EGLNativeWindowType NativeWindowType;
type khronos_int32_t (line 158) | typedef khronos_int32_t EGLint;
FILE: third-party/glad/include/KHR/khrplatform.h
type khronos_int32_t (line 149) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 150) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 151) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 152) | typedef uint64_t khronos_uint64_t;
type khronos_int32_t (line 162) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 163) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 164) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 165) | typedef uint64_t khronos_uint64_t;
type __int32 (line 174) | typedef __int32 khronos_int32_t;
type khronos_uint32_t (line 175) | typedef unsigned __int32 khronos_uint32_t;
type __int64 (line 176) | typedef __int64 khronos_int64_t;
type khronos_uint64_t (line 177) | typedef unsigned __int64 khronos_uint64_t;
type khronos_int32_t (line 186) | typedef int khronos_int32_t;
type khronos_uint32_t (line 187) | typedef unsigned int khronos_uint32_t;
type khronos_int64_t (line 189) | typedef long int khronos_int64_t;
type khronos_uint64_t (line 190) | typedef unsigned long int khronos_uint64_t;
type khronos_int64_t (line 192) | typedef long long int khronos_int64_t;
type khronos_uint64_t (line 193) | typedef unsigned long long int khronos_uint64_t;
type khronos_int32_t (line 203) | typedef int khronos_int32_t;
type khronos_uint32_t (line 204) | typedef unsigned int khronos_uint32_t;
type khronos_int32_t (line 214) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 215) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 216) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 217) | typedef uint64_t khronos_uint64_t;
type khronos_int8_t (line 226) | typedef signed char khronos_int8_t;
type khronos_uint8_t (line 227) | typedef unsigned char khronos_uint8_t;
type khronos_int16_t (line 228) | typedef signed short int khronos_int16_t;
type khronos_uint16_t (line 229) | typedef unsigned short int khronos_uint16_t;
type khronos_intptr_t (line 237) | typedef signed long long int khronos_intptr_t;
type khronos_uintptr_t (line 238) | typedef unsigned long long int khronos_uintptr_t;
type khronos_ssize_t (line 239) | typedef signed long long int khronos_ssize_t;
type khronos_usize_t (line 240) | typedef unsigned long long int khronos_usize_t;
type khronos_intptr_t (line 242) | typedef signed long int khronos_intptr_t;
type khronos_uintptr_t (line 243) | typedef unsigned long int khronos_uintptr_t;
type khronos_ssize_t (line 244) | typedef signed long int khronos_ssize_t;
type khronos_usize_t (line 245) | typedef unsigned long int khronos_usize_t;
type khronos_float_t (line 252) | typedef float khronos_float_t;
type khronos_uint64_t (line 265) | typedef khronos_uint64_t khronos_utime_nanoseconds_t;
type khronos_int64_t (line 266) | typedef khronos_int64_t khronos_stime_nanoseconds_t;
type khronos_boolean_enum_t (line 282) | typedef enum {
FILE: third-party/glad/include/glad/egl.h
type GLADapiproc (line 144) | typedef GLADapiproc (*GLADloadfunc)(const char *name);
type GLADapiproc (line 145) | typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *na...
type AHardwareBuffer (line 322) | struct AHardwareBuffer
type wl_buffer (line 324) | struct wl_buffer
type wl_display (line 326) | struct wl_display
type wl_resource (line 328) | struct wl_resource
type EGLBoolean (line 330) | typedef unsigned int EGLBoolean;
type EGLenum (line 332) | typedef unsigned int EGLenum;
type EGLAttribKHR (line 334) | typedef intptr_t EGLAttribKHR;
type EGLAttrib (line 336) | typedef intptr_t EGLAttrib;
type khronos_utime_nanoseconds_t (line 372) | typedef khronos_utime_nanoseconds_t EGLTimeKHR;
type khronos_utime_nanoseconds_t (line 374) | typedef khronos_utime_nanoseconds_t EGLTime;
type khronos_utime_nanoseconds_t (line 376) | typedef khronos_utime_nanoseconds_t EGLTimeNV;
type khronos_utime_nanoseconds_t (line 378) | typedef khronos_utime_nanoseconds_t EGLuint64NV;
type khronos_uint64_t (line 380) | typedef khronos_uint64_t EGLuint64KHR;
type khronos_stime_nanoseconds_t (line 382) | typedef khronos_stime_nanoseconds_t EGLnsecsANDROID;
type EGLNativeFileDescriptorKHR (line 384) | typedef int EGLNativeFileDescriptorKHR;
type khronos_ssize_t (line 386) | typedef khronos_ssize_t EGLsizeiANDROID;
type EGLsizeiANDROID (line 390) | typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID)(const void *key, EGLsiz...
type EGLClientPixmapHI (line 392) | struct EGLClientPixmapHI {
type EGLint (line 424) | typedef EGLBoolean(GLAD_API_PTR *PFNEGLCHOOSECONFIGPROC)(EGLDisplay dpy,...
type const (line 427) | typedef EGLContext(GLAD_API_PTR *PFNEGLCREATECONTEXTPROC)(EGLDisplay dpy...
type const (line 432) | typedef EGLSurface(GLAD_API_PTR *PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC)(...
type const (line 433) | typedef EGLSurface(GLAD_API_PTR *PFNEGLCREATEPLATFORMWINDOWSURFACEPROC)(...
type const (line 447) | typedef EGLDisplay(GLAD_API_PTR *PFNEGLGETPLATFORMDISPLAYPROC)(EGLenum p...
FILE: third-party/glad/include/glad/gl.h
type GLADapiproc (line 169) | typedef GLADapiproc (*GLADloadfunc)(const char *name);
type GLADapiproc (line 170) | typedef GLADapiproc (*GLADuserptrloadfunc)(void *userptr, const char *na...
type GLenum (line 1988) | typedef unsigned int GLenum;
type GLboolean (line 1990) | typedef unsigned char GLboolean;
type GLbitfield (line 1992) | typedef unsigned int GLbitfield;
type GLvoid (line 1994) | typedef void GLvoid;
type khronos_int8_t (line 1996) | typedef khronos_int8_t GLbyte;
type khronos_uint8_t (line 1998) | typedef khronos_uint8_t GLubyte;
type khronos_int16_t (line 2000) | typedef khronos_int16_t GLshort;
type khronos_uint16_t (line 2002) | typedef khronos_uint16_t GLushort;
type GLint (line 2004) | typedef int GLint;
type GLuint (line 2006) | typedef unsigned int GLuint;
type khronos_int32_t (line 2008) | typedef khronos_int32_t GLclampx;
type GLsizei (line 2010) | typedef int GLsizei;
type khronos_float_t (line 2012) | typedef khronos_float_t GLfloat;
type khronos_float_t (line 2014) | typedef khronos_float_t GLclampf;
type GLdouble (line 2016) | typedef double GLdouble;
type GLclampd (line 2018) | typedef double GLclampd;
type GLchar (line 2024) | typedef char GLchar;
type GLcharARB (line 2026) | typedef char GLcharARB;
type GLhandleARB (line 2031) | typedef unsigned int GLhandleARB;
type khronos_uint16_t (line 2034) | typedef khronos_uint16_t GLhalf;
type khronos_uint16_t (line 2036) | typedef khronos_uint16_t GLhalfARB;
type khronos_int32_t (line 2038) | typedef khronos_int32_t GLfixed;
type khronos_intptr_t (line 2041) | typedef khronos_intptr_t GLintptr;
type khronos_intptr_t (line 2043) | typedef khronos_intptr_t GLintptr;
type khronos_intptr_t (line 2047) | typedef khronos_intptr_t GLintptrARB;
type khronos_intptr_t (line 2049) | typedef khronos_intptr_t GLintptrARB;
type khronos_ssize_t (line 2053) | typedef khronos_ssize_t GLsizeiptr;
type khronos_ssize_t (line 2055) | typedef khronos_ssize_t GLsizeiptr;
type khronos_ssize_t (line 2059) | typedef khronos_ssize_t GLsizeiptrARB;
type khronos_ssize_t (line 2061) | typedef khronos_ssize_t GLsizeiptrARB;
type khronos_int64_t (line 2064) | typedef khronos_int64_t GLint64;
type khronos_int64_t (line 2066) | typedef khronos_int64_t GLint64EXT;
type khronos_uint64_t (line 2068) | typedef khronos_uint64_t GLuint64;
type khronos_uint64_t (line 2070) | typedef khronos_uint64_t GLuint64EXT;
type __GLsync (line 2072) | struct __GLsync
type _cl_context (line 2074) | struct _cl_context
type _cl_event (line 2076) | struct _cl_event
type GLhalfNV (line 2086) | typedef unsigned short GLhalfNV;
type GLintptr (line 2088) | typedef GLintptr GLvdpauSurfaceNV;
type GLuint (line 2117) | typedef GLboolean(GLAD_API_PTR *PFNGLARETEXTURESRESIDENTPROC)(GLsizei n,...
type const (line 2445) | typedef GLuint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint pr...
type const (line 2446) | typedef GLint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint ...
type const (line 2447) | typedef GLint(GLAD_API_PTR *PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GL...
type GLubyte (line 2471) | typedef const GLubyte *(GLAD_API_PTR *PFNGLGETSTRINGPROC)(GLenum name);
type GLubyte (line 2472) | typedef const GLubyte *(GLAD_API_PTR *PFNGLGETSTRINGIPROC)(GLenum name, ...
type const (line 2473) | typedef GLuint(GLAD_API_PTR *PFNGLGETSUBROUTINEINDEXPROC)(GLuint program...
type const (line 2474) | typedef GLint(GLAD_API_PTR *PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuin...
type GladGLContext (line 3162) | typedef struct GladGLContext {
FILE: third-party/glad/src/egl.c
function glad_egl_load_EGL_VERSION_1_0 (line 80) | static void glad_egl_load_EGL_VERSION_1_0( GLADuserptrloadfunc load, voi...
function glad_egl_load_EGL_VERSION_1_1 (line 107) | static void glad_egl_load_EGL_VERSION_1_1( GLADuserptrloadfunc load, voi...
function glad_egl_load_EGL_VERSION_1_2 (line 114) | static void glad_egl_load_EGL_VERSION_1_2( GLADuserptrloadfunc load, voi...
function glad_egl_load_EGL_VERSION_1_4 (line 124) | static void glad_egl_load_EGL_VERSION_1_4( GLADuserptrloadfunc load, voi...
function glad_egl_load_EGL_VERSION_1_5 (line 128) | static void glad_egl_load_EGL_VERSION_1_5( GLADuserptrloadfunc load, voi...
function glad_egl_get_extensions (line 144) | static int glad_egl_get_extensions(EGLDisplay display, const char **exte...
function glad_egl_has_extension (line 150) | static int glad_egl_has_extension(const char *extensions, const char *ex...
function GLADapiproc (line 170) | static GLADapiproc glad_egl_get_proc_from_userptr(void *userptr, const c...
function glad_egl_find_extensions_egl (line 174) | static int glad_egl_find_extensions_egl(EGLDisplay display) {
function glad_egl_find_core_egl (line 183) | static int glad_egl_find_core_egl(EGLDisplay display) {
function gladLoadEGLUserPtr (line 224) | int gladLoadEGLUserPtr(EGLDisplay display, GLADuserptrloadfunc load, voi...
function gladLoadEGL (line 245) | int gladLoadEGL(EGLDisplay display, GLADloadfunc load) {
function glad_close_dlopen_handle (line 296) | static void glad_close_dlopen_handle(void* handle) {
function GLADapiproc (line 306) | static GLADapiproc glad_dlsym_handle(void* handle, const char *name) {
type _glad_egl_userptr (line 320) | struct _glad_egl_userptr {
function GLADapiproc (line 325) | static GLADapiproc glad_egl_get_proc(void *vuserptr, const char* name) {
function glad_egl_build_userptr (line 355) | static struct _glad_egl_userptr glad_egl_build_userptr(void *handle) {
function gladLoaderLoadEGL (line 362) | int gladLoaderLoadEGL(EGLDisplay display) {
function gladLoaderUnloadEGL (line 386) | void gladLoaderUnloadEGL() {
FILE: third-party/glad/src/gl.c
function glad_gl_load_GL_VERSION_1_0 (line 28) | static void glad_gl_load_GL_VERSION_1_0(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_1_1 (line 337) | static void glad_gl_load_GL_VERSION_1_1(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_1_2 (line 370) | static void glad_gl_load_GL_VERSION_1_2(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_1_3 (line 377) | static void glad_gl_load_GL_VERSION_1_3(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_1_4 (line 426) | static void glad_gl_load_GL_VERSION_1_4(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_1_5 (line 476) | static void glad_gl_load_GL_VERSION_1_5(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_2_0 (line 498) | static void glad_gl_load_GL_VERSION_2_0(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_2_1 (line 595) | static void glad_gl_load_GL_VERSION_2_1(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_3_0 (line 604) | static void glad_gl_load_GL_VERSION_3_0(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_3_1 (line 691) | static void glad_gl_load_GL_VERSION_3_1(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_3_2 (line 709) | static void glad_gl_load_GL_VERSION_3_2(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_3_3 (line 731) | static void glad_gl_load_GL_VERSION_3_3(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_0 (line 792) | static void glad_gl_load_GL_VERSION_4_0(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_1 (line 841) | static void glad_gl_load_GL_VERSION_4_1(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_2 (line 932) | static void glad_gl_load_GL_VERSION_4_2(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_3 (line 947) | static void glad_gl_load_GL_VERSION_4_3(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_4 (line 994) | static void glad_gl_load_GL_VERSION_4_4(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_5 (line 1006) | static void glad_gl_load_GL_VERSION_4_5(GladGLContext *context, GLADuser...
function glad_gl_load_GL_VERSION_4_6 (line 1131) | static void glad_gl_load_GL_VERSION_4_6(GladGLContext *context, GLADuser...
function glad_gl_get_extensions (line 1147) | static int glad_gl_get_extensions(GladGLContext *context, int version, c...
function glad_gl_free_extensions (line 1192) | static void glad_gl_free_extensions(char **exts_i, unsigned int num_exts...
function glad_gl_has_extension (line 1202) | static int glad_gl_has_extension(int version, const char *exts, unsigned...
function GLADapiproc (line 1235) | static GLADapiproc glad_gl_get_proc_from_userptr(void *userptr, const ch...
function glad_gl_find_extensions_gl (line 1239) | static int glad_gl_find_extensions_gl(GladGLContext *context, int versio...
function glad_gl_find_core_gl (line 1252) | static int glad_gl_find_core_gl(GladGLContext *context) {
function gladLoadGLContextUserPtr (line 1301) | int gladLoadGLContextUserPtr(GladGLContext *context, GLADuserptrloadfunc...
function gladLoadGLContext (line 1337) | int gladLoadGLContext(GladGLContext *context, GLADloadfunc load) {
function glad_close_dlopen_handle (line 1390) | static void glad_close_dlopen_handle(void* handle) {
function GLADapiproc (line 1400) | static GLADapiproc glad_dlsym_handle(void* handle, const char *name) {
type _glad_gl_userptr (line 1415) | struct _glad_gl_userptr {
function GLADapiproc (line 1420) | static GLADapiproc glad_gl_get_proc(void *vuserptr, const char *name) {
function glad_gl_build_userptr (line 1463) | static struct _glad_gl_userptr glad_gl_build_userptr(void *handle) {
function gladLoaderLoadGLContext (line 1480) | int gladLoaderLoadGLContext(GladGLContext *context) {
function gladLoaderUnloadGL (line 1503) | void gladLoaderUnloadGL(void) {
FILE: third-party/nvfbc/NvFBC.h
type NVFBCSTATUS (line 281) | typedef enum _NVFBCSTATUS {
type NVFBC_BOOL (line 386) | typedef enum _NVFBC_BOOL {
type NVFBC_CAPTURE_TYPE (line 405) | typedef enum _NVFBC_CAPTURE_TYPE {
type NVFBC_TRACKING_TYPE (line 439) | typedef enum {
type NVFBC_BUFFER_FORMAT (line 470) | typedef enum _NVFBC_BUFFER_FORMAT {
type NVFBC_SESSION_HANDLE (line 505) | typedef uint64_t NVFBC_SESSION_HANDLE;
type NVFBC_BOX (line 517) | typedef struct _NVFBC_BOX {
type NVFBC_SIZE (line 539) | typedef struct _NVFBC_SIZE {
type NVFBC_FRAME_GRAB_INFO (line 553) | typedef struct _NVFBC_FRAME_GRAB_INFO {
type NVFBC_CREATE_HANDLE_PARAMS (line 639) | typedef struct _NVFBC_CREATE_HANDLE_PARAMS {
type NVFBC_DESTROY_HANDLE_PARAMS (line 699) | typedef struct _NVFBC_DESTROY_HANDLE_PARAMS {
type NVFBC_RANDR_OUTPUT_INFO (line 729) | typedef struct _NVFBC_OUTPUT {
type NVFBC_GET_STATUS_PARAMS (line 750) | typedef struct _NVFBC_GET_STATUS_PARAMS {
type NVFBC_CREATE_CAPTURE_SESSION_PARAMS (line 821) | typedef struct _NVFBC_CREATE_CAPTURE_SESSION_PARAMS {
type NVFBC_DESTROY_CAPTURE_SESSION_PARAMS (line 988) | typedef struct _NVFBC_DESTROY_CAPTURE_SESSION_PARAMS {
type NVFBC_BIND_CONTEXT_PARAMS (line 1003) | typedef struct _NVFBC_BIND_CONTEXT_PARAMS {
type NVFBC_RELEASE_CONTEXT_PARAMS (line 1018) | typedef struct _NVFBC_RELEASE_CONTEXT_PARAMS {
type NVFBC_TOSYS_GRAB_FLAGS (line 1033) | typedef enum {
type NVFBC_TOSYS_SETUP_PARAMS (line 1073) | typedef struct _NVFBC_TOSYS_SETUP_PARAMS {
type NVFBC_TOSYS_GRAB_FRAME_PARAMS (line 1151) | typedef struct _NVFBC_TOSYS_GRAB_FRAME_PARAMS {
type NVFBC_TOCUDA_FLAGS (line 1202) | typedef enum {
type NVFBC_TOCUDA_SETUP_PARAMS (line 1242) | typedef struct _NVFBC_TOCUDA_SETUP_PARAMS {
type NVFBC_TOCUDA_GRAB_FRAME_PARAMS (line 1261) | typedef struct _NVFBC_TOCUDA_GRAB_FRAME_PARAMS {
type NVFBC_TOGL_FLAGS (line 1326) | typedef enum {
type NVFBC_TOGL_SETUP_PARAMS (line 1371) | typedef struct _NVFBC_TOGL_SETUP_PARAMS {
type NVFBC_TOGL_GRAB_FRAME_PARAMS (line 1437) | typedef struct _NVFBC_TOGL_GRAB_FRAME_PARAMS {
type NVFBC_API_FUNCTION_LIST (line 1941) | typedef struct
FILE: third-party/nvfbc/helper_math.h
type uint (line 44) | typedef unsigned int uint;
type ushort (line 45) | typedef unsigned short ushort;
function fminf (line 58) | inline float
function fmaxf (line 63) | inline float
function max (line 68) | inline int
function min (line 73) | inline int
function rsqrtf (line 78) | inline float
function float2 (line 88) | float2
function float2 (line 92) | float2
function float2 (line 96) | float2
function float2 (line 100) | float2
function int2 (line 105) | int2
function int2 (line 109) | int2
function int2 (line 113) | int2
function int2 (line 117) | int2
function uint2 (line 122) | uint2
function uint2 (line 126) | uint2
function uint2 (line 130) | uint2
function float3 (line 135) | float3
function float3 (line 139) | float3
function float3 (line 143) | float3
function float3 (line 147) | float3
function float3 (line 151) | float3
function float3 (line 155) | float3
function int3 (line 160) | int3
function int3 (line 164) | int3
function int3 (line 168) | int3
function int3 (line 172) | int3
function int3 (line 176) | int3
function uint3 (line 181) | uint3
function uint3 (line 185) | uint3
function uint3 (line 189) | uint3
function uint3 (line 193) | uint3
function uint3 (line 197) | uint3
function float4 (line 202) | float4
function float4 (line 206) | float4
function float4 (line 210) | float4
function float4 (line 214) | float4
function float4 (line 218) | float4
function int4 (line 223) | int4
function int4 (line 227) | int4
function int4 (line 231) | int4
function int4 (line 235) | int4
function int4 (line 239) | int4
function uint4 (line 244) | uint4
function uint4 (line 248) | uint4
function uint4 (line 252) | uint4
function uint4 (line 256) | uint4
function float2 (line 749) | float2
function float2 (line 758) | float2
function float2 (line 762) | float2
function int2 (line 772) | int2
function int2 (line 781) | int2
function int2 (line 785) | int2
function uint2 (line 795) | uint2
function uint2 (line 804) | uint2
function uint2 (line 808) | uint2
function float3 (line 818) | float3
function float3 (line 828) | float3
function float3 (line 832) | float3
function int3 (line 843) | int3
function int3 (line 853) | int3
function int3 (line 857) | int3
function uint3 (line 868) | uint3
function uint3 (line 878) | uint3
function uint3 (line 882) | uint3
function float4 (line 893) | float4
function float4 (line 904) | float4
function float4 (line 908) | float4
function int4 (line 920) | int4
function int4 (line 931) | int4
function int4 (line 935) | int4
function uint4 (line 947) | uint4
function uint4 (line 958) | uint4
function uint4 (line 962) | uint4
function float2 (line 1057) | float2
function float3 (line 1061) | float3
function float4 (line 1065) | float4
function int2 (line 1070) | int2
function int3 (line 1074) | int3
function int4 (line 1078) | int4
function uint2 (line 1083) | uint2
function uint3 (line 1087) | uint3
function uint4 (line 1091) | uint4
function float2 (line 1100) | float2
function float3 (line 1104) | float3
function float4 (line 1108) | float4
function int2 (line 1113) | int2
function int3 (line 1117) | int3
function int4 (line 1121) | int4
function uint2 (line 1126) | uint2
function uint3 (line 1130) | uint3
function uint4 (line 1134) | uint4
function lerp (line 1144) | float
function float2 (line 1148) | float2
function float3 (line 1152) | float3
function float4 (line 1156) | float4
function clamp (line 1166) | float
function clamp (line 1170) | int
function uint (line 1174) | uint
function float2 (line 1179) | float2
function float2 (line 1183) | float2
function float3 (line 1187) | float3
function float3 (line 1191) | float3
function float4 (line 1195) | float4
function float4 (line 1199) | float4
function int2 (line 1204) | int2
function int2 (line 1208) | int2
function int3 (line 1212) | int3
function int3 (line 1216) | int3
function int4 (line 1220) | int4
function int4 (line 1224) | int4
function uint2 (line 1229) | uint2
function uint2 (line 1233) | uint2
function uint3 (line 1237) | uint3
function uint3 (line 1241) | uint3
function uint4 (line 1245) | uint4
function uint4 (line 1249) | uint4
function dot (line 1258) | float
function dot (line 1262) | float
function dot (line 1266) | float
function dot (line 1271) | int
function dot (line 1275) | int
function dot (line 1279) | int
function uint (line 1284) | uint
function uint (line 1288) | uint
function uint (line 1292) | uint
function length (line 1301) | float
function length (line 1305) | float
function length (line 1309) | float
function float2 (line 1318) | float2
function float3 (line 1323) | float3
function float4 (line 1328) | float4
function float2 (line 1338) | float2
function float3 (line 1342) | float3
function float4 (line 1346) | float4
function fracf (line 1355) | float
function float2 (line 1359) | float2
function float3 (line 1363) | float3
function float4 (line 1367) | float4
function float2 (line 1376) | float2
function float3 (line 1380) | float3
function float4 (line 1384) | float4
function float2 (line 1393) | float2
function float3 (line 1397) | float3
function float4 (line 1401) | float4
function int2 (line 1406) | int2
function int3 (line 1410) | int3
function int4 (line 1414) | int4
function float3 (line 1425) | float3
function float3 (line 1434) | float3
function smoothstep (line 1446) | float
function float2 (line 1451) | float2
function float3 (line 1456) | float3
function float4 (line 1461) | float4
FILE: third-party/sudovda/sudovda-ioctl.h
function namespace (line 6) | namespace SUDOVDA
FILE: third-party/sudovda/sudovda.h
function HANDLE (line 21) | static const HANDLE OpenDevice(const GUID* interfaceGuid) {
function VIRTUAL_DISPLAY_ADD_PARAMS (line 65) | VIRTUAL_DISPLAY_ADD_PARAMS params{Width, Height, RefreshRate, MonitorGui...
function VIRTUAL_DISPLAY_REMOVE_PARAMS (line 89) | VIRTUAL_DISPLAY_REMOVE_PARAMS params{MonitorGuid};
function VIRTUAL_DISPLAY_SET_RENDER_ADAPTER_PARAMS (line 110) | VIRTUAL_DISPLAY_SET_RENDER_ADAPTER_PARAMS params{AdapterLuid};
function GetWatchdogTimeout (line 130) | static const bool GetWatchdogTimeout(HANDLE hDevice, VIRTUAL_DISPLAY_GET...
function GetProtocolVersion (line 150) | static const bool GetProtocolVersion(HANDLE hDevice, VIRTUAL_DISPLAY_GET...
function isProtocolCompatible (line 170) | static const bool isProtocolCompatible(const SUVDA_PROTOCAL_VERSION& oth...
function CheckProtocolCompatible (line 186) | static const bool CheckProtocolCompatible(HANDLE hDevice) {
function PingDriver (line 195) | static const bool PingDriver(HANDLE hDevice) {
function GetAddedDisplayName (line 215) | static const bool GetAddedDisplayName(const VIRTUAL_DISPLAY_ADD_OUT& add...
FILE: tools/audio.cpp
type audio (line 27) | namespace audio {
function Release (line 29) | void Release(T *p) {
function co_task_free (line 34) | void co_task_free(T *p) {
class prop_var_t (line 50) | class prop_var_t {
method prop_var_t (line 52) | prop_var_t() {
function wchar_t (line 63) | const wchar_t *no_null(const wchar_t *str) {
type format_t (line 67) | struct format_t {
function set_wave_format (line 112) | void set_wave_format(audio::wave_format_t &wave_format, const format_t...
function audio_client_t (line 122) | audio_client_t make_audio_client(device_t &device, const format_t &for...
function print_device (line 164) | void print_device(device_t &device) {
function print_help (line 232) | void print_help() {
function main (line 239) | int main(int argc, char *argv[]) {
FILE: tools/dxgi.cpp
type dxgi (line 14) | namespace dxgi {
function Release (line 16) | void Release(T *dxgi) {
function main (line 26) | int main(int argc, char *argv[]) {
FILE: tools/sunshinesvc.cpp
function DWORD (line 23) | DWORD WINAPI HandlerEx(DWORD dwControl, DWORD dwEventType, LPVOID lpEven...
function HANDLE (line 54) | HANDLE CreateJobObjectForChildProcess() {
function LPPROC_THREAD_ATTRIBUTE_LIST (line 78) | LPPROC_THREAD_ATTRIBUTE_LIST AllocateProcThreadAttributeList(DWORD attri...
function HANDLE (line 95) | HANDLE DuplicateTokenForSession(DWORD console_session_id) {
function HANDLE (line 119) | HANDLE OpenLogFileHandle() {
function RunTerminationHelper (line 133) | bool RunTerminationHelper(HANDLE console_token, DWORD pid) {
function VOID (line 169) | VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) {
function DoGracefulTermination (line 323) | int DoGracefulTermination(DWORD pid) {
function main (line 340) | int main(int argc, char *argv[]) {
FILE: tools/utils.cpp
function from_utf8 (line 5) | std::wstring from_utf8(const std::string_view &string) {
function to_utf8 (line 31) | std::string to_utf8(const std::wstring_view &string) {
Condensed preview — 430 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,122K chars).
[
{
"path": ".clang-format",
"chars": 3485,
"preview": "---\n# This file is centrally managed in https://github.com/<organization>/.github/\n# Don't make changes to this file in "
},
{
"path": ".dockerignore",
"chars": 384,
"preview": "# ignore hidden files\n.*\n\n# do not ignore .git, needed for versioning\n!/.git\n\n# do not ignore .rstcheck.cfg, needed to t"
},
{
"path": ".flake8",
"chars": 89,
"preview": "[flake8]\nfilename =\n *.py\nmax-line-length = 120\nextend-exclude =\n .venv/\n venv/\n"
},
{
"path": ".gitattributes",
"chars": 165,
"preview": "# ensure Linux specific files are checked out with LF line endings\nDockerfile text eol=lf\n*.dockerfile text eol=lf\n*flat"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 2442,
"preview": "# Contributing Guidelines\n\nThank you for your interest in contributing to this project! We welcome contributions from th"
},
{
"path": ".github/copilot-instructions.md",
"chars": 437,
"preview": "On Windows we use msys2 and ucrt64 to compile.\nYou need to prefix commands with `C:\\msys64\\msys2_shell.cmd -defterm -her"
},
{
"path": ".github/matchers/copr-ci.json",
"chars": 337,
"preview": "{\n \"problemMatcher\": [\n {\n \"owner\": \"copr-ci-gcc\",\n \"pattern\": [\n {\n \"regexp\": \"^/?(?:[^/]"
},
{
"path": ".github/matchers/docker.json",
"chars": 365,
"preview": "{\n \"problemMatcher\": [\n {\n \"owner\": \"docker-gcc\",\n \"pattern\": [\n {\n \"regexp\": \"^(?:#\\\\d+\\\\"
},
{
"path": ".github/matchers/gcc-strip3.json",
"chars": 336,
"preview": "{\n \"problemMatcher\": [\n {\n \"owner\": \"gcc-strip3\",\n \"pattern\": [\n {\n \"regexp\": \"^/?(?:[^/]+"
},
{
"path": ".github/matchers/gcc.json",
"chars": 578,
"preview": "{\n \"problemMatcher\": [\n {\n \"owner\": \"gcc\",\n \"pattern\": [\n {\n \"regexp\": \"^(.*):(\\\\d+):(\\\\d+"
},
{
"path": ".gitignore",
"chars": 490,
"preview": "# Prerequisites\n*.d\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Compiled Dynamic"
},
{
"path": ".gitmodules",
"chars": 2601,
"preview": "[submodule \"packaging/linux/flatpak/deps/flatpak-builder-tools\"]\n\tpath = packaging/linux/flatpak/deps/flatpak-builder-to"
},
{
"path": ".prettierrc.json",
"chars": 2,
"preview": "{}"
},
{
"path": ".readthedocs.yaml",
"chars": 790,
"preview": "---\n# .readthedocs.yaml\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.ht"
},
{
"path": "CMakeLists.txt",
"chars": 2319,
"preview": "cmake_minimum_required(VERSION 3.20)\n# `CMAKE_CUDA_ARCHITECTURES` requires 3.18\n# `set_source_files_properties` requires"
},
{
"path": "DOCKER_README.md",
"chars": 5876,
"preview": "# Docker\n\n## Important note\nStarting with v0.18.0, tag names have changed. You may no longer use `latest`, `master`, `vX"
},
{
"path": "LICENSE",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "NOTICE",
"chars": 171,
"preview": "©2018 Valve Corporation. Steam and the Steam logo are trademarks and/or\nregistered trademarks of Valve Corporation in th"
},
{
"path": "README.md",
"chars": 11140,
"preview": "# Apollo\n\nApollo is a self-hosted desktop stream host for [Artemis(Moonlight Noir)](https://github.com/ClassicOldSong/mo"
},
{
"path": "cmake/FindLIBCAP.cmake",
"chars": 879,
"preview": "# - Try to find Libcap\n# Once done this will define\n#\n# LIBCAP_FOUND - system has Libcap\n# LIBCAP_INCLUDE_DIRS - the L"
},
{
"path": "cmake/FindLIBDRM.cmake",
"chars": 889,
"preview": "# - Try to find Libdrm\n# Once done this will define\n#\n# LIBDRM_FOUND - system has Libdrm\n# LIBDRM_INCLUDE_DIRS - the L"
},
{
"path": "cmake/FindLibva.cmake",
"chars": 2483,
"preview": "# - Try to find Libva\n# This module defines the following variables:\n#\n# * LIBVA_FOUND - The component was found\n# * LIB"
},
{
"path": "cmake/FindSystemd.cmake",
"chars": 1243,
"preview": "# - Try to find Systemd\n# Once done this will define\n#\n# SYSTEMD_FOUND - system has systemd\n# SYSTEMD_USER_UNIT_INSTALL_"
},
{
"path": "cmake/FindUdev.cmake",
"chars": 1828,
"preview": "# - Try to find Udev\n# Once done this will define\n#\n# UDEV_FOUND - system has udev\n# UDEV_RULES_INSTALL_DIR - the udev r"
},
{
"path": "cmake/FindWayland.cmake",
"chars": 3860,
"preview": "# Try to find Wayland on a Unix system\n#\n# This will define:\n#\n# WAYLAND_FOUND - True if Wayland is found\n# W"
},
{
"path": "cmake/compile_definitions/common.cmake",
"chars": 6344,
"preview": "# common compile definitions\n# this file will also load platform specific definitions\n\nlist(APPEND SUNSHINE_COMPILE_OPTI"
},
{
"path": "cmake/compile_definitions/linux.cmake",
"chars": 9456,
"preview": "# linux specific compile definitions\n\nadd_compile_definitions(SUNSHINE_PLATFORM=\"linux\")\n\n# AppImage\nif(${SUNSHINE_BUILD"
},
{
"path": "cmake/compile_definitions/macos.cmake",
"chars": 1969,
"preview": "# macos specific compile definitions\n\nadd_compile_definitions(SUNSHINE_PLATFORM=\"macos\")\n\nset(MACOS_LINK_DIRECTORIES\n "
},
{
"path": "cmake/compile_definitions/unix.cmake",
"chars": 368,
"preview": "# unix specific compile definitions\n# put anything here that applies to both linux and macos\n\nlist(APPEND SUNSHINE_EXTER"
},
{
"path": "cmake/compile_definitions/windows.cmake",
"chars": 4068,
"preview": "# windows specific compile definitions\n\nadd_compile_definitions(SUNSHINE_PLATFORM=\"windows\")\n\nenable_language(RC)\nset(CM"
},
{
"path": "cmake/dependencies/Boost_Sunshine.cmake",
"chars": 3628,
"preview": "#\n# Loads the boost library giving the priority to the system package first, with a fallback to FetchContent.\n#\ninclude_"
},
{
"path": "cmake/dependencies/common.cmake",
"chars": 3177,
"preview": "# load common dependencies\n# this file will also load platform specific dependencies\n\n# boost, this should be before Sim"
},
{
"path": "cmake/dependencies/libevdev_Sunshine.cmake",
"chars": 1629,
"preview": "#\n# Loads the libevdev library giving the priority to the system package first, with a fallback to ExternalProject\n#\ninc"
},
{
"path": "cmake/dependencies/linux.cmake",
"chars": 30,
"preview": "# linux specific dependencies\n"
},
{
"path": "cmake/dependencies/macos.cmake",
"chars": 424,
"preview": "# macos specific dependencies\n\nFIND_LIBRARY(APP_KIT_LIBRARY AppKit)\nFIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationService"
},
{
"path": "cmake/dependencies/nlohmann_json.cmake",
"chars": 933,
"preview": "#\n# Loads the nlohmann_json library giving the priority to the system package first, with a fallback to FetchContent.\n#\n"
},
{
"path": "cmake/dependencies/unix.cmake",
"chars": 86,
"preview": "# unix specific dependencies\n# put anything here that applies to both linux and macos\n"
},
{
"path": "cmake/dependencies/windows.cmake",
"chars": 399,
"preview": "# windows specific dependencies\n\n# Make sure MinHook is installed\nfind_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)\nfi"
},
{
"path": "cmake/macros/common.cmake",
"chars": 881,
"preview": "# common macros\n# this file will also load platform specific macros\n\n# platform specific macros\nif(WIN32)\n include(${"
},
{
"path": "cmake/macros/linux.cmake",
"chars": 1160,
"preview": "# linux specific macros\n\n# GEN_WAYLAND: args = `filename`\nmacro(GEN_WAYLAND wayland_directory subdirectory filename)\n "
},
{
"path": "cmake/macros/macos.cmake",
"chars": 619,
"preview": "# macos specific macros\n\n# ADD_FRAMEWORK: args = `fwname`, `appname`\nmacro(ADD_FRAMEWORK fwname appname)\n find_librar"
},
{
"path": "cmake/macros/unix.cmake",
"chars": 80,
"preview": "# unix specific macros\n# put anything here that applies to both linux and macos\n"
},
{
"path": "cmake/macros/windows.cmake",
"chars": 26,
"preview": "# windows specific macros\n"
},
{
"path": "cmake/packaging/common.cmake",
"chars": 1967,
"preview": "# common packaging\n\n# common cpack options\nset(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})\nset(CPACK_PACKAGE_VENDOR \"SudoM"
},
{
"path": "cmake/packaging/linux.cmake",
"chars": 6958,
"preview": "# linux specific packaging\n\ninstall(DIRECTORY \"${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/\"\n DESTINATION \"${SUNSH"
},
{
"path": "cmake/packaging/macos.cmake",
"chars": 1041,
"preview": "# macos specific packaging\n\n# todo - bundle doesn't produce a valid .app use cpack -G DragNDrop\nset(CPACK_BUNDLE_NAME \"$"
},
{
"path": "cmake/packaging/unix.cmake",
"chars": 396,
"preview": "# unix specific packaging\n# put anything here that applies to both linux and macos\n\n# return here if building a macos pa"
},
{
"path": "cmake/packaging/windows.cmake",
"chars": 5126,
"preview": "# windows specific packaging\ninstall(TARGETS sunshine RUNTIME DESTINATION \".\" COMPONENT application)\n\n# Hardening: inclu"
},
{
"path": "cmake/packaging/windows_nsis.cmake",
"chars": 3866,
"preview": "# NSIS Packaging\n# see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html\n\nset(CPACK_NSIS_INSTALLED_ICO"
},
{
"path": "cmake/packaging/windows_wix.cmake",
"chars": 120,
"preview": "# WIX Packaging\n# see options at: https://cmake.org/cmake/help/latest/cpack_gen/wix.html\n\n# TODO: Replace nsis with wix\n"
},
{
"path": "cmake/prep/build_version.cmake",
"chars": 6096,
"preview": "# Set build variables if env variables are defined\n# These are used in configured files such as manifests for different "
},
{
"path": "cmake/prep/constants.cmake",
"chars": 245,
"preview": "# source assets will be installed from this directory\nset(SUNSHINE_SOURCE_ASSETS_DIR \"${CMAKE_SOURCE_DIR}/src_assets\")\n\n"
},
{
"path": "cmake/prep/init.cmake",
"chars": 802,
"preview": "if (WIN32)\n if(CMAKE_CXX_COMPILER_ID MATCHES \"GNU\")\n if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)"
},
{
"path": "cmake/prep/options.cmake",
"chars": 2995,
"preview": "# Publisher Metadata\nset(SUNSHINE_PUBLISHER_NAME \"SudoMaker\"\n CACHE STRING \"The name of the publisher (or fork de"
},
{
"path": "cmake/prep/special_package_configuration.cmake",
"chars": 2093,
"preview": "if(UNIX)\n if(${SUNSHINE_CONFIGURE_HOMEBREW})\n configure_file(packaging/sunshine.rb sunshine.rb @ONLY)\n endi"
},
{
"path": "cmake/targets/common.cmake",
"chars": 4578,
"preview": "# common target definitions\n# this file will also load platform specific macros\n\nadd_executable(sunshine ${SUNSHINE_TARG"
},
{
"path": "cmake/targets/linux.cmake",
"chars": 36,
"preview": "# linux specific target definitions\n"
},
{
"path": "cmake/targets/macos.cmake",
"chars": 336,
"preview": "# macos specific target definitions\ntarget_link_options(sunshine PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${APPLE_"
},
{
"path": "cmake/targets/unix.cmake",
"chars": 92,
"preview": "# unix specific target definitions\n# put anything here that applies to both linux and macos\n"
},
{
"path": "cmake/targets/windows.cmake",
"chars": 303,
"preview": "# windows specific target definitions\nset_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1)\nset(CMAKE_FI"
},
{
"path": "codecov.yml",
"chars": 302,
"preview": "---\ncodecov:\n branch: master\n\ncoverage:\n status:\n project:\n default:\n target: auto\n threshold: 1"
},
{
"path": "crowdin.yml",
"chars": 1070,
"preview": "---\n\"base_path\": \".\"\n\"base_url\": \"https://api.crowdin.com\" # optional (for Crowdin Enterprise only)\n\"preserve_hierarchy"
},
{
"path": "docker/archlinux.dockerfile",
"chars": 3698,
"preview": "# syntax=docker/dockerfile:1\n# artifacts: true\n# platforms: linux/amd64\n# archlinux does not have an arm64 base image\n# "
},
{
"path": "docker/clion-toolchain.dockerfile",
"chars": 2420,
"preview": "# syntax=docker/dockerfile:1\n# artifacts: false\n# platforms: linux/amd64\n# platforms_pr: linux/amd64\n# no-cache-filters:"
},
{
"path": "docker/debian-trixie.dockerfile",
"chars": 2851,
"preview": "# syntax=docker/dockerfile:1\n# artifacts: true\n# platforms: linux/amd64,linux/arm64/v8\n# platforms_pr: linux/amd64\n# no-"
},
{
"path": "docker/ubuntu-22.04.dockerfile",
"chars": 2770,
"preview": "# syntax=docker/dockerfile:1\n# artifacts: true\n# platforms: linux/amd64,linux/arm64/v8\n# platforms_pr: linux/amd64\n# no-"
},
{
"path": "docker/ubuntu-24.04.dockerfile",
"chars": 2747,
"preview": "# syntax=docker/dockerfile:1\n# artifacts: true\n# platforms: linux/amd64,linux/arm64/v8\n# platforms_pr: linux/amd64\n# no-"
},
{
"path": "docs/Doxyfile",
"chars": 2234,
"preview": "# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project.\n#\n#"
},
{
"path": "docs/api.js",
"chars": 5327,
"preview": "function generateExamples(endpoint, method, body = null) {\n let curlBodyString = '';\n let psBodyString = '';\n\n if (bo"
},
{
"path": "docs/api.md",
"chars": 1620,
"preview": "# API\n\nSunshine has a RESTful API which can be used to interact with the service.\n\nUnless otherwise specified, authentic"
},
{
"path": "docs/app_examples.md",
"chars": 19346,
"preview": "# App Examples\nSince not all applications behave the same, we decided to create some examples to help you get started ad"
},
{
"path": "docs/awesome_sunshine.md",
"chars": 541,
"preview": "# Awesome-Sunshine\n\n@htmlonly\n<script type=\"module\" src=\"https://md-block.verou.me/md-block.js\"></script>\n<md-block\n hl"
},
{
"path": "docs/building.md",
"chars": 4837,
"preview": "# Building\nSunshine binaries are built using [CMake](https://cmake.org) and requires `cmake` > 3.25.\n\n## Building Locall"
},
{
"path": "docs/changelog.md",
"chars": 568,
"preview": "# Changelog\n\n@htmlonly\n<script type=\"module\" src=\"https://md-block.verou.me/md-block.js\"></script>\n<md-block\n hmin=\"2\"\n"
},
{
"path": "docs/configuration.js",
"chars": 1299,
"preview": "/**\n * @brief Add a button to open the configuration option for each table\n */\ndocument.addEventListener(\"DOMContentLoad"
},
{
"path": "docs/configuration.md",
"chars": 78320,
"preview": "# Configuration\n\n@admonition{ Host authority | @htmlonly\nBy providing the host authority (URI + port), you can easily op"
},
{
"path": "docs/contributing.md",
"chars": 8405,
"preview": "# Contributing\nRead our contribution guide in our organization level\n[docs](https://docs.lizardbyte.dev/latest/developer"
},
{
"path": "docs/doc-styles.css",
"chars": 155,
"preview": "/* A fake button as doxygen doesn't allow button elements */\n.open-button {\n background: var(--primary-color);\n co"
},
{
"path": "docs/gamestream_migration.md",
"chars": 1703,
"preview": "# GameStream Migration\nNvidia announced that their GameStream service for Nvidia Games clients will be discontinued in F"
},
{
"path": "docs/getting_started.md",
"chars": 17225,
"preview": "# Getting Started\n\nThe recommended method for running Sunshine is to use the [binaries](#binaries) included in the\n[late"
},
{
"path": "docs/guides.md",
"chars": 671,
"preview": "# Guides\n\n@admonition{Community | A collection of guides written by the community is available on our\n[blog](https://app"
},
{
"path": "docs/legal.md",
"chars": 1816,
"preview": "# Legal\n\n> [!CAUTION]\n> This documentation is for informational purposes only and is not intended as legal advice. If yo"
},
{
"path": "docs/performance_tuning.md",
"chars": 680,
"preview": "# Performance Tuning\nIn addition to the options available in the [Configuration](configuration.md) section, there are a "
},
{
"path": "docs/third_party_packages.md",
"chars": 2778,
"preview": "# Third-Party Packages\n\n> [!WARNING]\n> These packages are not maintained by LizardByte. Use at your own risk.\n\n## Chocol"
},
{
"path": "docs/troubleshooting.md",
"chars": 9266,
"preview": "# Troubleshooting\n\n## General\n\n### Forgotten Credentials\nIf you forgot your credentials to the web UI, try this.\n\n@tabs{"
},
{
"path": "gh-pages-template/.readthedocs.yaml",
"chars": 623,
"preview": "---\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\nvers"
},
{
"path": "gh-pages-template/_config.yml",
"chars": 152,
"preview": "---\n# See https://github.com/daattali/beautiful-jekyll/blob/master/_config.yml for documented options\n\navatar: \"/Sunshin"
},
{
"path": "gh-pages-template/index.html",
"chars": 36079,
"preview": "---\ntitle: Sunshine\nsubtitle: A LizardByte project\nlayout: page\nfull-width: true\nafter-content:\n- donate.html\n- support."
},
{
"path": "package.json",
"chars": 569,
"preview": "{\n \"name\": \"sunshine\",\n \"version\": \"0.0.0\",\n \"scripts\": {\n \"build\": \"vite build --debug\",\n \"build-clean\": \"vite"
},
{
"path": "packaging/linux/AppImage/AppRun",
"chars": 2658,
"preview": "#!/bin/bash\n\n# custom AppRun for Sunshine AppImage\n\n# path of the extracted AppRun\nHERE=\"$(dirname \"$(readlink -f \"${0}\""
},
{
"path": "packaging/linux/AppImage/dev.lizardbyte.app.Sunshine.desktop",
"chars": 305,
"preview": "[Desktop Entry]\nCategories=RemoteAccess;Network;\nComment=@PROJECT_DESCRIPTION@\nExec=sunshine\nIcon=sunshine\nKeywords=game"
},
{
"path": "packaging/linux/Arch/PKGBUILD",
"chars": 4267,
"preview": "# Edit on github: https://github.com/LizardByte/Sunshine/blob/master/packaging/linux/Arch/PKGBUILD\n# Reference: https://"
},
{
"path": "packaging/linux/Arch/sunshine.install",
"chars": 416,
"preview": "do_setcap() {\n setcap cap_sys_admin+p $(readlink -f usr/bin/sunshine)\n}\n\ndo_udev_reload() {\n udevadm control --reload-"
},
{
"path": "packaging/linux/dev.lizardbyte.app.Sunshine.desktop",
"chars": 454,
"preview": "[Desktop Entry]\nActions=RunInTerminal;\nCategories=RemoteAccess;Network;\nComment=@PROJECT_DESCRIPTION@\nExec=/usr/bin/env "
},
{
"path": "packaging/linux/dev.lizardbyte.app.Sunshine.metainfo.xml",
"chars": 2409,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<component type=\"desktop\">\n <id>@PROJECT_FQDN@</id>\n\n <name>@PROJECT_NAME@</nam"
},
{
"path": "packaging/linux/dev.lizardbyte.app.Sunshine.terminal.desktop",
"chars": 96,
"preview": "[Desktop Entry]\nName=@PROJECT_NAME@\nExec=sunshine\nTerminal=true\nType=Application\nNoDisplay=true\n"
},
{
"path": "packaging/linux/fedora/Sunshine.spec",
"chars": 7116,
"preview": "%global build_timestamp %(date +\"%Y%m%d\")\n\n# use sed to replace these values\n%global build_version 0\n%global branch 0\n%g"
},
{
"path": "packaging/linux/flatpak/README.md",
"chars": 1124,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/LizardByte/Sunshine/master/sunshine.png\" />\n <h1 ali"
},
{
"path": "packaging/linux/flatpak/apps.json",
"chars": 148,
"preview": "{\n \"env\": {\n \"PATH\": \"$(PATH):$(HOME)/.local/bin\"\n },\n \"apps\": [\n {\n \"name\": \"Desktop\",\n \"image-path\""
},
{
"path": "packaging/linux/flatpak/dev.lizardbyte.app.Sunshine.desktop",
"chars": 224,
"preview": "[Desktop Entry]\nCategories=RemoteAccess;Network;\nComment=@PROJECT_DESCRIPTION@\nExec=sunshine.sh\nIcon=@SUNSHINE_DESKTOP_I"
},
{
"path": "packaging/linux/flatpak/dev.lizardbyte.app.Sunshine.yml",
"chars": 3255,
"preview": "---\napp-id: \"@PROJECT_FQDN@\"\nruntime: org.freedesktop.Platform\nruntime-version: \"23.08\" # requires CUDA >= 12.2\nsdk: or"
},
{
"path": "packaging/linux/flatpak/exceptions.json",
"chars": 253,
"preview": "{\n \"dev.lizardbyte.app.Sunshine\": [\n \"appstream-external-screenshot-url\",\n \"appstream-screenshots-not-mirrored-in"
},
{
"path": "packaging/linux/flatpak/flathub.json",
"chars": 44,
"preview": "{\n \"disable-external-data-checker\": true\n}\n"
},
{
"path": "packaging/linux/flatpak/modules/avahi.json",
"chars": 1042,
"preview": "{\n \"name\": \"avahi\",\n \"cleanup\": [\n \"/bin\",\n \"/lib/avahi\",\n \"/share\"\n ],\n \"config-opts\": [\n \"--with-distr"
},
{
"path": "packaging/linux/flatpak/modules/boost.json",
"chars": 604,
"preview": "{\n \"name\": \"boost\",\n \"buildsystem\": \"simple\",\n \"build-commands\": [\n \"cd tools/build && bison -y -d -o src/engine/j"
},
{
"path": "packaging/linux/flatpak/modules/cuda.json",
"chars": 1071,
"preview": "{\n \"name\": \"cuda\",\n \"build-options\": {\n \"no_debuginfo\": true\n },\n \"buildsystem\": \"simple\",\n \"cleanup\": [\n \"*\""
},
{
"path": "packaging/linux/flatpak/modules/libevdev.json",
"chars": 594,
"preview": "{\n \"name\": \"libevdev\",\n \"buildsystem\": \"meson\",\n \"config-opts\": [\n \"-Ddocumentation=disabled\",\n \"-Dtests=disabl"
},
{
"path": "packaging/linux/flatpak/modules/libnotify.json",
"chars": 505,
"preview": "{\n \"name\": \"libnotify\",\n \"buildsystem\": \"meson\",\n \"config-opts\": [\n \"-Dtests=false\",\n \"-Dintrospection=disabled"
},
{
"path": "packaging/linux/flatpak/modules/miniupnpc.json",
"chars": 832,
"preview": "{\n \"name\": \"miniupnpc\",\n \"buildsystem\": \"cmake-ninja\",\n \"builddir\": true,\n \"subdir\": \"miniupnpc\",\n \"config-opts\": ["
},
{
"path": "packaging/linux/flatpak/modules/nlohmann_json.json",
"chars": 375,
"preview": "{\n \"name\": \"nlohmann_json\",\n \"buildsystem\": \"cmake-ninja\",\n \"config-opts\": [\n \"-DJSON_MultipleHeaders=OFF\",\n \"-"
},
{
"path": "packaging/linux/flatpak/modules/numactl.json",
"chars": 460,
"preview": "{\n \"name\": \"numactl\",\n \"sources\": [\n {\n \"type\": \"git\",\n \"url\": \"https://github.com/numactl/numactl.git\",\n"
},
{
"path": "packaging/linux/flatpak/modules/xvfb/xvfb-run",
"chars": 5696,
"preview": "#!/bin/sh\n\n# This script starts an instance of Xvfb, the \"fake\" X server, runs a command\n# with that server available, a"
},
{
"path": "packaging/linux/flatpak/modules/xvfb/xvfb.json",
"chars": 4151,
"preview": "{\n \"name\": \"xvfb\",\n \"buildsystem\": \"meson\",\n \"config-opts\": [\n \"-Dxorg=true\",\n \"-Dxvfb=true\",\n \"-Dhal=false\""
},
{
"path": "packaging/linux/flatpak/scripts/additional-install.sh",
"chars": 806,
"preview": "#!/bin/sh\n\n# User Service\nmkdir -p ~/.config/systemd/user\ncp \"/app/share/sunshine/systemd/user/sunshine.service\" \"$HOME/"
},
{
"path": "packaging/linux/flatpak/scripts/remove-additional-install.sh",
"chars": 412,
"preview": "#!/bin/sh\n\n# User Service\nsystemctl --user stop sunshine\nrm \"$HOME/.config/systemd/user/sunshine.service\"\nsystemctl --us"
},
{
"path": "packaging/linux/flatpak/scripts/sunshine.sh",
"chars": 264,
"preview": "#!/bin/sh\n\nPORT=47990\n\nif ! curl -k https://localhost:$PORT > /dev/null 2>&1; then\n (sleep 3 && xdg-open https://localh"
},
{
"path": "packaging/linux/patches/aarch64/01-math_functions.patch",
"chars": 1730,
"preview": "diff '--color=auto' -ur a/cuda/targets/sbsa-linux/include/crt/math_functions.h b/cuda/targets/sbsa-linux/include/crt/mat"
},
{
"path": "packaging/linux/patches/x86_64/01-math_functions.patch",
"chars": 1738,
"preview": "diff '--color=auto' -ur a/cuda/targets/x86_64-linux/include/crt/math_functions.h b/cuda/targets/x86_64-linux/include/crt"
},
{
"path": "packaging/linux/sunshine.service.in",
"chars": 336,
"preview": "[Unit]\nDescription=@PROJECT_DESCRIPTION@\nStartLimitIntervalSec=500\nStartLimitBurst=5\n\n[Service]\n# Avoid starting Sunshin"
},
{
"path": "packaging/sunshine.rb",
"chars": 4977,
"preview": "require \"language/node\"\n\nclass @PROJECT_NAME@ < Formula\n # conflicts_with \"sunshine\", because: \"sunshine and sunshine-b"
},
{
"path": "scripts/_locale.py",
"chars": 5269,
"preview": "\"\"\"\n..\n _locale.py\n\nFunctions related to building, initializing, updating, and compiling localization translations.\n\nB"
},
{
"path": "scripts/icons/convert_and_pack.sh",
"chars": 1999,
"preview": "#!/bin/bash\n\nif ! [ -x \"$(command -v ./go-png2ico)\" ]; then\n echo \"./go-png2ico not found\"\n echo \"download the exe"
},
{
"path": "scripts/linux_build.sh",
"chars": 21803,
"preview": "#!/bin/bash\nset -e\n\n# Version requirements - centralized for easy maintenance\ncmake_min=\"3.25.0\"\ntarget_cmake_version=\"3"
},
{
"path": "scripts/requirements.txt",
"chars": 33,
"preview": "Babel==2.17.0\nclang-format==20.*\n"
},
{
"path": "scripts/update_clang_format.py",
"chars": 731,
"preview": "# standard imports\nimport os\nimport subprocess\n\n# variables\ndirectories = [\n 'src',\n 'tests',\n 'tools',\n]\nfile_"
},
{
"path": "src/audio.cpp",
"chars": 9147,
"preview": "/**\n * @file src/audio.cpp\n * @brief Definitions for audio capture and encoding.\n */\n// standard includes\n#include <thre"
},
{
"path": "src/audio.h",
"chars": 2917,
"preview": "/**\n * @file src/audio.h\n * @brief Declarations for audio capture and encoding.\n */\n#pragma once\n\n// local includes\n#inc"
},
{
"path": "src/cbs.cpp",
"chars": 7988,
"preview": "/**\n * @file src/cbs.cpp\n * @brief Definitions for FFmpeg Coded Bitstream API.\n */\nextern \"C\" {\n// lib includes\n#include"
},
{
"path": "src/cbs.h",
"chars": 934,
"preview": "/**\n * @file src/cbs.h\n * @brief Declarations for FFmpeg Coded Bitstream API.\n */\n#pragma once\n\n// local includes\n#inclu"
},
{
"path": "src/config.cpp",
"chars": 53219,
"preview": "/**\n * @file src/config.cpp\n * @brief Definitions for the configuration of Sunshine.\n */\n// standard includes\n#include <"
},
{
"path": "src/config.h",
"chars": 9041,
"preview": "/**\n * @file src/config.h\n * @brief Declarations for the configuration of Sunshine.\n */\n#pragma once\n\n// standard includ"
},
{
"path": "src/confighttp.cpp",
"chars": 57368,
"preview": "/**\n * @file src/confighttp.cpp\n * @brief Definitions for the Web UI Config HTTPS server.\n *\n * @todo Authentication, be"
},
{
"path": "src/confighttp.h",
"chars": 936,
"preview": "/**\n * @file src/confighttp.h\n * @brief Declarations for the Web UI Config HTTP server.\n */\n#pragma once\n\n// standard in"
},
{
"path": "src/crypto.cpp",
"chars": 16802,
"preview": "/**\n * @file src/crypto.cpp\n * @brief Definitions for cryptography functions.\n */\n// lib includes\n#include <openssl/pem."
},
{
"path": "src/crypto.h",
"chars": 8307,
"preview": "/**\n * @file src/crypto.h\n * @brief Declarations for cryptography functions.\n */\n#pragma once\n\n// standard includes\n#inc"
},
{
"path": "src/display_device.cpp",
"chars": 35458,
"preview": "/**\n * @file src/display_device.cpp\n * @brief Definitions for display device handling.\n */\n// header include\n#include \"d"
},
{
"path": "src/display_device.h",
"chars": 5868,
"preview": "/**\n * @file src/display_device.h\n * @brief Declarations for display device handling.\n */\n#pragma once\n\n// standard incl"
},
{
"path": "src/entry_handler.cpp",
"chars": 6922,
"preview": "/**\n * @file entry_handler.cpp\n * @brief Definitions for entry handling functions.\n */\n// standard includes\n#include <cs"
},
{
"path": "src/entry_handler.h",
"chars": 3133,
"preview": "/**\n * @file entry_handler.h\n * @brief Declarations for entry handling functions.\n */\n#pragma once\n\n// standard includes"
},
{
"path": "src/file_handler.cpp",
"chars": 1310,
"preview": "/**\n * @file file_handler.cpp\n * @brief Definitions for file handling functions.\n */\n\n// standard includes\n#include <fil"
},
{
"path": "src/file_handler.h",
"chars": 1460,
"preview": "/**\n * @file file_handler.h\n * @brief Declarations for file handling functions.\n */\n#pragma once\n\n// standard includes\n#"
},
{
"path": "src/globals.cpp",
"chars": 299,
"preview": "/**\n * @file globals.cpp\n * @brief Definitions for globally accessible variables and functions.\n */\n// local includes\n#i"
},
{
"path": "src/globals.h",
"chars": 1213,
"preview": "/**\n * @file globals.h\n * @brief Declarations for globally accessible variables and functions.\n */\n#pragma once\n\n// loca"
},
{
"path": "src/httpcommon.cpp",
"chars": 7851,
"preview": "/**\n * @file src/httpcommon.cpp\n * @brief Definitions for common HTTP.\n */\n#define BOOST_BIND_GLOBAL_PLACEHOLDERS\n\n// st"
},
{
"path": "src/httpcommon.h",
"chars": 866,
"preview": "/**\n * @file src/httpcommon.h\n * @brief Declarations for common HTTP.\n */\n#pragma once\n\n// lib includes\n#include <curl/c"
},
{
"path": "src/input.cpp",
"chars": 58982,
"preview": "/**\n * @file src/input.cpp\n * @brief Definitions for gamepad, keyboard, and mouse input handling.\n */\n#include <cstdint>"
},
{
"path": "src/input.h",
"chars": 1413,
"preview": "/**\n * @file src/input.h\n * @brief Declarations for gamepad, keyboard, and mouse input handling.\n */\n#pragma once\n\n// st"
},
{
"path": "src/logging.cpp",
"chars": 9561,
"preview": "/**\n * @file src/logging.cpp\n * @brief Definitions for logging related functions.\n */\n// standard includes\n#include <fst"
},
{
"path": "src/logging.h",
"chars": 6528,
"preview": "/**\n * @file src/logging.h\n * @brief Declarations for logging related functions.\n */\n#pragma once\n\n// lib includes\n#incl"
},
{
"path": "src/main.cpp",
"chars": 15138,
"preview": "/**\n * @file src/main.cpp\n * @brief Definitions for the main entry point for Sunshine.\n */\n// standard includes\n#include"
},
{
"path": "src/main.h",
"chars": 342,
"preview": "/**\n * @file src/main.h\n * @brief Declarations for the main entry point for Sunshine.\n */\n#pragma once\n\n/**\n * @brief Ma"
},
{
"path": "src/move_by_copy.h",
"chars": 1381,
"preview": "/**\n * @file src/move_by_copy.h\n * @brief Declarations for the MoveByCopy utility class.\n */\n#pragma once\n\n// standard i"
},
{
"path": "src/network.cpp",
"chars": 5927,
"preview": "/**\n * @file src/network.cpp\n * @brief Definitions for networking related functions.\n */\n// standard includes\n#include <"
},
{
"path": "src/network.h",
"chars": 3285,
"preview": "/**\n * @file src/network.h\n * @brief Declarations for networking related functions.\n */\n#pragma once\n\n// standard includ"
},
{
"path": "src/nvenc/nvenc_base.cpp",
"chars": 26557,
"preview": "/**\n * @file src/nvenc/nvenc_base.cpp\n * @brief Definitions for abstract platform-agnostic base of standalone NVENC enco"
},
{
"path": "src/nvenc/nvenc_base.h",
"chars": 6311,
"preview": "/**\n * @file src/nvenc/nvenc_base.h\n * @brief Declarations for abstract platform-agnostic base of standalone NVENC encod"
},
{
"path": "src/nvenc/nvenc_colorspace.h",
"chars": 451,
"preview": "/**\n * @file src/nvenc/nvenc_colorspace.h\n * @brief Declarations for NVENC YUV colorspace.\n */\n#pragma once\n\n// lib incl"
},
{
"path": "src/nvenc/nvenc_config.h",
"chars": 1922,
"preview": "/**\n * @file src/nvenc/nvenc_config.h\n * @brief Declarations for NVENC encoder configuration.\n */\n#pragma once\n\nnamespac"
},
{
"path": "src/nvenc/nvenc_d3d11.cpp",
"chars": 1859,
"preview": "/**\n * @file src/nvenc/nvenc_d3d11.cpp\n * @brief Definitions for abstract Direct3D11 NVENC encoder.\n */\n// local include"
},
{
"path": "src/nvenc/nvenc_d3d11.h",
"chars": 1099,
"preview": "/**\n * @file src/nvenc/nvenc_d3d11.h\n * @brief Declarations for abstract Direct3D11 NVENC encoder.\n */\n#pragma once\n#ifd"
},
{
"path": "src/nvenc/nvenc_d3d11_native.cpp",
"chars": 2405,
"preview": "/**\n * @file src/nvenc/nvenc_d3d11_native.cpp\n * @brief Definitions for native Direct3D11 NVENC encoder.\n */\n#ifdef _WIN"
},
{
"path": "src/nvenc/nvenc_d3d11_native.h",
"chars": 789,
"preview": "/**\n * @file src/nvenc/nvenc_d3d11_native.h\n * @brief Declarations for native Direct3D11 NVENC encoder.\n */\n#pragma once"
},
{
"path": "src/nvenc/nvenc_d3d11_on_cuda.cpp",
"chars": 9801,
"preview": "/**\n * @file src/nvenc/nvenc_d3d11_on_cuda.cpp\n * @brief Definitions for CUDA NVENC encoder with Direct3D11 input surfac"
},
{
"path": "src/nvenc/nvenc_d3d11_on_cuda.h",
"chars": 2535,
"preview": "/**\n * @file src/nvenc/nvenc_d3d11_on_cuda.h\n * @brief Declarations for CUDA NVENC encoder with Direct3D11 input surface"
},
{
"path": "src/nvenc/nvenc_encoded_frame.h",
"chars": 417,
"preview": "/**\n * @file src/nvenc/nvenc_encoded_frame.h\n * @brief Declarations for NVENC encoded frame.\n */\n#pragma once\n\n// standa"
},
{
"path": "src/nvenc/nvenc_utils.cpp",
"chars": 2812,
"preview": "/**\n * @file src/nvenc/nvenc_utils.cpp\n * @brief Definitions for NVENC utilities.\n */\n// standard includes\n#include <cas"
},
{
"path": "src/nvenc/nvenc_utils.h",
"chars": 679,
"preview": "/**\n * @file src/nvenc/nvenc_utils.h\n * @brief Declarations for NVENC utilities.\n */\n#pragma once\n\n// plafform includes\n"
},
{
"path": "src/nvhttp.cpp",
"chars": 66589,
"preview": "/**\n * @file src/nvhttp.cpp\n * @brief Definitions for the nvhttp (GameStream) server.\n */\n// macros\n#define BOOST_BIND_G"
},
{
"path": "src/nvhttp.h",
"chars": 8706,
"preview": "/**\n * @file src/nvhttp.h\n * @brief Declarations for the nvhttp (GameStream) server.\n */\n// macros\n#pragma once\n\n// stan"
},
{
"path": "src/platform/common.h",
"chars": 26593,
"preview": "/**\n * @file src/platform/common.h\n * @brief Declarations for common platform specific utilities.\n */\n#pragma once\n\n// s"
},
{
"path": "src/platform/linux/audio.cpp",
"chars": 16090,
"preview": "/**\n * @file src/platform/linux/audio.cpp\n * @brief Definitions for audio control on Linux.\n */\n// standard includes\n#in"
},
{
"path": "src/platform/linux/cuda.cpp",
"chars": 30640,
"preview": "/**\n * @file src/platform/linux/cuda.cpp\n * @brief Definitions for CUDA encoding.\n */\n// standard includes\n#include <bit"
},
{
"path": "src/platform/linux/cuda.cu",
"chars": 10984,
"preview": "/**\n * @file src/platform/linux/cuda.cu\n * @brief CUDA implementation for Linux.\n */\n// standard includes\n#include <chro"
},
{
"path": "src/platform/linux/cuda.h",
"chars": 3457,
"preview": "/**\n * @file src/platform/linux/cuda.h\n * @brief Definitions for CUDA implementation.\n */\n#pragma once\n\n#if defined(SUNS"
},
{
"path": "src/platform/linux/graphics.cpp",
"chars": 30552,
"preview": "/**\n * @file src/platform/linux/graphics.cpp\n * @brief Definitions for graphics related functions.\n */\n// standard inclu"
},
{
"path": "src/platform/linux/graphics.h",
"chars": 8519,
"preview": "/**\n * @file src/platform/linux/graphics.h\n * @brief Declarations for graphics related functions.\n */\n#pragma once\n\n// s"
},
{
"path": "src/platform/linux/input/inputtino.cpp",
"chars": 4104,
"preview": "/**\n * @file src/platform/linux/input/inputtino.cpp\n * @brief Definitions for the inputtino Linux input handling.\n */\n//"
},
{
"path": "src/platform/linux/input/inputtino_common.h",
"chars": 3192,
"preview": "/**\n * @file src/platform/linux/input/inputtino_common.h\n * @brief Declarations for inputtino common input handling.\n */"
},
{
"path": "src/platform/linux/input/inputtino_gamepad.cpp",
"chars": 13494,
"preview": "/**\n * @file src/platform/linux/input/inputtino_gamepad.cpp\n * @brief Definitions for inputtino gamepad input handling.\n"
},
{
"path": "src/platform/linux/input/inputtino_gamepad.h",
"chars": 1117,
"preview": "/**\n * @file src/platform/linux/input/inputtino_gamepad.h\n * @brief Declarations for inputtino gamepad input handling.\n "
},
{
"path": "src/platform/linux/input/inputtino_keyboard.cpp",
"chars": 5136,
"preview": "/**\n * @file src/platform/linux/input/inputtino_keyboard.cpp\n * @brief Definitions for inputtino keyboard input handling"
},
{
"path": "src/platform/linux/input/inputtino_keyboard.h",
"chars": 524,
"preview": "/**\n * @file src/platform/linux/input/inputtino_keyboard.h\n * @brief Declarations for inputtino keyboard input handling."
},
{
"path": "src/platform/linux/input/inputtino_mouse.cpp",
"chars": 2298,
"preview": "/**\n * @file src/platform/linux/input/inputtino_mouse.cpp\n * @brief Definitions for inputtino mouse input handling.\n */\n"
},
{
"path": "src/platform/linux/input/inputtino_mouse.h",
"chars": 772,
"preview": "/**\n * @file src/platform/linux/input/inputtino_mouse.h\n * @brief Declarations for inputtino mouse input handling.\n */\n#"
},
{
"path": "src/platform/linux/input/inputtino_pen.cpp",
"chars": 2460,
"preview": "/**\n * @file src/platform/linux/input/inputtino_pen.cpp\n * @brief Definitions for inputtino pen input handling.\n */\n// l"
},
{
"path": "src/platform/linux/input/inputtino_pen.h",
"chars": 471,
"preview": "/**\n * @file src/platform/linux/input/inputtino_pen.h\n * @brief Declarations for inputtino pen input handling.\n */\n#prag"
},
{
"path": "src/platform/linux/input/inputtino_touch.cpp",
"chars": 1701,
"preview": "/**\n * @file src/platform/linux/input/inputtino_touch.cpp\n * @brief Definitions for inputtino touch input handling.\n */\n"
},
{
"path": "src/platform/linux/input/inputtino_touch.h",
"chars": 481,
"preview": "/**\n * @file src/platform/linux/input/inputtino_touch.h\n * @brief Declarations for inputtino touch input handling.\n */\n#"
},
{
"path": "src/platform/linux/kmsgrab.cpp",
"chars": 59459,
"preview": "/**\n * @file src/platform/linux/kmsgrab.cpp\n * @brief Definitions for KMS screen capture.\n */\n// standard includes\n#incl"
},
{
"path": "src/platform/linux/misc.cpp",
"chars": 34921,
"preview": "/**\n * @file src/platform/linux/misc.cpp\n * @brief Miscellaneous definitions for Linux.\n */\n\n// Required for in6_pktinfo"
},
{
"path": "src/platform/linux/misc.h",
"chars": 668,
"preview": "/**\n * @file src/platform/linux/misc.h\n * @brief Miscellaneous declarations for Linux.\n */\n#pragma once\n\n// standard inc"
},
{
"path": "src/platform/linux/publish.cpp",
"chars": 15554,
"preview": "/**\n * @file src/platform/linux/publish.cpp\n * @brief Definitions for publishing services on Linux.\n * @note Adapted fro"
},
{
"path": "src/platform/linux/vaapi.cpp",
"chars": 19901,
"preview": "/**\n * @file src/platform/linux/vaapi.cpp\n * @brief Definitions for VA-API hardware accelerated capture.\n */\n// standard"
},
{
"path": "src/platform/linux/vaapi.h",
"chars": 1102,
"preview": "/**\n * @file src/platform/linux/vaapi.h\n * @brief Declarations for VA-API hardware accelerated capture.\n */\n#pragma once"
},
{
"path": "src/platform/linux/wayland.cpp",
"chars": 16458,
"preview": "/**\n * @file src/platform/linux/wayland.cpp\n * @brief Definitions for Wayland capture.\n */\n// standard includes\n#include"
},
{
"path": "src/platform/linux/wayland.h",
"chars": 7073,
"preview": "/**\n * @file src/platform/linux/wayland.h\n * @brief Declarations for Wayland capture.\n */\n#pragma once\n\n// standard incl"
},
{
"path": "src/platform/linux/wlgrab.cpp",
"chars": 13836,
"preview": "/**\n * @file src/platform/linux/wlgrab.cpp\n * @brief Definitions for wlgrab capture.\n */\n// standard includes\n#include <"
},
{
"path": "src/platform/linux/x11grab.cpp",
"chars": 26394,
"preview": "/**\n * @file src/platform/linux/x11grab.cpp\n * @brief Definitions for x11 capture.\n */\n// standard includes\n#include <fs"
},
{
"path": "src/platform/linux/x11grab.h",
"chars": 997,
"preview": "/**\n * @file src/platform/linux/x11grab.h\n * @brief Declarations for x11 capture.\n */\n#pragma once\n\n// standard includes"
},
{
"path": "src/platform/macos/av_audio.h",
"chars": 830,
"preview": "/**\n * @file src/platform/macos/av_audio.h\n * @brief Declarations for audio capture on macOS.\n */\n#pragma once\n\n// platf"
}
]
// ... and 230 more files (download for full content)
About this extraction
This page contains the full source code of the ClassicOldSong/Apollo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 430 files (3.7 MB), approximately 1.0M tokens, and a symbol index with 2122 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.