#6007

build: honor VA-API feature flag in configuration

Openchewiwants to merge intofrom

Description

Gentoo either uses the system libva or nothing at all, never the copy from build-deps, so check whether SUNSHINE_BUILD_VAAPI is defined before trying to use the headers.

The FFmpeg headers are copied while excluding va/ to ensure that the system libva headers are used. However, Gentoo runs Sunshine's CMake before the prepared binaries are built and installed, so the include directory won't exist yet, causing this copy to fail. Avoid this failure by checking whether va/ even exists. If headers are present but va/ is not, then there is no point in trying to exclude it.

Gentoo would need to work around this by removing the va/ directory between the FFmpeg and Sunshine builds, but there is no need because it builds FFmpeg with the system libva headers anyway.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

I have locally build tested and done a quick manual run on Gentoo.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Activity

8
ReenigneArcherapproved changes2d ago
ReenigneArcherrequested changes2d ago
ReenigneArcher2d ago

I approved this before I saw your other PR (https://github.com/LizardByte/Sunshine/pull/5992). I think these can be combined into one PR.

codecov[bot]2d ago

Bundle Report

Bundle size has no change :white_check_mark:

codecov[bot]1d ago

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 46.15%. Comparing base (a679b05) to head (b8f7354). :white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files

@@            Coverage Diff            @@
##           master    #6007     +/-   ##
=========================================
  Coverage   46.15%   46.15%             
=========================================
  Files         140      140             
  Lines       30462    30462             
  Branches    13114    13114             
=========================================
  Hits        14059    14059             
+ Misses      14855    12743   -2112     
- Partials     1548     3660   +2112     
FlagCoverage Δ
Alpine-aarch6430.78% <ø> (+<0.01%):arrow_up:
Alpine-x86_6430.90% <ø> (ø)
Archlinux28.64% <ø> (ø)
FreeBSD-amd6430.53% <ø> (-0.01%):arrow_down:
Homebrew-macos-1547.10% <ø> (+0.02%):arrow_up:
Homebrew-macos-2647.49% <ø> (ø)
Homebrew-ubuntu-24.0431.51% <ø> (ø)
PowerShell100.00% <ø> (ø)
Web-UI56.65% <ø> (ø)
Windows-AMD6439.01% <ø> (ø)
Windows-ARM6433.27% <ø> (ø)
macOS-arm6438.96% <ø> (ø)
macOS-x86_6439.53% <ø> (+<0.01%):arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing linesCoverage Δ
src/config.cpp62.61% <ø> (ø)

... and 48 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a679b05...b8f7354. Read the comment docs.

github-actions[bot]1d ago
Last Updated2026-10-29 03:31:40 UTC
Source RunCI Run #6472
Commitb8f7354fa086a3f8644bdc33be578c36118615a5

Screenshot Comparison

PR #6007 screenshots vs screenshots baseline.

Matrix: Windows-AMD64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png