Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Allow a custom FFmpeg build to be provided using CMake variables

Open chewi opened this issue 1 year ago • 2 comments

Description

For the Gentoo Linux package, we need to be able to use our own build of FFmpeg. We do not use the existing system installation as I understand that is sadly not possible. We do apply your patches for FFmpeg itself and libcbs.

I wanted to add CMake options here for completeness, but then realised they're only for booleans. I considered globbing for *.a for more flexibility, but the linking order does matter. It's just a coincidence that the alphanumeric order happens to be the correct order at present.

This is best viewed without whitespace changes.

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Dependency update (updates to dependencies)
  • [ ] Documentation update (changes to documentation)
  • [ ] Repository update (changes to repository files, e.g. .github/...)

Checklist

  • [X] My code follows the style guidelines of this project
  • [X] I have performed a self-review of my own code
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [X] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.

  • [X] I want maintainers to keep my branch updated

chewi avatar Jan 01 '24 11:01 chewi

This is a long shot, but maybe you could help with this?

https://github.com/LizardByte/Sunshine/pull/1954

I'm trying to install boost from source on our macos build to save ~20 minutes of CI time. Somehow openssl headers aren't able to be found after this change. https://github.com/LizardByte/Sunshine/pull/1954#issuecomment-1873062249

ReenigneArcher avatar Jan 01 '24 16:01 ReenigneArcher

This is a long shot, but maybe you could help with this?

Sorry, I deal with a number of environments but practically never encounter Macs. You had a hack to fix the OpenSSL headers before, perhaps that needs removing or adjusting now that you're explicitly installing it.

chewi avatar Jan 01 '24 16:01 chewi

Of course, I am perfectly happy to fix any breakage. Having this merged still reduces my own maintenance burden.

Because the system-wide ffmpeg build cannot be used, the versioned Gentoo Sunshine package uses exactly the same ffmpeg release for everybody, currently 6.1.1. The "live" package, which is built from git and is understood to be potentially unstable, uses most of the submodules as you have them. Apart from being able to disable CUDA, AV1, VA-API, or x26[45], ffmpeg is also built the same way for everybody. I therefore don't anticipate any Gentoo-specific problems in this area, but the package does instruct users to contact us first, just as we agreed. If anyone comes here first, then please send them back to bugs.gentoo.org.

chewi avatar May 13 '24 20:05 chewi

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 6.82%. Comparing base (542cc71) to head (a9d3138).

Additional details and impacted files
@@            Coverage Diff             @@
##           nightly   #1970      +/-   ##
==========================================
- Coverage     6.99%   6.82%   -0.17%     
==========================================
  Files           87      87              
  Lines        17679   17678       -1     
  Branches      8399    8399              
==========================================
- Hits          1237    1207      -30     
- Misses       13808   15781    +1973     
+ Partials      2634     690    -1944     
Flag Coverage Δ
Linux 5.34% <ø> (ø)
Windows 2.56% <ø> (ø)
macOS-12 7.99% <ø> (ø)
macOS-13 ?
macOS-14 ?

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

see 32 files with indirect coverage changes

codecov[bot] avatar May 13 '24 22:05 codecov[bot]