build-aux: Replace Flatpak modules with pre-compiled dependencies

To reduce compile time and prepare for aarch64 support, dependencies
compilation except CEF is moved to a BuildStream project junctionned
with Freedesktop SDK.

The BuildStream project is configured to build dependencies in a
Flatpak-like environment.
This commit is contained in:
tytan652 2024-06-30 19:59:56 +02:00 committed by Ryan Foster
parent 1290898c74
commit 081b684959
37 changed files with 75 additions and 933 deletions

View File

@ -312,7 +312,7 @@ jobs:
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
cache_key='flatpak-builder-${{ hashFiles('build-aux/**/*.json') }}'
cache_key='flatpak-builder-${{ hashFiles('build-aux/com.obsproject.Studio.json') }}'
cache_ref='master'
read -r id key size unit created accessed <<< \
"$(gh cache list --ref "refs/heads/${cache_ref}" --key "${cache_key}-x86_64" | head -1)"

View File

@ -153,7 +153,7 @@ jobs:
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
cache_key='flatpak-builder-${{ hashFiles('build-aux/**/*.json') }}'
cache_key='flatpak-builder-${{ hashFiles('build-aux/com.obsproject.Studio.json') }}'
cache_ref='master'
read -r id key size unit created accessed <<< \
"$(gh cache list --ref "refs/heads/${cache_ref}" --key "${cache_key}-x86_64" | head -1)"

View File

@ -49,24 +49,3 @@ Example of use:
```sh
python3 ./build-aux/format-manifest.py com.obsproject.Studio.json
```
## OBS Studio Flatpak Manifest
The manifest is composed of multiple files:
- The main manifest `com.obsproject.Studio.json`
- The `modules` folder which contains OBS Studio dependencies modules
### Manifest modules
Modules are ordered/dispatched in numbered categories following a short list of rules:
- A module must not depend on another module from the same category, so a module can only depend on modules from lower numbered categories.
- A module without dependencies must be placed in the highest numbered category in use, excluding categories meant for specific types of dependency.
Actual categories:
- `99-`: CEF
- `90-`: Headers-only libraries that are dependencies of only OBS Studio
- `50-`: Modules that are dependencies of only OBS Studio
- `40-`: Modules that are dependencies of the `50-` category
- `30-`: FFmpeg
- `20-`: Modules that are dependencies of FFmpeg
- `10-`: Modules that are dependencies of the `20-` category

View File

@ -37,37 +37,79 @@
"no-autodownload": true
}
},
"cleanup": [
"/share/man",
"*.la"
],
"modules": [
"modules/10-mbedtls.json",
"modules/20-librist.json",
"modules/20-nv-codec.json",
"modules/20-srt.json",
"modules/20-svt-av1.json",
"modules/20-x264.json",
"modules/30-ffmpeg.json",
"modules/40-luajit.json",
"modules/40-plog.json",
"modules/40-usrsctp.json",
"modules/50-intel-media-sdk.json",
"modules/50-jansson.json",
"modules/50-libdatachannel.json",
"modules/50-libqrcodegencpp.json",
"modules/50-libvpl.json",
"modules/50-ntv2.json",
"modules/50-rnnoise.json",
"modules/50-swig.json",
"modules/50-v4l-utils.json",
"modules/50-vpl-gpu-rt.json",
"modules/90-asio.json",
"modules/90-nlohmann-json.json",
"modules/90-simde.json",
"modules/90-uthash.json",
"modules/90-websocketpp.json",
"modules/99-cef.json",
{
"name": "obs-deps-base",
"buildsystem": "simple",
"build-commands": [
"tar -xvf base.tar.xz -C /"
],
"sources": [
{
"type": "file",
"dest-filename": "base.tar.xz",
"url": "https://github.com/obsproject/obs-deps-buildstream/releases/download/2025-10-03/flatpak-base-x86_64-2025-10-03.tar.xz",
"sha256": "5bb40382cf587c0f20f6bead0f93f41ab0ea252a49f3d3ea73e8d554eb44ef6d"
}
]
},
{
"name": "obs-deps-devel",
"buildsystem": "simple",
"build-commands": [
"tar -xvf devel.tar.xz -C /"
],
"sources": [
{
"type": "file",
"dest-filename": "devel.tar.xz",
"url": "https://github.com/obsproject/obs-deps-buildstream/releases/download/2025-10-03/flatpak-devel-x86_64-2025-10-03.tar.xz",
"sha256": "69dbbb2f0097503b5c4acd9ee5834f44fc6276e9d3b4ab70526f0ef0292a9797"
}
]
},
{
"name": "obs-deps-devtools",
"buildsystem": "simple",
"build-commands": [
"tar -xvf devtools.tar.xz -C /"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "file",
"dest-filename": "devtools.tar.xz",
"url": "https://github.com/obsproject/obs-deps-buildstream/releases/download/2025-10-03/flatpak-devtools-x86_64-2025-10-03.tar.xz",
"sha256": "db1e9b7804c3f9f08b3a4321166abfb53462c9f6e6d6ca5a26eb36b8cfa23df3"
}
]
},
{
"name": "cef",
"build-options": {
"no-debuginfo": true
},
"buildsystem": "simple",
"build-commands": [
"mkdir -p /app/cef/libcef_dll_wrapper",
"cp -R ./include /app/cef",
"cp -R ./Release /app/cef",
"cp -R ./Resources /app/cef",
"cp -R ./build/libcef_dll_wrapper/libcef_dll_wrapper.a /app/cef/libcef_dll_wrapper"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "archive",
"url": "https://cdn-fastly.obsproject.com/downloads/cef_binary_6533_linux_x86_64_v6.tar.xz",
"sha256": "7963335519a19ccdc5233f7334c5ab023026e2f3e9a0cc417007c09d86608146"
}
]
},
{
"name": "obs",
"buildsystem": "cmake-ninja",

View File

@ -39,41 +39,12 @@ def main() -> int:
manifest_string = manifest.read()
manifest_data = json.loads(manifest_string)
module_list = manifest_data.get("modules", [])
obs_object = module_list[-1]
if type(obs_object) != dict:
logger.error(
f"❌ Last element in modules list is not the obs-studio object"
)
return 2
new_module_list = []
for module in module_list:
if type(module) == str:
if not os.path.isfile(os.path.join(manifest_path, module)):
logger.warning(
f"⚠️ Specified module {os.path.basename(module)} not found."
)
continue
new_module_list.append(module)
new_module_list.sort()
new_module_list.append(obs_object)
manifest_data["modules"] = new_module_list
new_manifest_string = (
f"{json.dumps(manifest_data, indent=4, ensure_ascii=False)}\n"
)
if arguments.check:
if new_module_list != module_list:
logger.error(f"❌ Module list failed order validation")
return 2
elif new_manifest_string != manifest_string:
if new_manifest_string != manifest_string:
logger.error(f"❌ Manifest file is not correctly formatted")
return 2
else:

View File

@ -1,24 +0,0 @@
{
"name": "mbedtls",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
"-DUSE_SHARED_MBEDTLS_LIBRARY=ON",
"-DUSE_STATIC_MBEDTLS_LIBRARY=OFF",
"-DENABLE_TESTING=OFF",
"-DENABLE_PROGRAMS=OFF"
],
"cleanup": [
"/include"
],
"sources": [
{
"type": "git",
"url": "https://github.com/Mbed-TLS/mbedtls.git",
"commit": "c765c831e5c2a0971410692f92f7a81d6ec65ec2",
"tag": "v3.6.4"
}
]
}

View File

@ -1,25 +0,0 @@
{
"name": "aom",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DBUILD_SHARED_LIBS=ON",
"-DENABLE_DOCS=OFF",
"-DENABLE_EXAMPLES=OFF",
"-DENABLE_TESTDATA=OFF",
"-DENABLE_TESTS=OFF",
"-DENABLE_TOOLS=OFF "
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://aomedia.googlesource.com/aom.git",
"tag": "v3.9.0",
"commit": "6cab58c3925e0f4138e15a4ed510161ea83b6db1"
}
]
}

View File

@ -1,22 +0,0 @@
{
"name": "librist",
"buildsystem": "meson",
"builddir": true,
"config-opts": [
"-Duse_mbedtls=true",
"-Dtest=false",
"-Dbuilt_tools=false",
"-Dbuiltin_cjson=true"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://code.videolan.org/rist/librist.git",
"commit": "809390b3b75a259a704079d0fb4d8f1b5f7fa956"
}
]
}

View File

@ -1,18 +0,0 @@
{
"name": "nv-codec",
"no-autogen": true,
"make-install-args": [
"PREFIX=/app"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "git",
"url": "https://github.com/FFmpeg/nv-codec-headers.git",
"tag": "n12.2.72.0",
"commit": "c69278340ab1d5559c7d7bf0edf615dc33ddbba7"
}
]
}

View File

@ -1,23 +0,0 @@
{
"name": "srt",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_STATIC=OFF",
"-DENABLE_APPS=OFF",
"-DENABLE_LOGGING=OFF"
],
"cleanup": [
"/include",
"/lib/pkgconfig",
"/bin"
],
"sources": [
{
"type": "git",
"url": "https://github.com/Haivision/srt.git",
"tag": "v1.5.3",
"commit": "09f35c0f1743e23f514cb41444504a7faeacf89e"
}
]
}

View File

@ -1,25 +0,0 @@
{
"name": "svt-av1",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_SHARED_LIBS=ON",
"-DBUILD_APPS=OFF",
"-DBUILD_DEC=ON",
"-DBUILD_ENC=ON",
"-DBUILD_TESTING=OFF"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.com/AOMediaCodec/SVT-AV1.git",
"tag": "v2.3.0",
"commit": "6e69def4ec283fe0b71195671245c3b768bebdef"
}
]
}

View File

@ -1,18 +0,0 @@
{
"name": "x264",
"config-opts": [
"--disable-cli",
"--enable-shared"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://code.videolan.org/videolan/x264.git",
"commit": "eaa68fad9e5d201d42fde51665f2d137ae96baf0"
}
]
}

View File

@ -1,54 +0,0 @@
{
"name": "ffmpeg",
"config-opts": [
"--enable-gpl",
"--enable-shared",
"--disable-static",
"--enable-gnutls",
"--disable-doc",
"--disable-programs",
"--disable-devices",
"--enable-libopus",
"--enable-libvpx",
"--enable-libvorbis",
"--enable-libx264",
"--enable-nvenc",
"--enable-libsrt",
"--enable-librist",
"--enable-libaom",
"--enable-libsvtav1"
],
"cleanup": [
"/share/ffmpeg"
],
"sources": [
{
"type": "git",
"url": "https://github.com/FFmpeg/FFmpeg.git",
"tag": "n7.1.1",
"commit": "db69d06eeeab4f46da15030a80d539efb4503ca8",
"disable-shallow-clone": true
},
{
"type": "git",
"dest": "obs-deps",
"url": "https://github.com/obsproject/obs-deps.git",
"tag": "2024-09-05",
"commit": "45b7d2cfac0e2ac256d458c7466a925b0a94de35"
},
{
"type": "patch",
"paths": [
"patches/ffmpeg/0001-lavc-vaapi_encode-Query-surface-alignment.patch",
"patches/ffmpeg/0002-lavc-vaapi_encode_h265-Use-surface-alignment.patch"
]
},
{
"type": "shell",
"commands": [
"patch -Np1 -i obs-deps/deps.ffmpeg/patches/FFmpeg/0001-flvdec-handle-unknown.patch",
"patch -Np1 -i obs-deps/deps.ffmpeg/patches/FFmpeg/0002-libaomenc-presets.patch"
]
}
]
}

View File

@ -1,24 +0,0 @@
{
"name": "luajit",
"no-autogen": true,
"cleanup": [
"/bin",
"/include",
"/lib/pkgconfig",
"*.a"
],
"sources": [
{
"type": "git",
"url": "https://github.com/LuaJIT/LuaJIT.git",
"commit": "a4f56a459a588ae768801074b46ba0adcfb49eb1",
"disable-shallow-clone": true
},
{
"type": "shell",
"commands": [
"sed -i 's|/usr/local|/app|' ./Makefile"
]
}
]
}

View File

@ -1,19 +0,0 @@
{
"name": "plog",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DPLOG_BUILD_SAMPLES=OFF"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "git",
"url": "https://github.com/SergiusTheBest/plog.git",
"tag": "1.1.10",
"commit": "e21baecd4753f14da64ede979c5a19302618b752"
}
]
}

View File

@ -1,22 +0,0 @@
{
"name": "usrsctp",
"buildsystem": "cmake-ninja",
"//": "Disable SCTP IP code. Packets are handle by WebRTC so we don't need it",
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-Dsctp_build_shared_lib=ON",
"-Dsctp_build_programs=OFF",
"-Dsctp_inet=OFF",
"-Dsctp_inet6=OFF",
"-Dsctp_werror=OFF",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
],
"sources": [
{
"type": "git",
"url": "https://github.com/sctplab/usrsctp.git",
"tag": "0.9.5.0",
"commit": "07f871bda23943c43c9e74cc54f25130459de830"
}
]
}

View File

@ -1,34 +0,0 @@
{
"name": "intel-media-sdk",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_SAMPLES=OFF",
"-DBUILD_TUTORIALS=OFF",
"-DENABLE_OPENCL=OFF",
"-DENABLE_WAYLAND=OFF",
"-DENABLE_X11=OFF",
"-DENABLE_X11_DRI3=OFF"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://github.com/Intel-Media-SDK/MediaSDK.git",
"commit": "869b60a6c3d7b5e9f7c3b3b914986322dca4bbae",
"tag": "intel-mediasdk-23.2.2"
},
{
"type": "patch",
"path": "patches/intel-media-sdk/010-intel-media-sdk-fix-reproducible-build.patch"
},
{
"type": "patch",
"path": "patches/intel-media-sdk/020-intel-media-sdk-gcc13-fix.patch"
}
]
}

View File

@ -1,24 +0,0 @@
{
"name": "jansson",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DJANSSON_EXAMPLES=OFF",
"-DJANSSON_BUILD_DOCS=OFF",
"-DJANSSON_BUILD_SHARED_LIBS=ON",
"-DJANSSON_WITHOUT_TESTS=ON"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://github.com/akheron/jansson.git",
"tag": "v2.14",
"commit": "684e18c927e89615c2d501737e90018f4930d6c5"
}
]
}

View File

@ -1,21 +0,0 @@
{
"name": "libdatachannel",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DNO_EXAMPLES=ON",
"-DNO_TESTS=ON",
"-DNO_WEBSOCKET=ON",
"-DUSE_NICE=ON",
"-DPREFER_SYSTEM_LIB=ON"
],
"sources": [
{
"type": "git",
"url": "https://github.com/paullouisageneau/libdatachannel.git",
"disable-submodules": true,
"tag": "v0.21.1",
"commit": "898bdffe7340134f0891633cc7a6f6d2132c31c3"
}
]
}

View File

@ -1,27 +0,0 @@
{
"name": "libqrcodegencpp",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_SHARED_LIBS=ON"
],
"post-install": [
"rm -rf /app/include/qrcodegen",
"rm -rf /app/lib/cmake/qrcodegen",
"rm -rf /app/lib/pkgconfig/qrcodegen.pc",
"rm -rf /app/lib/libqrcodegen.*"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/nayuki/QR-Code-generator/archive/refs/tags/v1.8.0.tar.gz",
"sha256": "2ec0a4d33d6f521c942eeaf473d42d5fe139abcfa57d2beffe10c5cf7d34ae60"
},
{
"type": "archive",
"url": "https://github.com/EasyCoding/qrcodegen-cmake/archive/refs/tags/v1.8.0-cmake3.tar.gz",
"sha256": "2037b0596e5651ce020f4d36e958d24672dbee75631bdb09ae8a45659121f4d0"
}
]
}

View File

@ -1,25 +0,0 @@
{
"name": "libvpl",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_LIBDIR_IN_RUNTIME_SEARCH=ON",
"-DINSTALL_DEV=ON",
"-DBUILD_EXAMPLES=OFF",
"-DBUILD_EXPERIMENTAL=OFF",
"-DBUILD_SHARED_LIBS=ON"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://github.com/intel/libvpl.git",
"commit": "025d43d086a3e663184cb49febe86152bf05409f",
"tag": "v2.14.0"
}
]
}

View File

@ -1,30 +0,0 @@
{
"name": "ntv2",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DAJANTV2_BUILD_OPENSOURCE=ON",
"-DAJANTV2_BUILD_SHARED=OFF",
"-DAJANTV2_DISABLE_DEMOS=ON",
"-DAJANTV2_DISABLE_DRIVER=ON",
"-DAJANTV2_DISABLE_TESTS=ON",
"-DAJANTV2_DISABLE_TOOLS=ON",
"-DAJANTV2_DISABLE_PLUGINS=ON",
"-DAJA_INSTALL_HEADERS=ON",
"-DAJA_INSTALL_SOURCES=OFF",
"-DAJA_INSTALL_MISC=OFF",
"-DAJA_INSTALL_CMAKE=OFF"
],
"cleanup": [
"/include"
],
"sources": [
{
"type": "git",
"url": "https://github.com/aja-video/libajantv2.git",
"tag": "ntv2_17_0_1",
"commit": "b6acce6b135c3d9ae7a2bce966180b159ced619f"
}
]
}

View File

@ -1,32 +0,0 @@
{
"name": "pipewire",
"buildsystem": "meson",
"config-opts": [
"-Daudiotestsrc=disabled",
"-Droc=disabled",
"-Dvideotestsrc=disabled",
"-Dvolume=disabled",
"-Dvulkan=disabled",
"-Ddocs=disabled",
"-Dman=disabled",
"-Dbluez5-codec-ldac=disabled",
"-Dbluez5-codec-aptx=disabled",
"-Dlibcamera=disabled",
"-Dudevrulesdir=/app/lib/udev/rules.d/",
"-Dsession-managers=[]",
"-Dtests=disabled",
"-Dexamples=disabled",
"-Dpw-cat=disabled"
],
"cleanup": [
"/bin"
],
"sources": [
{
"type": "git",
"url": "https://github.com/pipewire/pipewire.git",
"tag": "0.3.65",
"commit": "9558a5d5e0360d8af822431c76ee858a8c7495ac"
}
]
}

View File

@ -1,21 +0,0 @@
{
"name": "rnnoise",
"config-opts": [
"--enable-shared",
"-C",
"--disable-dependency-tracking",
"--disable-doc",
"--disable-examples"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://github.com/xiph/rnnoise.git",
"commit": "085d8f484af6141b1b88281a4043fb9215cead01"
}
]
}

View File

@ -1,21 +0,0 @@
{
"name": "swig",
"config-opts": [
"--without-boost",
"--without-pcre",
"--without-alllang",
"--with-lua=/app/bin/luajit-2.1.0-beta3",
"--with-luaincl=/app/include/luajit-2.1",
"--with-python3"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "archive",
"url": "https://prdownloads.sourceforge.net/swig/swig-4.0.2.tar.gz",
"sha256": "d53be9730d8d58a16bf0cbd1f8ac0c0c3e1090573168bfa151b01eb47fa906fc"
}
]
}

View File

@ -1,22 +0,0 @@
{
"name": "v4l-utils",
"config-opts": [
"--disable-static",
"--disable-doxygen-doc",
"--disable-libdvbv5",
"--disable-v4l-utils",
"--disable-qv4l2",
"--with-udevdir=/app/lib/udev/"
],
"cleanup": [
"/include",
"/lib/pkgconfig"
],
"sources": [
{
"type": "archive",
"url": "https://linuxtv.org/downloads/v4l-utils/v4l-utils-1.22.0.tar.bz2",
"sha256": "1069e5d7909bcc563baeaadc3a5c496f0e658524c413cf7818816e37bfcea344"
}
]
}

View File

@ -1,28 +0,0 @@
{
"name": "vpl-gpu-rt",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_RUNTIME=ON",
"-DBUILD_TESTS=OFF",
"-DBUILD_TOOLS=OFF"
],
"cleanup": [
"/lib/pkgconfig"
],
"sources": [
{
"type": "git",
"url": "https://github.com/intel/vpl-gpu-rt.git",
"commit": "7277c25ec5362e92d2fa334e2ce356c473ba4778",
"tag": "intel-onevpl-24.4.4"
},
{
"type": "shell",
"commands": [
"sed -i 's/CMAKE_VERBOSE_MAKEFILE ON/CMAKE_VERBOSE_MAKEFILE OFF/g' builder/profiles/onevpl.cmake"
]
}
]
}

View File

@ -1,17 +0,0 @@
{
"name": "asio",
"buildsystem": "simple",
"build-commands": [
"mkdir -p /app/include",
"cp asio/include/asio.hpp /app/include/",
"cp -R asio/include/asio /app/include/"
],
"sources": [
{
"type": "git",
"url": "https://github.com/chriskohlhoff/asio.git",
"tag": "asio-1-32-0",
"commit": "03ae834edbace31a96157b89bf50e5ee464e5ef9"
}
]
}

View File

@ -1,17 +0,0 @@
{
"name": "nlohmann-json",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DJSON_BuildTests=OFF"
],
"sources": [
{
"type": "git",
"url": "https://github.com/nlohmann/json.git",
"tag": "v3.11.3",
"commit": "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03"
}
]
}

View File

@ -1,16 +0,0 @@
{
"name": "simde",
"buildsystem": "meson",
"builddir": true,
"config-opts": [
"-Dtests=false"
],
"sources": [
{
"type": "git",
"url": "https://github.com/simd-everywhere/simde.git",
"tag": "v0.8.2",
"commit": "71fd833d9666141edcd1d3c109a80e228303d8d7"
}
]
}

View File

@ -1,19 +0,0 @@
{
"name": "uthash",
"buildsystem": "simple",
"build-commands": [
"mkdir -p /app/include",
"cp src/{utarray.h,uthash.h,utlist.h,utringbuffer.h,utstack.h,utstring.h} /app/include/"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "git",
"url": "https://github.com/troydhanson/uthash.git",
"tag": "v2.3.0",
"commit": "e493aa90a2833b4655927598f169c31cfcdf7861"
}
]
}

View File

@ -1,19 +0,0 @@
{
"name": "websocketpp",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_CPP11=ON",
"-DBUILD_EXAMPLES=OFF",
"-DBUILD_TESTS=OFF"
],
"sources": [
{
"type": "git",
"url": "https://github.com/zaphoyd/websocketpp.git",
"tag": "0.8.2",
"commit": "56123c87598f8b1dd471be83ca841ceae07f95ba"
}
]
}

View File

@ -1,24 +0,0 @@
{
"name": "cef",
"build-options": {
"no-debuginfo": true
},
"buildsystem": "simple",
"build-commands": [
"mkdir -p /app/cef/libcef_dll_wrapper",
"cp -R ./include /app/cef",
"cp -R ./Release /app/cef",
"cp -R ./Resources /app/cef",
"cp -R ./build/libcef_dll_wrapper/libcef_dll_wrapper.a /app/cef/libcef_dll_wrapper"
],
"cleanup": [
"*"
],
"sources": [
{
"type": "archive",
"url": "https://cdn-fastly.obsproject.com/downloads/cef_binary_6533_linux_x86_64_v6.tar.xz",
"sha256": "7963335519a19ccdc5233f7334c5ab023026e2f3e9a0cc417007c09d86608146"
}
]
}

View File

@ -1,115 +0,0 @@
From bcfbf2bac8f9eeeedc407b40596f5c7aaa0d5b47 Mon Sep 17 00:00:00 2001
From: David Rosca <nowrep@gmail.com>
Date: Tue, 22 Oct 2024 17:26:58 +0200
Subject: [PATCH 1/2] lavc/vaapi_encode: Query surface alignment
It needs to create temporary config to query surface attribute.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
---
libavcodec/vaapi_encode.c | 66 +++++++++++++++++++++++++++++++++++++++
libavcodec/vaapi_encode.h | 4 +++
2 files changed, 70 insertions(+)
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index b593d976ef..8960e6b20a 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -1133,6 +1133,68 @@ fail:
return err;
}
+static av_cold int vaapi_encode_surface_alignment(av_unused AVCodecContext *avctx)
+{
+#if VA_CHECK_VERSION(1, 21, 0)
+ VAAPIEncodeContext *ctx = avctx->priv_data;
+ VASurfaceAttrib *attr_list = NULL;
+ unsigned int attr_count = 0;
+ VAConfigID va_config;
+ VAStatus vas;
+ int err = 0;
+
+ vas = vaCreateConfig(ctx->hwctx->display,
+ ctx->va_profile, ctx->va_entrypoint,
+ NULL, 0, &va_config);
+ if (vas != VA_STATUS_SUCCESS) {
+ av_log(avctx, AV_LOG_ERROR, "Failed to create temp encode pipeline "
+ "configuration: %d (%s).\n", vas, vaErrorStr(vas));
+ return AVERROR(EIO);
+ }
+
+ vas = vaQuerySurfaceAttributes(ctx->hwctx->display, va_config,
+ 0, &attr_count);
+ if (vas != VA_STATUS_SUCCESS) {
+ av_log(avctx, AV_LOG_ERROR, "Failed to query surface attributes: "
+ "%d (%s).\n", vas, vaErrorStr(vas));
+ err = AVERROR_EXTERNAL;
+ goto fail;
+ }
+
+ attr_list = av_malloc(attr_count * sizeof(*attr_list));
+ if (!attr_list) {
+ err = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ vas = vaQuerySurfaceAttributes(ctx->hwctx->display, va_config,
+ attr_list, &attr_count);
+ if (vas != VA_STATUS_SUCCESS) {
+ av_log(avctx, AV_LOG_ERROR, "Failed to query surface attributes: "
+ "%d (%s).\n", vas, vaErrorStr(vas));
+ err = AVERROR_EXTERNAL;
+ goto fail;
+ }
+
+ for (unsigned int i = 0; i < attr_count; i++) {
+ if (attr_list[i].type == VASurfaceAttribAlignmentSize) {
+ ctx->surface_alignment_width =
+ 1 << (attr_list[i].value.value.i & 0xf);
+ ctx->surface_alignment_height =
+ 1 << ((attr_list[i].value.value.i & 0xf0) >> 4);
+ break;
+ }
+ }
+
+fail:
+ av_freep(&attr_list);
+ vaDestroyConfig(ctx->hwctx->display, va_config);
+ return err;
+#else
+ return 0;
+#endif
+}
+
static const VAAPIEncodeRCMode vaapi_encode_rc_modes[] = {
// Bitrate Quality
// | Maxrate | HRD/VBV
@@ -2111,6 +2173,10 @@ av_cold int ff_vaapi_encode_init(AVCodecContext *avctx)
if (err < 0)
goto fail;
+ err = vaapi_encode_surface_alignment(avctx);
+ if (err < 0)
+ goto fail;
+
if (ctx->codec->get_encoder_caps) {
err = ctx->codec->get_encoder_caps(avctx);
if (err < 0)
diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h
index 40a3f4e064..8e3eab9f27 100644
--- a/libavcodec/vaapi_encode.h
+++ b/libavcodec/vaapi_encode.h
@@ -260,6 +260,10 @@ typedef struct VAAPIEncodeContext {
* This is a RefStruct reference.
*/
VABufferID *coded_buffer_ref;
+
+ // Surface alignment required by driver.
+ int surface_alignment_width;
+ int surface_alignment_height;
} VAAPIEncodeContext;
typedef struct VAAPIEncodeType {
--
2.43.0

View File

@ -1,32 +0,0 @@
From d0facac679faf45d3356dff2e2cb382580d7a521 Mon Sep 17 00:00:00 2001
From: David Rosca <nowrep@gmail.com>
Date: Tue, 22 Oct 2024 17:26:59 +0200
Subject: [PATCH 2/2] lavc/vaapi_encode_h265: Use surface alignment
This is needed to correctly set conformance window crop with Mesa AMD.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
---
libavcodec/vaapi_encode_h265.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index 2283bcc0b4..44d9fdbbd5 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -951,8 +951,10 @@ static av_cold int vaapi_encode_h265_get_encoder_caps(AVCodecContext *avctx)
"min CB size %dx%d.\n", priv->ctu_size, priv->ctu_size,
priv->min_cb_size, priv->min_cb_size);
- base_ctx->surface_width = FFALIGN(avctx->width, priv->min_cb_size);
- base_ctx->surface_height = FFALIGN(avctx->height, priv->min_cb_size);
+ base_ctx->surface_width = FFALIGN(avctx->width,
+ FFMAX(priv->min_cb_size, priv->common.surface_alignment_width));
+ base_ctx->surface_height = FFALIGN(avctx->height,
+ FFMAX(priv->min_cb_size, priv->common.surface_alignment_height));
base_ctx->slice_block_width = base_ctx->slice_block_height = priv->ctu_size;
--
2.43.0

View File

@ -1,22 +0,0 @@
From f6925886f27a39eed2e43c5b7b6c342d00f7a970 Mon Sep 17 00:00:00 2001
From: kpcyrd <git@rxv.cc>
Date: Mon, 17 May 2021 02:01:08 +0200
Subject: [PATCH] Reproducible Builds: Do not record kernel version in binaries
---
builder/FindGlobals.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/FindGlobals.cmake b/builder/FindGlobals.cmake
index 6c96fc8e03..b13886c380 100644
--- a/builder/FindGlobals.cmake
+++ b/builder/FindGlobals.cmake
@@ -201,7 +201,7 @@ endif()
if( MFX_SYSTEM )
set( BUILD_INFO "${MFX_SYSTEM} ${CMAKE_SYSTEM_VERSION} | ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}" )
else()
- set( BUILD_INFO "${CMAKE_SYSTEM} ${CMAKE_SYSTEM_VERSION} | ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}" )
+ set( BUILD_INFO "${CMAKE_SYSTEM_NAME} | ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}" )
endif()
if(UNIX AND MFX_GLIBC)

View File

@ -1,10 +0,0 @@
--- a/api/mfx_dispatch/linux/mfxparser.cpp
+++ b/api/mfx_dispatch/linux/mfxparser.cpp
@@ -19,6 +19,7 @@
// SOFTWARE.
#include <ctype.h>
+#include <cstdint>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>