Compare commits

7 Commits

Author SHA1 Message Date
Stenzek
113614c2f5 WIP 2025-01-07 21:54:15 +10:00
Stenzek
ac41ace972 GPUDevice: Add stencil testing support 2025-01-07 19:39:40 +10:00
Stenzek
ebe782e4f4 Common: Add Vector4i xyxy(Vector2i) 2025-01-07 19:38:58 +10:00
Stenzek
e7439c1503 GPUDevice: Move size-matches check into ResizeTexture() 2025-01-07 19:25:11 +10:00
Stenzek
fda87de7e7 GPU/HW: Slight re-shuffling of field offsets
Free up some bits in the middle.
2025-01-07 19:25:11 +10:00
Stenzek
116bc83d09 GPUDevice: Ensure 16 byte minimum UBO alignment 2025-01-07 19:25:11 +10:00
Stenzek
ddffc055b9 GPU/HW: Use sized tristrips instead of fullscreen quads 2025-01-07 19:25:11 +10:00
834 changed files with 165852 additions and 233249 deletions

View File

@@ -13,15 +13,8 @@ on:
- "beta"
jobs:
linux-appimage:
name: 🐧 Linux AppImage
uses: "./.github/workflows/linux-appimage-build.yml"
linux-cross-appimage:
name: 🐧 Linux Cross-Compiled AppImage
uses: "./.github/workflows/linux-cross-appimage-build.yml"
linux-flatpak:
name: 📦 Build Flatpak
needs: [linux-appimage, linux-cross-appimage]
name: Build Flatpak
uses: "./.github/workflows/linux-flatpak-build.yml"
with:
flathub_publish: true

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
@@ -33,10 +33,6 @@ jobs:
shell: bash
run: yamllint -c extras/yamllint-config.yaml -s -f github data/resources/gamedb.yaml
- name: Check Disc Sets
shell: bash
run: yamllint -c extras/yamllint-config.yaml -s -f github data/resources/discsets.yaml
- name: Check DiscDB
shell: bash
run: yamllint -c extras/yamllint-config.yaml -s -f github data/resources/discdb.yaml

View File

@@ -5,23 +5,12 @@ on:
workflow_dispatch:
jobs:
linux-appimage-build:
name: "${{ matrix.name }}"
linux-x64-appimage-build:
name: "x64"
runs-on: ubuntu-22.04
timeout-minutes: 240
strategy:
matrix:
include:
- name: "x64"
asset: "DuckStation-x64.AppImage"
artifact: "linux-x64-appimage"
cmakeoptions: ""
- name: "x64 SSE2"
asset: "DuckStation-x64-SSE2.AppImage"
artifact: "linux-x64-sse2-appimage"
cmakeoptions: "-DDISABLE_SSE4=ON"
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
@@ -30,10 +19,10 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
path: ~/deps
key: deps ${{ hashFiles('scripts/deps/build-dependencies-linux.sh', 'scripts/deps/build-ffmpeg-linux.sh', 'scripts/deps/versions') }}
key: deps ${{ hashFiles('scripts/deps/build-dependencies-linux.sh', 'scripts/deps/build-ffmpeg-linux.sh') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -43,11 +32,14 @@ jobs:
if: steps.cache-deps.outputs.cache-hit != 'true'
run: scripts/deps/build-ffmpeg-linux.sh "$HOME/deps"
- name: Initialize Build Tag
run: |
echo '#pragma once' > src/scmversion/tag.h
- name: Set Build Tag Asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
echo '#pragma once' > src/scmversion/tag.h
echo '#define SCM_RELEASE_ASSET "${{ matrix.asset }}"' >> src/scmversion/tag.h
echo '#define SCM_RELEASE_ASSET "DuckStation-x64.AppImage"' >> src/scmversion/tag.h
echo '#define SCM_RELEASE_TAGS {"latest", "preview"}' >> src/scmversion/tag.h
- name: Tag as Preview Release
@@ -64,21 +56,92 @@ jobs:
shell: bash
run: |
cd data/resources
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Compile Build
shell: bash
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmakeoptions }} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH="$HOME/deps" -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH="$HOME/deps" -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" ..
cmake --build . --parallel
cd ..
scripts/packaging/appimage/make-appimage.sh $(realpath .) $(realpath ./build) $HOME/deps "${{ matrix.asset }}"
scripts/packaging/appimage/make-appimage.sh $(realpath .) $(realpath ./build) $HOME/deps DuckStation-x64
- name: Upload AppImage
uses: actions/upload-artifact@v4
- name: Upload Qt AppImage
uses: actions/upload-artifact@v4.3.3
with:
name: "${{ matrix.artifact }}"
path: "${{ matrix.asset }}"
name: "linux-x64-appimage"
path: "DuckStation-x64.AppImage"
linux-x64-sse2-appimage-build:
name: "x64 SSE2"
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
- name: Install Packages
run: scripts/packaging/appimage/install-packages.sh
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4.0.2
with:
path: ~/deps
key: deps ${{ hashFiles('scripts/deps/build-dependencies-linux.sh', 'scripts/deps/build-ffmpeg-linux.sh') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: scripts/deps/build-dependencies-linux.sh "$HOME/deps"
- name: Build FFmpeg
if: steps.cache-deps.outputs.cache-hit != 'true'
run: scripts/deps/build-ffmpeg-linux.sh "$HOME/deps"
- name: Initialize Build Tag
run: |
echo '#pragma once' > src/scmversion/tag.h
- name: Set Build Tag Asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
echo '#define SCM_RELEASE_ASSET "DuckStation-x64-SSE2.AppImage"' >> src/scmversion/tag.h
echo '#define SCM_RELEASE_TAGS {"latest", "preview"}' >> src/scmversion/tag.h
- name: Tag as Preview Release
if: github.ref == 'refs/heads/master'
run: |
echo '#define SCM_RELEASE_TAG "preview"' >> src/scmversion/tag.h
- name: Tag as Rolling Release
if: github.ref == 'refs/heads/dev'
run: |
echo '#define SCM_RELEASE_TAG "latest"' >> src/scmversion/tag.h
- name: Download Patch Archives
shell: bash
run: |
cd data/resources
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Compile Build
shell: bash
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DDISABLE_SSE4=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH="$HOME/deps" -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" ..
cmake --build . --parallel
cd ..
scripts/packaging/appimage/make-appimage.sh $(realpath .) $(realpath ./build) $HOME/deps DuckStation-x64-SSE2
- name: Upload Qt AppImage
uses: actions/upload-artifact@v4.3.3
with:
name: "linux-x64-sse2-appimage"
path: "DuckStation-x64-SSE2.AppImage"

View File

@@ -1,100 +0,0 @@
name: 🐧 Linux Cross-Compiled AppImage
on:
workflow_call:
workflow_dispatch:
jobs:
build:
name: "${{ matrix.arch }}"
strategy:
fail-fast: true
matrix:
arch: ["arm64", "armhf"]
runs-on: ubuntu-22.04
container:
image: ghcr.io/duckstation/cross-build-${{ matrix.arch }}:latest
timeout-minutes: 240
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ~/deps
key: deps-cross ${{ matrix.arch }} ${{ hashFiles('scripts/deps/build-dependencies-linux.sh', 'scripts/deps/build-dependencies-linux-cross.sh', 'scripts/deps/versions') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
scripts/deps/build-dependencies-linux.sh -skip-cleanup "$HOME/deps/host"
scripts/deps/build-dependencies-linux-cross.sh -skip-download "$HOME/deps/host" "${{ matrix.arch }}" "/${{ matrix.arch }}-chroot" "$HOME/deps/cross"
# Work around container ownership issue
- name: Set Safe Directory
shell: bash
run: git config --global --add safe.directory "*"
- name: Create Binary Aliases
run: |
ln -s llvm-strip-19 /usr/bin/llvm-strip
- name: Set Up Toolchain File
run: |
cp "$HOME/deps/cross/toolchain.cmake" "$HOME/toolchain.cmake"
echo 'set(CMAKE_C_COMPILER clang-19)' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_C_COMPILER_AR llvm-ar-19)' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_C_COMPILER_RANLIB llvm-ranlib-19)' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_CXX_COMPILER clang++-19)' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_CXX_COMPILER_AR llvm-ar-19)' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_CXX_COMPILER_RANLIB llvm-ranlib-19)' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")' >> "$HOME/toolchain.cmake"
echo 'set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")' >> "$HOME/toolchain.cmake"
- name: Set Build Tag Asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
echo '#pragma once' > src/scmversion/tag.h
echo '#define SCM_RELEASE_ASSET "DuckStation-${{ matrix.arch }}.AppImage"' >> src/scmversion/tag.h
echo '#define SCM_RELEASE_TAGS {"latest", "preview"}' >> src/scmversion/tag.h
- name: Tag as Preview Release
if: github.ref == 'refs/heads/master'
run: |
echo '#define SCM_RELEASE_TAG "preview"' >> src/scmversion/tag.h
- name: Tag as Rolling Release
if: github.ref == 'refs/heads/dev'
run: |
echo '#define SCM_RELEASE_TAG "latest"' >> src/scmversion/tag.h
- name: Download Patch Archives
shell: bash
run: |
cd data/resources
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Generate CMake
shell: bash
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE="$HOME/toolchain.cmake" -DCMAKE_PREFIX_PATH="$HOME/deps/cross" -DLCONVERT_EXE="$HOME/deps/host/bin/lconvert" -DHOST_MIN_PAGE_SIZE=4096 -DHOST_MAX_PAGE_SIZE=16384 -DHOST_CACHE_LINE_SIZE=64 -DBUILD_QT_FRONTEND=ON -DBUILD_MINI_FRONTEND=ON
- name: Compile Build
shell: bash
run: |
cmake --build build --parallel
scripts/packaging/appimage/make-cross-appimage.sh duckstation-qt ${{ matrix.arch }} "$(realpath build)" "$HOME/deps/cross" "/${{ matrix.arch }}-chroot"
scripts/packaging/appimage/make-cross-appimage.sh -inject-libc duckstation-mini ${{ matrix.arch }} "$(realpath build)" "$HOME/deps/cross" "/${{ matrix.arch }}-chroot"
- name: Upload AppImages
uses: actions/upload-artifact@v4
with:
name: "linux-${{ matrix.arch }}-appimage"
path: "DuckStation-*.AppImage"

View File

@@ -11,22 +11,18 @@ on:
required: false
type: string
default: "stable"
workflow_dispatch:
jobs:
linux-flatpak-build:
name: "Build"
strategy:
fail-fast: true
matrix:
setup: [{arch: "x86_64", ainame: "x64", runner: "ubuntu-22.04"}, {arch: "aarch64", ainame: "arm64", runner: "ubuntu-24.04-arm"}]
runs-on: ${{ matrix.setup.runner }}
name: "x64"
runs-on: ubuntu-22.04
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-24.08
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
options: --privileged
timeout-minutes: 60
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
set-safe-directory: ${{ env.GITHUB_WORKSPACE }}
@@ -36,39 +32,65 @@ jobs:
shell: bash
run: git config --global --add safe.directory "*"
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: "linux-${{ matrix.setup.ainame }}-appimage"
path: ./artifacts/
- name: Initialize Build Tag
run: |
echo '#pragma once' > src/scmversion/tag.h
- name: Move AppImage
- name: Set Build Tags
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
echo '#define SCM_RELEASE_TAGS {"latest", "preview"}' >> src/scmversion/tag.h
- name: Tag as Preview Release
if: github.ref == 'refs/heads/master'
run: |
echo '#define SCM_RELEASE_TAG "preview"' >> src/scmversion/tag.h
- name: Tag as Rolling Release
if: github.ref == 'refs/heads/dev'
run: |
echo '#define SCM_RELEASE_TAG "latest"' >> src/scmversion/tag.h
- name: Download Patch Archives
shell: bash
run: |
mv "./artifacts/DuckStation-${{ matrix.setup.ainame }}.AppImage" "scripts/packaging/flatpak/DuckStation.AppImage"
cd data/resources
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Generate AppStream XML
run: |
scripts/packaging/generate-metainfo.sh scripts/packaging/flatpak
cat scripts/packaging/flatpak/org.duckstation.DuckStation.metainfo.xml
- name: Validate AppStream XML
run: flatpak-builder-lint appstream scripts/packaging/flatpak/org.duckstation.DuckStation.metainfo.xml
- name: Validate Manifest
run: flatpak-builder-lint manifest scripts/packaging/flatpak/org.duckstation.DuckStation.yaml
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
uses: flathub-infra/flatpak-github-actions/flatpak-builder@23796715b3dfa4c86ddf50cf29c3cc8b3c82dca8
with:
bundle: duckstation-${{ matrix.setup.arch }}.flatpak
bundle: duckstation-x64.flatpak
upload-artifact: false
manifest-path: scripts/packaging/flatpak/org.duckstation.DuckStation.yaml
arch: ${{ matrix.setup.arch }}
arch: x86_64
build-bundle: true
verbose: true
mirror-screenshots-url: https://dl.flathub.org/media
branch: stable
cache: true
restore-cache: true
cache-key: flatpak-${{ hashFiles('scripts/packaging/flatpak/org.duckstation.DuckStation.yaml') }}
cache-key: flatpak-x64-${{ hashFiles('scripts/packaging/flatpak/**/*.yaml') }}
- name: Validate Build
run: |
flatpak-builder-lint repo repo
- name: Push To Flathub Beta
if: inputs.flathub_publish && inputs.flathub_branch == 'beta'
uses: flatpak/flatpak-github-actions/flat-manager@v6
uses: flathub-infra/flatpak-github-actions/flat-manager@b6c92176b7f578aedd80cac74cd8f0336f618e89
with:
flat-manager-url: https://hub.flathub.org/
repository: stable
@@ -77,7 +99,7 @@ jobs:
- name: Push To Flathub Stable
if: inputs.flathub_publish && inputs.flathub_branch == 'stable'
uses: flatpak/flatpak-github-actions/flat-manager@v6
uses: flathub-infra/flatpak-github-actions/flat-manager@b6c92176b7f578aedd80cac74cd8f0336f618e89
with:
flat-manager-url: https://hub.flathub.org/
repository: stable
@@ -85,7 +107,7 @@ jobs:
build-log-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Upload Flatpak
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.3.3
with:
name: "linux-flatpak-${{ matrix.setup.arch }}"
path: "duckstation-${{ matrix.setup.arch }}.flatpak"
name: "linux-flatpak"
path: "duckstation-x64.flatpak"

View File

@@ -7,34 +7,39 @@ on:
jobs:
macos-build:
name: "Universal"
runs-on: macos-15
timeout-minutes: 240
runs-on: macos-14
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
- name: Use Xcode 26
run: sudo xcode-select -s /Applications/Xcode_26.0.app
- name: Use Xcode 16.1
run: sudo xcode-select -s /Applications/Xcode_16.1.app
- name: Download Metal Toolchain
run: xcodebuild -downloadComponent MetalToolchain
- name: Install packages
shell: bash
run: |
brew install ninja
- name: Cache Dependencies
id: cache-deps-mac
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
path: ~/deps
key: deps-mac ${{ hashFiles('scripts/deps/build-dependencies-mac.sh', 'scripts/deps/versions') }}
key: deps-mac ${{ hashFiles('scripts/deps/build-dependencies-mac.sh') }}
- name: Build Dependencies
if: steps.cache-deps-mac.outputs.cache-hit != 'true'
run: scripts/deps/build-dependencies-mac.sh "$HOME/deps"
- name: Initialize Build Tag
run: |
echo '#pragma once' > src/scmversion/tag.h
- name: Set Build Tags
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
echo '#pragma once' > src/scmversion/tag.h
echo '#define SCM_RELEASE_ASSET "duckstation-mac-release.zip"' >> src/scmversion/tag.h
echo '#define SCM_RELEASE_TAGS {"latest", "preview"}' >> src/scmversion/tag.h
@@ -52,8 +57,8 @@ jobs:
shell: bash
run: |
cd data/resources
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Compile and Zip .app
shell: bash
@@ -65,10 +70,10 @@ jobs:
cmake --build . --parallel
mv bin/DuckStation.app .
codesign -s - --deep -f -v DuckStation.app
zip -9 -r duckstation-mac-release.zip DuckStation.app/
zip -r duckstation-mac-release.zip DuckStation.app/
- name: Upload MacOS .app
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.3.3
with:
name: "macos"
path: "build/duckstation-mac-release.zip"

View File

@@ -25,21 +25,21 @@ jobs:
linux-appimage:
name: 🐧 Linux AppImage
uses: "./.github/workflows/linux-appimage-build.yml"
linux-cross-appimage:
name: 🐧 Linux Cross-Compiled AppImage
uses: "./.github/workflows/linux-cross-appimage-build.yml"
linux-flatpak:
name: 📦 Linux Flatpak
uses: "./.github/workflows/linux-flatpak-build.yml"
macos:
name: 🍎 MacOS
uses: "./.github/workflows/macos-build.yml"
create-release:
name: 📤 Create Release
needs: [windows, linux-appimage, linux-cross-appimage, macos]
needs: [windows, linux-appimage, linux-flatpak, macos]
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.7
with:
path: ./artifacts/
@@ -48,7 +48,7 @@ jobs:
- name: Create Preview Release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@d68defdd11f9dcc7f52f35c1b7c236ee7513bcc1
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "preview"
@@ -63,15 +63,12 @@ jobs:
./artifacts/windows-arm64/duckstation-windows-arm64-release-symbols.zip
./artifacts/linux-x64-appimage/DuckStation-x64.AppImage
./artifacts/linux-x64-sse2-appimage/DuckStation-x64-SSE2.AppImage
./artifacts/linux-arm64-appimage/DuckStation-arm64.AppImage
./artifacts/linux-arm64-appimage/DuckStation-Mini-arm64.AppImage
./artifacts/linux-armhf-appimage/DuckStation-armhf.AppImage
./artifacts/linux-armhf-appimage/DuckStation-Mini-armhf.AppImage
./artifacts/linux-flatpak/duckstation-x64.flatpak
./artifacts/macos/duckstation-mac-release.zip
- name: Create Rolling Release
if: github.ref == 'refs/heads/dev'
uses: marvinpinto/action-automatic-releases@d68defdd11f9dcc7f52f35c1b7c236ee7513bcc1
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
@@ -86,8 +83,6 @@ jobs:
./artifacts/windows-arm64/duckstation-windows-arm64-release-symbols.zip
./artifacts/linux-x64-appimage/DuckStation-x64.AppImage
./artifacts/linux-x64-sse2-appimage/DuckStation-x64-SSE2.AppImage
./artifacts/linux-arm64-appimage/DuckStation-arm64.AppImage
./artifacts/linux-arm64-appimage/DuckStation-Mini-arm64.AppImage
./artifacts/linux-armhf-appimage/DuckStation-armhf.AppImage
./artifacts/linux-armhf-appimage/DuckStation-Mini-armhf.AppImage
./artifacts/linux-flatpak/duckstation-x64.flatpak
./artifacts/macos/duckstation-mac-release.zip

View File

@@ -1,30 +0,0 @@
name: Translation Lint
on:
pull_request:
paths:
- 'src/duckstation-qt/translations/*.ts'
push:
branches:
- master
- dev
paths:
- 'src/duckstation-qt/translations/*.ts'
workflow_dispatch:
jobs:
translation-lint:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
# Meh, can't be bothered to work out exactly which one was modified, just check them all.
- name: Check Translation Placeholders
shell: bash
run: |
for i in src/duckstation-qt/translations/*.ts; do
python scripts/verify_translation_placeholders.py "$i"
done

View File

@@ -8,13 +8,13 @@ jobs:
runs-on: windows-2022
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
path: |
dep/msvc/deps-arm64
@@ -30,7 +30,7 @@ jobs:
- name: Upload Cache Files
if: steps.cache-deps.outputs.cache-hit == 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.3.3
with:
name: "windows"
path: "deps-*.zip"

View File

@@ -5,50 +5,23 @@ on:
workflow_dispatch:
jobs:
windows-build:
name: "${{ matrix.name }}"
windows-x64-build:
name: "x64"
runs-on: windows-2022
timeout-minutes: 240
strategy:
matrix:
include:
- name: "x64"
arch: "x64"
vcvars: "x64"
config: "ReleaseLTCG-Clang"
platform: "x64"
bindir: "x64"
assetname: "duckstation-windows-x64-release.zip"
updatername: "updater-x64-ReleaseLTCG.exe"
- name: "x64 SSE2"
arch: "x64-sse2"
vcvars: "x64"
config: "ReleaseLTCG-Clang-SSE2"
platform: "x64"
bindir: "x64"
assetname: "duckstation-windows-x64-sse2-release.zip"
updatername: "updater-x64-ReleaseLTCG-SSE2.exe"
- name: "ARM64"
arch: "arm64"
vcvars: "amd64_arm64"
config: "ReleaseLTCG-Clang"
platform: "ARM64"
bindir: "ARM64"
assetname: "duckstation-windows-arm64-release.zip"
updatername: "updater-ARM64-ReleaseLTCG.exe"
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
uses: actions/cache@v4.0.2
with:
path: |
dep/msvc/deps-arm64
dep/msvc/deps-x64
key: deps ${{ hashFiles('scripts/deps/build-dependencies-windows-arm64.bat', 'scripts/deps/build-dependencies-windows-x64.bat', 'scripts/deps/versions') }}
key: deps ${{ hashFiles('scripts/deps/build-dependencies-windows-arm64.bat', 'scripts/deps/build-dependencies-windows-x64.bat') }}
- name: Build x64 Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -62,12 +35,16 @@ jobs:
DEBUG: 0
run: scripts/deps/build-dependencies-windows-arm64.bat
- name: Initialize Build Tag
shell: cmd
run: |
echo #pragma once > src/scmversion/tag.h
- name: Set Build Tag Asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
shell: cmd
run: |
echo #pragma once > src/scmversion/tag.h
echo #define SCM_RELEASE_ASSET "${{ matrix.assetname }}" >> src/scmversion/tag.h
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
- name: Tag as Preview Release
@@ -94,33 +71,230 @@ jobs:
shell: cmd
run: |
cd data/resources
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
aria2c -Z "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
aria2c -Z "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Compile ${{ matrix.name }} Release Build
- name: Compile x64 Release Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.vcvars }}
msbuild duckstation.sln -t:Build -p:Platform=${{ matrix.platform }};Configuration=${{ matrix.config }}
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
msbuild duckstation.sln -t:Build -p:Platform=x64;Configuration=ReleaseLTCG-Clang
- name: Create ${{ matrix.name }} Symbols Archive
- name: Create x64 Symbols Archive
shell: cmd
run: |
"C:\Program Files\7-Zip\7z.exe" a -mx9 -r duckstation-windows-${{ matrix.arch }}-release-symbols.zip ./bin/${{ matrix.bindir }}/*.pdb
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-release-symbols.zip ./bin/x64/*.pdb
- name: Remove Extra Bloat Before Archiving
shell: cmd
run: |
del /Q bin\${{ matrix.bindir }}\*.pdb bin\${{ matrix.bindir }}\*.exp bin\${{ matrix.bindir }}\*.lib bin\${{ matrix.bindir }}\*.iobj bin\${{ matrix.bindir }}\*.ipdb bin\${{ matrix.bindir }}\common-tests*
rename bin\${{ matrix.bindir }}\${{ matrix.updatername }} updater.exe
del /Q bin\x64\*.pdb bin\x64\*.exp bin\x64\*.lib bin\x64\*.iobj bin\x64\*.ipdb bin\x64\common-tests*
rename bin\x64\updater-x64-ReleaseLTCG.exe updater.exe
- name: Create ${{ matrix.name }} Release Archive
- name: Create x64 Release Archive
shell: cmd
run: |
"C:\Program Files\7-Zip\7z.exe" a -mx9 -r ${{ matrix.assetname }} ./bin/${{ matrix.bindir }}/*
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-release.zip ./bin/x64/*
- name: Upload ${{ matrix.name }} Release Artifact
uses: actions/upload-artifact@v4
- name: Upload x64 Release Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: "windows-${{ matrix.arch }}"
path: "duckstation-windows-${{ matrix.arch }}-*.zip"
name: "windows-x64"
path: "duckstation-windows-x64-release*.zip"
windows-x64-sse2-build:
name: "x64 SSE2"
runs-on: windows-2022
timeout-minutes: 120
steps:
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4.0.2
with:
path: |
dep/msvc/deps-arm64
dep/msvc/deps-x64
key: deps ${{ hashFiles('scripts/deps/build-dependencies-windows-arm64.bat', 'scripts/deps/build-dependencies-windows-x64.bat') }}
- name: Build x64 Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
DEBUG: 0
run: scripts/deps/build-dependencies-windows-x64.bat
- name: Build ARM64 Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
DEBUG: 0
run: scripts/deps/build-dependencies-windows-arm64.bat
- name: Initialize Build Tag
shell: cmd
run: |
echo #pragma once > src/scmversion/tag.h
- name: Set Build Tag Asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
shell: cmd
run: |
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-sse2-release.zip" >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
- name: Tag as Preview Release
if: github.ref == 'refs/heads/master'
shell: cmd
run: |
echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
- name: Tag as Rolling Release Build
if: github.ref == 'refs/heads/dev'
shell: cmd
run: |
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
- name: Update RC Version Fields
shell: cmd
run: |
cd src\scmversion
call update_rc_version.bat
cd ..\..
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc
- name: Download Patch Archives
shell: cmd
run: |
cd data/resources
aria2c -Z "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
aria2c -Z "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Compile x64 Release Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
msbuild duckstation.sln -t:Build -p:Platform=x64;Configuration=ReleaseLTCG-Clang-SSE2
- name: Create x64 Symbols Archive
shell: cmd
run: |
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-sse2-release-symbols.zip ./bin/x64/*.pdb
- name: Remove Extra Bloat Before Archiving
shell: cmd
run: |
del /Q bin\x64\*.pdb bin\x64\*.exp bin\x64\*.lib bin\x64\*.iobj bin\x64\*.ipdb bin\x64\common-tests*
rename bin\x64\updater-x64-ReleaseLTCG-SSE2.exe updater.exe
- name: Create x64 Release Archive
shell: cmd
run: |
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-sse2-release.zip ./bin/x64/*
- name: Upload x64 Release Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: "windows-x64-sse2"
path: "duckstation-windows-x64-sse2-release*.zip"
windows-arm64-build:
name: "ARM64"
runs-on: windows-2022
timeout-minutes: 120
steps:
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
submodules: true
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4.0.2
with:
path: |
dep/msvc/deps-arm64
dep/msvc/deps-x64
key: deps ${{ hashFiles('scripts/deps/build-dependencies-windows-arm64.bat', 'scripts/deps/build-dependencies-windows-x64.bat') }}
- name: Build x64 Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
DEBUG: 0
run: scripts/deps/build-dependencies-windows-x64.bat
- name: Build ARM64 Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
DEBUG: 0
run: scripts/deps/build-dependencies-windows-arm64.bat
- name: Initialize Build Tag
shell: cmd
run: |
echo #pragma once > src/scmversion/tag.h
- name: Set Build Tag Asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
shell: cmd
run: |
echo #define SCM_RELEASE_ASSET "duckstation-windows-arm64-release.zip" >> src/scmversion/tag.h
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
- name: Tag as Preview Release
if: github.ref == 'refs/heads/master'
shell: cmd
run: |
echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
- name: Tag as Rolling Release
if: github.ref == 'refs/heads/dev'
shell: cmd
run: |
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
- name: Update RC Version Fields
shell: cmd
run: |
cd src\scmversion
call update_rc_version.bat
cd ..\..
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc
- name: Download Patch Archives
shell: cmd
run: |
cd data/resources
aria2c -Z "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
aria2c -Z "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Compile ARM64 Release Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
msbuild duckstation.sln -t:Build -p:Platform=ARM64;Configuration=ReleaseLTCG-Clang
- name: Create ARM64 symbols archive
shell: cmd
run: |
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-arm64-release-symbols.zip ./bin/ARM64/*.pdb
- name: Remove Extra Bloat Before Archiving
shell: cmd
run: |
del /Q bin\ARM64\*.pdb bin\ARM64\*.exp bin\ARM64\*.lib bin\ARM64\*.iobj bin\ARM64\*.ipdb bin\ARM64\common-tests*
rename bin\ARM64\updater-ARM64-ReleaseLTCG.exe updater.exe
- name: Create ARM64 Release Archive
shell: cmd
run: |
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-arm64-release.zip ./bin/ARM64/*
- name: Upload ARM64 Release Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: "windows-arm64"
path: "duckstation-windows-arm64-release*.zip"

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19)
cmake_minimum_required(VERSION 3.16)
project(duckstation C CXX)
# Policy settings.
@@ -12,9 +12,14 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug|Devel|MinSizeRel|RelWithDebInfo|Release")
message(FATAL_ERROR "CMAKE_BUILD_TYPE not set. Please set it first.")
message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release.")
set(CMAKE_BUILD_TYPE "Release")
endif()
message(STATUS "CMake Version: ${CMAKE_VERSION}")
message(STATUS "CMake System Name: ${CMAKE_SYSTEM_NAME}")
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
# Pull in modules.
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules/")
include(DuckStationUtils)
@@ -29,7 +34,6 @@ detect_cache_line_size()
# Build options. Depends on system attributes.
include(DuckStationBuildOptions)
include(DuckStationDependencies)
include(DuckStationCompilerRequirement)
# Enable PIC on Linux, otherwise the builds do not support ASLR.
if(LINUX OR BSD)
@@ -63,10 +67,6 @@ if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF /OPT:ICF")
set(CMAKE_EXE_LINKER_FLAGS_DEVEL "${CMAKE_EXE_LINKER_FLAGS_DEVEL} /OPT:REF /OPT:ICF")
else()
# Force debug symbols for Linux builds.
add_debug_symbol_flag(CMAKE_C_FLAGS_RELEASE)
add_debug_symbol_flag(CMAKE_CXX_FLAGS_RELEASE)
endif()
# Warning disables.
@@ -92,19 +92,21 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
endif()
# Rewrite paths in macros to be relative to the source directory.
# Helpful for reproducible builds.
if(COMPILER_CLANG OR COMPILER_CLANG_CL OR COMPILER_GCC)
file(RELATIVE_PATH source_dir_remap "${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}")
string(REGEX REPLACE "\/+$" "" source_dir_remap "${source_dir_remap}")
set(source_dir_remap_str "\"${CMAKE_SOURCE_DIR}\"=\"${source_dir_remap}\"")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmacro-prefix-map=${source_dir_remap_str} -ffile-prefix-map=${source_dir_remap_str}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmacro-prefix-map=${source_dir_remap_str} -ffile-prefix-map=${source_dir_remap_str}")
endif()
# Write binaries to a seperate directory.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
# Installation directories. If INSTALL_SELF_CONTAINED is set, everything goes
# into one directory, otherwise CMAKE_INSTALL_PREFIX/bin is used (for Flatpak).
if(ALLOW_INSTALL)
if(INSTALL_SELF_CONTAINED)
set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}")
set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}")
else()
# Let GNUInstallDirs set the destinations.
include(GNUInstallDirs)
endif()
endif()
# Enable large file support on Linux 32-bit platforms.
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
add_definitions("-D_FILE_OFFSET_BITS=64")
@@ -118,6 +120,10 @@ endif()
# Prevent fmt from being built with exceptions, or being thrown at call sites.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFMT_EXCEPTIONS=0")
# Use C++20.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Recursively include the source tree.
add_subdirectory(dep)
add_subdirectory(src)

View File

@@ -42,6 +42,8 @@ function(copy_base_translations target)
target_sources(${target} PRIVATE ${path})
if(APPLE)
set_source_files_properties(${path} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/translations)
elseif(ALLOW_INSTALL)
install(FILES "${path}" DESTINATION "${CMAKE_INSTALL_BINDIR}/translations")
else()
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${path}" "$<TARGET_FILE_DIR:${target}>/translations")

View File

@@ -1,8 +1,8 @@
# Renderer options.
option(ENABLE_OPENGL "Build with OpenGL renderer" ON)
option(ENABLE_VULKAN "Build with Vulkan renderer" ON)
option(BUILD_NOGUI_FRONTEND "Build the NoGUI frontend" OFF)
option(BUILD_QT_FRONTEND "Build the Qt frontend" ON)
option(BUILD_MINI_FRONTEND "Build the Mini frontend" OFF)
option(BUILD_REGTEST "Build regression test runner" OFF)
option(BUILD_TESTS "Build unit tests" OFF)
option(DISABLE_SSE4 "Build with SSE4 instructions disabled, reduces performance" OFF)
@@ -10,6 +10,8 @@ option(DISABLE_SSE4 "Build with SSE4 instructions disabled, reduces performance"
if(LINUX OR BSD)
option(ENABLE_X11 "Support X11 window system" ON)
option(ENABLE_WAYLAND "Support Wayland window system" ON)
option(ALLOW_INSTALL "Allow installation to CMAKE_INSTALL_PREFIX" OFF)
option(INSTALL_SELF_CONTAINED "Make self-contained install, i.e. everything in one directory" ON)
endif()
if(APPLE)
option(SKIP_POSTPROCESS_BUNDLE "Disable bundle post-processing, including Qt additions" OFF)

View File

@@ -1,5 +1,3 @@
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
if(ENABLE_OPENGL)
message(STATUS "Building with OpenGL support.")
endif()
@@ -26,11 +24,16 @@ if(BUILD_TESTS)
message(STATUS "Building unit tests.")
endif()
# Refuse to build in Arch package environments. My license does not allow for packages, and I'm sick of
# dealing with people complaining about things broken by packagers. This is why we can't have nice things.
if(DEFINED ENV{DEBUGINFOD_URLS})
if($ENV{DEBUGINFOD_URLS} MATCHES ".*archlinux.*")
message(FATAL_ERROR "Unsupported environment.")
if(ALLOW_INSTALL)
message(WARNING "Install target is enabled. This will install all DuckStation files into:
${CMAKE_INSTALL_PREFIX}
It does **not** use the LSB subdirectories of bin, share, etc, so you should disable this option if it is set to /usr or /usr/local.")
if(INSTALL_SELF_CONTAINED)
message(STATUS "Creating self-contained install at ${CMAKE_INSTALL_PREFIX}")
else()
message(STATUS "Creating relative install at ${CMAKE_INSTALL_PREFIX}")
message(STATUS " CMAKE_INSTALL_BINDIR: ${CMAKE_INSTALL_BINDIR}")
endif()
endif()

View File

@@ -1,16 +0,0 @@
# Use C++20.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# C++20 feature checks. Some Linux environments are incomplete.
check_cpp20_feature("__cpp_structured_bindings" 201606)
check_cpp20_feature("__cpp_constinit" 201907)
check_cpp20_feature("__cpp_designated_initializers" 201707)
check_cpp20_feature("__cpp_using_enum" 201907)
check_cpp20_feature("__cpp_lib_bit_cast" 201806)
check_cpp20_feature("__cpp_lib_bitops" 201907)
check_cpp20_feature("__cpp_lib_int_pow2" 202002)
check_cpp20_feature("__cpp_lib_starts_ends_with" 201711)
check_cpp20_attribute("likely" 201803)
check_cpp20_attribute("unlikely" 201803)
check_cpp20_attribute("no_unique_address" 201803)

View File

@@ -1,53 +1,52 @@
# Set prefix path to look for our bundled dependencies first on Windows.
if(WIN32 AND CPU_ARCH_X64)
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/dep/msvc/deps-x64")
elseif(WIN32 AND CPU_ARCH_ARM64)
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/dep/msvc/deps-arm64")
# From PCSX2: On macOS, Mono.framework contains an ancient version of libpng. We don't want that.
# Avoid it by telling cmake to avoid finding frameworks while we search for libpng.
if(APPLE)
set(FIND_FRAMEWORK_BACKUP ${CMAKE_FIND_FRAMEWORK})
set(CMAKE_FIND_FRAMEWORK NEVER)
endif()
# Enable threads everywhere.
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# pkg-config gets pulled transitively on some platforms.
if(NOT WIN32 AND NOT APPLE)
find_package(PkgConfig REQUIRED)
endif()
# libpng relies on zlib, which we need the system version for on Mac.
find_package(ZLIB REQUIRED)
# Enforce use of bundled dependencies to avoid conflicts with system libraries.
set(FIND_ROOT_PATH_BACKUP ${CMAKE_FIND_ROOT_PATH})
set(FIND_ROOT_PATH_MODE_INCLUDE_BACKUP ${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE})
set(FIND_ROOT_PATH_MODE_LIBRARY_BACKUP ${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
set(FIND_ROOT_PATH_MODE_PACKAGE_BACKUP ${CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
set(FIND_ROOT_PATH_MODE_PROGRAM_BACKUP ${CMAKE_FIND_ROOT_PATH_MODE_PROGRAM})
set(CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH})
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
# Bundled dependencies.
find_package(SDL3 3.2.24 REQUIRED)
find_package(zstd 1.5.7 REQUIRED)
find_package(SDL2 2.30.8 REQUIRED)
find_package(Zstd 1.5.6 REQUIRED)
find_package(WebP REQUIRED) # v1.4.0, spews an error on Linux because no pkg-config.
find_package(PNG 1.6.50 REQUIRED)
find_package(ZLIB REQUIRED) # 1.3, but Mac currently doesn't use it.
find_package(PNG 1.6.40 REQUIRED)
find_package(JPEG REQUIRED)
find_package(Freetype 2.13.3 REQUIRED)
find_package(harfbuzz REQUIRED)
find_package(plutosvg 0.0.6 REQUIRED)
find_package(Freetype 2.13.2 REQUIRED) # 2.13.3, but flatpak is still on 2.13.2.
find_package(lunasvg 2.4.1 REQUIRED)
find_package(cpuinfo REQUIRED)
find_package(DiscordRPC 3.4.0 REQUIRED)
find_package(SoundTouch 2.3.3 REQUIRED)
find_package(libzip 1.11.4 REQUIRED)
find_package(libzip 1.11.1 REQUIRED)
if(NOT WIN32)
find_package(CURL REQUIRED)
endif()
if(ENABLE_X11)
find_package(X11 REQUIRED)
if (NOT X11_xcb_FOUND OR NOT X11_xcb_randr_FOUND OR NOT X11_X11_xcb_FOUND)
message(FATAL_ERROR "XCB, XCB-randr and X11-xcb are required")
endif()
endif()
if(ENABLE_WAYLAND)
find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
find_package(Wayland REQUIRED Egl)
endif()
if(BUILD_QT_FRONTEND)
find_package(Qt6 6.8.0 COMPONENTS Core Gui Widgets LinguistTools REQUIRED)
endif()
find_package(Shaderc REQUIRED)
find_package(spirv_cross_c_shared REQUIRED)
if(NOT WIN32 AND NOT APPLE)
find_package(Libbacktrace REQUIRED)
if(LINUX AND NOT (ALLOW_INSTALL AND INSTALL_SELF_CONTAINED))
# We need to add the rpath for shaderc to the executable.
get_target_property(SHADERC_LIBRARY Shaderc::shaderc_shared IMPORTED_LOCATION)
get_filename_component(SHADERC_LIBRARY_DIRECTORY ${SHADERC_LIBRARY} DIRECTORY)
@@ -57,55 +56,24 @@ if(NOT WIN32 AND NOT APPLE)
list(APPEND CMAKE_BUILD_RPATH ${SPIRV_CROSS_LIBRARY_DIRECTORY})
endif()
# Restore system package search path.
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ${FIND_ROOT_PATH_MODE_INCLUDE_BACKUP})
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${FIND_ROOT_PATH_MODE_LIBRARY_BACKUP})
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${FIND_ROOT_PATH_MODE_PACKAGE_BACKUP})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${FIND_ROOT_PATH_MODE_PROGRAM_BACKUP})
set(CMAKE_FIND_ROOT_PATH ${FIND_ROOT_PATH_BACKUP})
# Qt has transitive dependencies on system libs, so do it afterwards.
if(BUILD_QT_FRONTEND)
# All our builds include Qt, so this is not a problem.
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 6.10.0 COMPONENTS Core Gui GuiPrivate Widgets LinguistTools REQUIRED)
# Have to verify it down here, don't want users using unpatched Qt.
if(NOT Qt6_DIR MATCHES "^${CMAKE_PREFIX_PATH}")
message(FATAL_ERROR "Using incorrect Qt library. Check your dependencies.")
endif()
if(LINUX)
find_package(UDEV REQUIRED)
endif()
# Libraries that are pulled in from host.
if(NOT WIN32)
find_package(CURL REQUIRED)
if(LINUX)
find_package(UDEV REQUIRED)
endif()
if(NOT APPLE)
if(ENABLE_X11)
find_package(X11 REQUIRED)
if (NOT X11_xcb_FOUND OR NOT X11_xcb_randr_FOUND OR NOT X11_X11_xcb_FOUND)
message(FATAL_ERROR "XCB, XCB-randr and X11-xcb are required")
endif()
endif()
if(ENABLE_WAYLAND)
find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
find_package(Wayland REQUIRED Egl)
endif()
endif()
if(NOT WIN32 AND NOT APPLE)
find_package(Libbacktrace REQUIRED)
endif()
if(NOT WIN32)
find_package(FFMPEG 8.0.0 COMPONENTS avcodec avformat avutil swresample swscale)
if(NOT ANDROID AND NOT WIN32)
find_package(FFMPEG COMPONENTS avcodec avformat avutil swresample swscale)
if(NOT FFMPEG_FOUND)
message(WARNING "FFmpeg not found, using bundled headers.")
endif()
endif()
if(NOT FFMPEG_FOUND)
if(NOT ANDROID AND NOT FFMPEG_FOUND)
set(FFMPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/dep/ffmpeg/include")
endif()
if(APPLE)
set(CMAKE_FIND_FRAMEWORK ${FIND_FRAMEWORK_BACKUP})
endif()

View File

@@ -1,5 +1,3 @@
include(CheckSourceCompiles)
function(disable_compiler_warnings_for_target target)
if(MSVC)
target_compile_options(${target} PRIVATE "/W0")
@@ -76,8 +74,8 @@ function(detect_architecture)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1" PARENT_SCOPE)
elseif(MSVC AND NOT DISABLE_SSE4)
# Clang defines these macros, MSVC does not.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D__SSE3__ /D__SSE4_1__" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D__SSE3__ /D__SSE4_1__" PARENT_SCOPE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D__SSE3__ /D__SSE4_1__")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D__SSE3__ /D__SSE4_1__")
endif()
elseif(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64") AND
CMAKE_SIZEOF_VOID_P EQUAL 8) # Might have an A64 kernel, e.g. Raspbian.
@@ -120,11 +118,8 @@ function(detect_page_size)
# For universal Apple builds, we use preprocessor macros to determine page size.
# Similar for Windows, except it's always 4KB.
if(NOT CPU_ARCH_ARM64 OR NOT LINUX)
unset(HOST_PAGE_SIZE CACHE)
unset(HOST_PAGE_SIZE PARENT_SCOPE)
unset(HOST_MIN_PAGE_SIZE CACHE)
unset(HOST_MIN_PAGE_SIZE PARENT_SCOPE)
unset(HOST_MAX_PAGE_SIZE CACHE)
unset(HOST_MAX_PAGE_SIZE PARENT_SCOPE)
return()
elseif(DEFINED HOST_PAGE_SIZE)
@@ -171,7 +166,6 @@ endfunction()
function(detect_cache_line_size)
# This is only needed for ARM64, or if the user hasn't overridden it explicitly.
if(NOT CPU_ARCH_ARM64 OR HOST_CACHE_LINE_SIZE)
unset(HOST_CACHE_LINE_SIZE CACHE)
unset(HOST_CACHE_LINE_SIZE PARENT_SCOPE)
return()
endif()
@@ -246,56 +240,8 @@ function(get_scm_version)
endif()
endfunction()
function(add_debug_symbol_flag var)
# CMake's regex engine is missing so many features...
set(value "${${var}}")
if (NOT " ${value} " MATCHES " -g[1-3]? ")
message(STATUS "Adding -g1 to ${var}.")
set(${var} "${value} -g1" PARENT_SCOPE)
endif()
endfunction()
function(check_cpp20_feature MACRO MINIMUM_VALUE)
set(CACHE_VAR "CHECK_CPP20_FEATURE_${MACRO}")
if(NOT DEFINED ${CACHE_VAR})
# Create a small source code snippet that fails to compile if the feature is not available.
set(TEMP_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cpp")
file(WRITE "${TEMP_FILE}" "#include <version>
#if !defined(${MACRO}) || ${MACRO} < ${MINIMUM_VALUE}L
#error Missing feature
#endif
")
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
try_compile(HAS_FEATURE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY} "${TEMP_FILE}"
CXX_STANDARD 20
CXX_STANDARD_REQUIRED TRUE
)
set(${CACHE_VAR} ${HAS_FEATURE} CACHE INTERNAL "Cached feature test result for ${MACRO}")
endif()
if(NOT HAS_FEATURE)
message(FATAL_ERROR "${MACRO} is not supported by your compiler, at least ${MINIMUM_VALUE} is required.")
endif()
endfunction()
function(check_cpp20_attribute ATTRIBUTE MINIMUM_VALUE)
set(CACHE_VAR "CHECK_CPP20_ATTRIBUTE_${MACRO}")
if(NOT DEFINED ${CACHE_VAR})
set(TEMP_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cpp")
file(WRITE "${TEMP_FILE}" "#include <version>
#if !defined(__has_cpp_attribute) || __has_cpp_attribute(${ATTRIBUTE}) < ${MINIMUM_VALUE}L
#error Missing feature
#endif
")
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
try_compile(HAS_FEATURE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY} "${TEMP_FILE}"
CXX_STANDARD 20
CXX_STANDARD_REQUIRED TRUE
)
set(${CACHE_VAR} ${HAS_FEATURE} CACHE INTERNAL "Cached attribute test result for ${MACRO}")
endif()
if(NOT HAS_FEATURE)
message(FATAL_ERROR "${ATTRIBUTE} is not supported by your compiler, at least ${MINIMUM_VALUE} is required.")
endif()
function(install_imported_dep_library name)
get_target_property(SONAME "${name}" IMPORTED_SONAME_RELEASE)
get_target_property(LOCATION "${name}" IMPORTED_LOCATION_RELEASE)
install(FILES "${LOCATION}" RENAME "${SONAME}" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endfunction()

View File

@@ -0,0 +1,45 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# - Try to find Facebook zstd library
# This will define
# Zstd_FOUND
# Zstd_INCLUDE_DIR
# Zstd_LIBRARY
#
find_path(Zstd_INCLUDE_DIR NAMES zstd.h)
find_library(Zstd_LIBRARY_DEBUG NAMES zstdd zstd_staticd)
find_library(Zstd_LIBRARY_RELEASE NAMES zstd zstd_static)
include(SelectLibraryConfigurations)
SELECT_LIBRARY_CONFIGURATIONS(Zstd)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
Zstd DEFAULT_MSG
Zstd_LIBRARY Zstd_INCLUDE_DIR
)
mark_as_advanced(Zstd_INCLUDE_DIR Zstd_LIBRARY)
if(Zstd_FOUND AND NOT (TARGET Zstd::Zstd))
add_library (Zstd::Zstd UNKNOWN IMPORTED)
set_target_properties(Zstd::Zstd
PROPERTIES
IMPORTED_LOCATION ${Zstd_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${Zstd_INCLUDE_DIR})
endif()

View File

@@ -1,186 +0,0 @@
# Copyright (C) 2020 Dieter Baron and Thomas Klausner
#
# The authors can be contacted at <info@libzip.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The names of the authors may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#[=======================================================================[.rst:
Findzstd
-------
Finds the Zstandard (zstd) library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``zstd::libzstd_shared``
The shared Zstandard library
``zstd::libzstd_static``
The shared Zstandard library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``zstd_FOUND``
True if the system has the Zstandard library.
``zstd_VERSION``
The version of the Zstandard library which was found.
Cache Variables
^^^^^^^^^^^^^^^
The following cache variables may also be set:
``zstd_INCLUDE_DIR``
The directory containing ``zstd.h``.
``zstd_STATIC_LIBRARY``
The path to the Zstandard static library.
``zstd_SHARED_LIBRARY``
The path to the Zstandard shared library.
``zstd_DLL``
The path to the Zstandard DLL.
#]=======================================================================]
find_package(PkgConfig)
pkg_check_modules(PC_zstd QUIET libzstd)
find_path(zstd_INCLUDE_DIR
NAMES zstd.h
HINTS ${PC_zstd_INCLUDE_DIRS}
)
find_file(zstd_DLL
NAMES libzstd.dll zstd.dll
PATH_SUFFIXES bin
HINTS ${PC_zstd_PREFIX}
)
# On Windows, we manually define the library names to avoid mistaking the
# implib for the static library
if(zstd_DLL)
set(_zstd_win_static_name zstd-static)
set(_zstd_win_shared_name zstd)
else()
# vcpkg removes the -static suffix in static builds
set(_zstd_win_static_name zstd zstd_static)
set(_zstd_win_shared_name)
endif()
set(_previous_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".dylib" ".dll.a" ".lib")
find_library(zstd_SHARED_LIBRARY
NAMES zstd ${_zstd_win_shared_name}
HINTS ${PC_zstd_LIBDIR}
)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".lib")
find_library(zstd_STATIC_LIBRARY
NAMES zstd ${_zstd_win_static_name}
HINTS ${PC_zstd_LIBDIR}
)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_previous_suffixes})
# Set zstd_LIBRARY to the shared library or fall back to the static library
if(zstd_SHARED_LIBRARY)
set(_zstd_LIBRARY ${zstd_SHARED_LIBRARY})
else()
set(_zstd_LIBRARY ${zstd_STATIC_LIBRARY})
endif()
# Extract version information from the header file
if(zstd_INCLUDE_DIR)
file(STRINGS ${zstd_INCLUDE_DIR}/zstd.h _ver_major_line
REGEX "^#define ZSTD_VERSION_MAJOR *[0-9]+"
LIMIT_COUNT 1)
string(REGEX MATCH "[0-9]+"
zstd_MAJOR_VERSION "${_ver_major_line}")
file(STRINGS ${zstd_INCLUDE_DIR}/zstd.h _ver_minor_line
REGEX "^#define ZSTD_VERSION_MINOR *[0-9]+"
LIMIT_COUNT 1)
string(REGEX MATCH "[0-9]+"
zstd_MINOR_VERSION "${_ver_minor_line}")
file(STRINGS ${zstd_INCLUDE_DIR}/zstd.h _ver_release_line
REGEX "^#define ZSTD_VERSION_RELEASE *[0-9]+"
LIMIT_COUNT 1)
string(REGEX MATCH "[0-9]+"
zstd_RELEASE_VERSION "${_ver_release_line}")
set(Zstd_VERSION "${zstd_MAJOR_VERSION}.${zstd_MINOR_VERSION}.${zstd_RELEASE_VERSION}")
unset(_ver_major_line)
unset(_ver_minor_line)
unset(_ver_release_line)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(zstd
FOUND_VAR zstd_FOUND
REQUIRED_VARS
_zstd_LIBRARY
zstd_INCLUDE_DIR
VERSION_VAR zstd_VERSION
)
if(zstd_FOUND AND zstd_SHARED_LIBRARY AND NOT TARGET zstd::libzstd_shared)
add_library(zstd::libzstd_shared SHARED IMPORTED)
if(WIN32)
set_target_properties(zstd::libzstd_shared PROPERTIES
IMPORTED_LOCATION "${zstd_DLL}"
IMPORTED_IMPLIB "${zstd_SHARED_LIBRARY}"
)
else()
set_target_properties(zstd::libzstd_shared PROPERTIES
IMPORTED_LOCATION "${zstd_SHARED_LIBRARY}"
)
endif()
set_target_properties(zstd::libzstd_shared PROPERTIES
INTERFACE_COMPILE_OPTIONS "${PC_zstd_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${zstd_INCLUDE_DIR}"
)
endif()
if(zstd_FOUND AND zstd_STATIC_LIBRARY AND NOT TARGET zstd::libzstd_static)
add_library(zstd::libzstd_static STATIC IMPORTED)
set_target_properties(zstd::libzstd_static PROPERTIES
IMPORTED_LOCATION "${zstd_STATIC_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_zstd_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${zstd_INCLUDE_DIR}"
)
endif()
mark_as_advanced(
zstd_INCLUDE_DIR
zstd_DLL
zstd_SHARED_LIBRARY
zstd_STATIC_LIBRARY
)

View File

@@ -1,8 +1,7 @@
# DuckStation - PlayStation 1, aka. PSX Emulator
[Features](#features) | [Downloading and Running](#downloading-and-running) | [Building](#building) | [Disclaimers](#disclaimers)
**Latest Builds for Windows 10/11 (x64/ARM64), Linux (AppImage x64/ARM32/ARM64), and macOS (11.0+ Universal):** https://github.com/stenzek/duckstation/releases/tag/latest
**Latest Builds for Windows 10/11 (x64/ARM64), Linux (AppImage/Flatpak), and macOS (11.0+ Universal):** https://github.com/stenzek/duckstation/releases/tag/latest
**Game Compatibility List:** https://docs.google.com/spreadsheets/d/e/2PACX-1vRE0jjiK_aldpICoy5kVQlpk2f81Vo6P4p9vfg4d7YoTOoDlH4PQHoXjTD2F7SdN8SSBLoEAItaIqQo/pubhtml
@@ -24,23 +23,20 @@ DuckStation features a fully-featured frontend built using Qt, as well as a full
Other features include:
- CPU Recompiler/JIT (x86-64, armv7/AArch32, AArch64, RISC-V/RV64).
- Hardware renderer supporting D3D11, D3D12, OpenGL, Vulkan and Metal APIs.
- Hardware (D3D11, D3D12, OpenGL, Vulkan, Metal) and software rendering.
- Upscaling, texture filtering, and true colour (24-bit) in hardware renderers.
- PGXP for geometry precision, texture correction, and depth buffer emulation.
- Accurate blending via Rasterizer Order Views/Fragment Shader Interlock.
- PGXP for geometry precision, texture correction, and depth buffer emulation.
- Texture replacement system in hardware renderers.
- Vectorized and multi-threaded software renderer.
- Motion adaptive deinterlacing.
- Adaptive downsampling filter.
- Screen rotation for vertical or "TATE" shmup games.
- Post processing shader chains (GLSL and Reshade FX).
- Border overlays/bezels displayed around game content.
- "Fast boot" for skipping BIOS splash/intro.
- Save state support, with runahead and rewind.
- Windows, Linux, macOS support.
- Supports reading directly from CD, bin/cue images, raw bin/img files, MAME CHD, single-track ECM, MDS/MDF, and unencrypted PBP formats.
- Preloading of disc images to RAM to avoid disk sleeping hitches.
- Merging of multi-disc games in game list/grid with memory cards shared between discs.
- Automatic loading/applying of PPF patches.
- Direct booting of homebrew executables.
- Direct loading of Portable Sound Format (psf) files.
@@ -48,7 +44,6 @@ Other features include:
- Digital and analog controllers for input (rumble is forwarded to host).
- GunCon and Justifier lightgun support (simulated with mouse).
- NeGcon support.
- Controller presets and per-game configuration.
- Qt and "Big Picture" UI.
- Automatic updates with preview and latest channels.
- Automatic content scanning - game titles/hashes are provided by redump.org.
@@ -61,30 +56,26 @@ Other features include:
- RetroAchievements.
- Discord Rich Presence.
- Video capture with Media Foundation (Windows) and [FFmpeg](https://www.ffmpeg.org/) (All Platforms) backends.
- Free camera function.
- Parallel port cartridge emulation.
## System Requirements
- A CPU faster than a potato. But it needs to be x86_64, AArch32/armv7, AArch64/ARMv8, or RISC-V/RV64.
- A GPU capable of OpenGL 3.1/OpenGL ES 3.1/Direct3D 11 Feature Level 10.0/Vulkan 1.0. So, basically anything made in the last 10 years or so.
- For the hardware renderers, a GPU capable of OpenGL 3.1/OpenGL ES 3.1/Direct3D 11 Feature Level 10.0 (or Vulkan 1.0) and above. So, basically anything made in the last 10 years or so.
- SDL, XInput or DInput compatible game controller (e.g. XB360/XBOne/XBSeries). DualShock 3 users on Windows will need to install the official DualShock 3 drivers included as part of PlayStation Now.
## Downloading and running
Binaries of DuckStation for Windows x64/ARM64, Linux x86_64/ARM32/ARM64 (in AppImage format), and macOS Universal Binaries are available via GitHub Releases and are automatically built with every commit/push.
Binaries of DuckStation for Windows x64/ARM64, Linux x86_64 (in AppImage/Flatpak formats), and macOS Universal Binaries are available via GitHub Releases and are automatically built with every commit/push.
As per the terms of CC-BY-NC-ND, redistribution of **unmodified releases and code** is permitted. However, we would prefer if you linked to https://www.duckstation.org/ instead. Please note that pre-configured settings and packages are considered modifications.
For x86 machines (most systems), you will need a CPU that supports the SSE4.1 instruction set for the "normal" build. This includes all Intel CPUs manufactured after 2007, and AMD CPUs manufactured after 2011. If you have a CPU that is older, you will need to download the "SSE2" build from the releases page, which has lower performance but still supports these CPUs.
The main releases page is limited to the last 30 releases due to automatic updater limitations. Older releases can be downloaded from https://github.com/duckstation/old-releases/releases.
### Windows
DuckStation **requires** Windows 10/11, specifically version 1809 or newer. If you are still using Windows 7/8/8.1, DuckStation **will not run** on your operating system. Running these operating systems in 2023 should be considered a security risk, and I would recommend updating to something which receives vendor support.
If you must use an older operating system, [v0.1-5624](https://github.com/duckstation/old-releases/releases/tag/v0.1-5624) is the last version which will run. But do not expect to recieve any assistance, these builds are no longer supported.
If you must use an older operating system, [v0.1-5624](https://github.com/stenzek/duckstation/releases/tag/v0.1-5624) is the last version which will run. But do not expect to recieve any assistance, these builds are no longer supported.
To download:
- Go to https://github.com/stenzek/duckstation/releases/tag/latest, and download the Windows x64 build. This is a zip archive containing the prebuilt binary. If you have an ARM64 Windows machine such as Snapdragon, download the Windows ARM64 build.
- Go to https://github.com/stenzek/duckstation/releases/tag/latest, and download the Windows x64 build. This is a zip archive containing the prebuilt binary.
- Alternatively, direct download link: https://github.com/stenzek/duckstation/releases/download/latest/duckstation-windows-x64-release.zip
- Extract the archive **to a subdirectory**. The archive has no root subdirectory, so extracting to the current directory will drop a bunch of files in your download directory if you do not extract to a subdirectory.
@@ -94,7 +85,7 @@ Once downloaded and extracted, you can launch the emulator with `duckstation-qt-
### Linux
DuckStation is provided for x86_64/ARM32/ARM64 Linux in AppImage formats.
DuckStation is provided for x86_64 Linux in AppImage and Flatpak formats. The release on [Flathub](https://flathub.org/apps/org.duckstation.DuckStation) is official, and synchronized with the latest rolling/stable release on GitHub.
#### AppImage
@@ -103,25 +94,28 @@ The AppImages require a distribution equivalent to Ubuntu 22.04 or newer to run.
- Go to https://github.com/stenzek/duckstation/releases/tag/latest, and download `duckstation-x64.AppImage`.
- Run `chmod a+x` on the downloaded AppImage -- following this step, the AppImage can be run like a typical executable.
If you were previously using the Flatpak package, to migrate your data from the Flatpak to the AppImage, you can run the following command:
```bash
mv ~/.var/app/org.duckstation.DuckStation/config/duckstation ~/.local/share
```
#### Flatpak
You will need to re-add your game directories after switching to the AppImage.
- Go to https://github.com/stenzek/duckstation/releases/tag/latest, and download `duckstation-x64.flatpak`.
- Run `flatpak install ./duckstation-x64.flatpak`.
or, if you have FlatHub set up:
- Run `flatpak install org.duckstation.DuckStation`.
Use `flatpak run org.duckstation.DuckStation` to start, or select `DuckStation` in the launcher of your desktop environment. Follow the Setup Wizard to get started.
### macOS
Universal macOS builds are provided for both x86_64 (Intel) and ARM64 (Apple Silicon).
Universal MacOS builds are provided for both x64 and ARM64 (Apple Silicon).
macOS Big Sur (11.0) is required, as this is also the minimum requirement for Qt.
MacOS Big Sir (11.0) is required, as this is also the minimum requirement for Qt.
To download:
- Go to https://github.com/stenzek/duckstation/releases/tag/latest, and download `duckstation-mac-release.zip`.
- Extract the zip by double-clicking it.
- Open `DuckStation.app`, optionally moving it to your desired location first.
- Open DuckStation.app, optionally moving it to your desired location first.
- Depending on GateKeeper configuration, you may need to right click -> Open the first time you run it, as code signing certificates are out of the question for a project which brings in zero revenue.
### Android
You will need a device with armv7 (32-bit ARM), AArch64 (64-bit ARM), or x86_64 (64-bit x86). 64-bit is preferred, the requirements are higher for 32-bit, you'll probably want at least a 1.5GHz CPU.
@@ -148,7 +142,7 @@ For example, if your disc image was named `Spyro3.cue`, you would place the SBI
CHD images with built-in subchannel information are also supported.
If you are playing directly from a disc and your CD/DVD drive does not support subchannel reading, or has a skew with the returned SubQ, you can place the SBI file in the `subchannels` directory under the user directory, with the serial or title of the game.
If you are playing directly from a disc and your CD/DVD drive does not support subchannel reading, or has a skew with the returned SubQ, you can place the SBI file in the `subchannel` directory under the user directory, with the serial or title of the game.
### Cheats and patch database
@@ -162,6 +156,7 @@ Each release includes the latest version of the database, however you are free t
Requirements:
- Visual Studio 2022
1. Clone the respository: `git clone https://github.com/stenzek/duckstation.git`.
2. Download the dependencies pack from https://github.com/stenzek/duckstation-ext-qt-minimal/releases/download/latest/deps-x64.7z, and extract it to `dep\msvc`.
3. Open the Visual Studio solution `duckstation.sln` in the root, or "Open Folder" for cmake build.
@@ -183,6 +178,11 @@ Fedora package names:
alsa-lib-devel autoconf automake brotli-devel clang cmake dbus-devel egl-wayland-devel extra-cmake-modules fontconfig-devel gcc-c++ gtk3-devel libavcodec-free-devel libavformat-free-devel libavutil-free-devel libcurl-devel libdecor-devel libevdev-devel libICE-devel libinput-devel libSM-devel libswresample-free-devel libswscale-free-devel libX11-devel libXau-devel libxcb-devel libXcomposite-devel libXcursor-devel libXext-devel libXfixes-devel libXft-devel libXi-devel libxkbcommon-devel libxkbcommon-x11-devel libXpresent-devel libXrandr-devel libXrender-devel libtool lld llvm make mesa-libEGL-devel mesa-libGL-devel nasm ninja-build openssl-devel patch pcre2-devel perl-Digest-SHA pipewire-devel pulseaudio-libs-devel systemd-devel wayland-devel xcb-util-cursor-devel xcb-util-devel xcb-util-errors-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel xcb-util-xrm-devel zlib-devel
```
Arch package names:
```
base-devel clang cmake curl dbus extra-cmake-modules freetype git libjpeg-turbo libpng libwebp libx11 libxrandr lld llvm ninja qt6-base qt6-imageformats qt6-svg qt6-tools wayland zstd
```
#### Building
1. Clone the repository: `git clone https://github.com/stenzek/duckstation.git`, `cd duckstation`.
@@ -197,6 +197,7 @@ Requirements:
- CMake
- Xcode
1. Clone the repository: `git clone https://github.com/stenzek/duckstation.git`.
2. Build the dependencies. This will take a while. `scripts/deps/build-dependencies-mac.sh deps`.
2. Run CMake to configure the build system: `cmake -Bbuild-release -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH="$PWD/deps"`.
@@ -213,14 +214,16 @@ This is located in the following places depending on the platform you're using:
- Linux: `$XDG_DATA_HOME/duckstation`, or `~/.local/share/duckstation`.
- macOS: `~/Library/Application Support/DuckStation`.
So, if you were using Linux, you would place your BIOS images in `~/.local/share/duckstation/bios`. This directory will be created upon running DuckStation for the first time.
So, if you were using Linux, you would place your BIOS images in `~/.local/share/duckstation/bios`. This directory will be created upon running DuckStation
for the first time.
If you wish to use a "portable" build, where the user directory is the same as where the executable is located, create an empty file named `portable.txt` in the same directory as the DuckStation executable.
If you wish to use a "portable" build, where the user directory is the same as where the executable is located, create an empty file named `portable.txt`
in the same directory as the DuckStation executable.
## Bindings for Qt frontend
Your keyboard or game controller can be used to simulate a variety of PlayStation controllers. Controller input is supported through DInput, XInput, and SDL backends and can be changed through `Settings -> Controllers`.
To bind your input device, go to `Settings -> Controllers`, and select the virtual controller you want to map. Automatic mapping handles the majority of controllers. However, if you need to manually bind a controller, click the box below the button/axis name, and press the key or button on your input device that you wish to bind to.
To bind your input device, go to `Settings -> Controllers`, and select the virtual controller you want to map. Automatic mapping handles the majority of ocntrollers. However, if you need to manually bind a controller, click the box below the button/axis name, and press the key or button on your input device that you wish to bind to.
## SDL Game Controller Database
DuckStation releases ship with a database of game controller mappings for the SDL controller backend, courtesy of https://github.com/mdqinc/SDL_GameControllerDB. The included `gamecontrollerdb.txt` file can be found in the `resources` subdirectory of the DuckStation program directory.

View File

@@ -1,7 +1,6 @@
Tradução:
# DuckStation - Emulador de PlayStation 1, também conhecido como PSX
[Últimas Notícias](#latest-news) | [Recursos](#features) | [Download e Execução](#downloading-and-running) | [Compilação](#building) | [Avisos Legais](#disclaimers)
**Últimas Versões para Windows 10/11, Linux (AppImage/Flatpak) e macOS:** https://github.com/stenzek/duckstation/releases/tag/latest
@@ -94,19 +93,19 @@ ou, se você tiver o FlatHub configurado:
- Execute `flatpak install org.duckstation.DuckStation`.
Use `flatpak run org.duckstation.DuckStation` para iniciar, ou selecione `DuckStation` no lançador do seu ambiente de desktop. Siga o Assistente de Configuração para começar.
### macOS
São fornecidas compilações universais do macOS para x86_64 (Intel) e ARM64 (Apple Silicon).
São fornecidas compilações universais do MacOS para x64 e ARM64 (Apple Silicon).
macOS Big Sur (11.0) é necessário, pois também é o requisito mínimo para o Qt.
MacOS Big Sir (11.0) é necessário, pois também é o requisito mínimo para o Qt.
Para baixar:
- Acesse https://github.com/stenzek/duckstation/releases/tag/latest e baixe `duckstation-mac-release.zip`.
- Extraia o arquivo ZIP dando um duplo clique nele.
- Abra o `DuckStation.app`, opcionalmente movendo-o para a localização desejada antes.
- Abra o DuckStation.app, opcionalmente movendo-o para a localização desejada antes.
- Dependendo da configuração do GateKeeper, você pode precisar clicar com o botão direito -> Abrir na primeira vez que executá-lo, já que certificados de assinatura de código estão fora de questão para um projeto que não gera receita alguma.
### Android
Você precisará de um dispositivo com armv7 (32 bits ARM), AArch64 (64 bits ARM) ou x86_64 (64 bits x86). 64 bits são preferíveis, os requisitos são mais altos para 32 bits, você provavelmente vai querer pelo menos um CPU de 1,5 GHz.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ffffff" d="M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20ZM12 11H16V13H12V16L8 12L12 8V11Z"></path></svg>

Before

Width:  |  Height:  |  Size: 316 B

View File

@@ -1,9 +0,0 @@
void main()
{
// Radial gradient at (0.6, 0.4), moving horizontally slowly
float r1 = length(v_tex0 - vec2(0.6, 0.4));
float r2 = length(v_tex0 - vec2(0.61, 0.41));
float r = mix(r1, r2, sin(u_time / 5.0));
vec3 bg_color = vec3(0.1, 0.1, 0.6) * (1.0f - r);
o_col0 = vec4(bg_color, 1.0);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

View File

@@ -1,10 +0,0 @@
void main()
{
vec2 uv = v_tex0 * 2.0 - 1.0;
uv.x *= u_display_size.x / u_display_size.y;
vec2 center = vec2(cos(u_time * 0.2) * 1.5, (sin(u_time * 0.2) * 0.2) * 0.5 + 1.2);
float dist = length(uv - center);
float gradient = smoothstep(0.0, 1.0, dist);
o_col0 = vec4(mix(vec3(0.5, 0.5, 0.9), vec3(0.05, 0.05, 0.2), gradient), 1.0);
}

View File

@@ -1,30 +0,0 @@
const float PI = 3.14159265359;
const float SCALE = 150.0;
const float LENGTH = 7.5;
// https://www.shadertoy.com/view/Xt23Ry
float rand(float co) {
return fract(sin(co * 91.3458) * 47453.5453);
}
vec3 background(vec2 pos) {
// Radial gradient at (0.6, 0.4).
float r = length(pos - vec2(0.6, 0.4));
return vec3(r * 0.1);
}
// Inspired by https://www.shadertoy.com/view/Wtl3D7
vec3 trails(vec2 pos, vec3 bg_color, vec3 fg_color) {
float cdist = length(pos) * SCALE;
float rv = rand(ceil(cdist));
float rotation = u_time * rv * 0.005;
float nangle = atan(pos.y, pos.x) / PI;
float intensity = smoothstep(rv, rv - 1.5, fract(nangle + rotation + rv * 0.1) * LENGTH) * step(0.1, cdist / SCALE);
return mix(bg_color, fg_color * rv, intensity);
}
void main() {
vec3 bg_color = background(v_tex0);
vec3 fg_color = vec3(0.7, 0.7, 1.5);
o_col0 = vec4(trails(v_tex0, bg_color, fg_color), 1.0);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ffffff" d="M21 3C21.5523 3 22 3.44772 22 4V11H20V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM21 13C21.5523 13 22 13.4477 22 14V20C22 20.5523 21.5523 21 21 21H13C12.4477 21 12 20.5523 12 20V14C12 13.4477 12.4477 13 13 13H21ZM11.5 7L9.45711 9.04311L11.7071 11.2929L10.2929 12.7071L8.04311 10.4571L6 12.5V7H11.5Z"></path></svg>

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 512 512"
version="1.1"
id="svg1"
sodipodi:docname="exit.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="2.640625"
inkscape:cx="256"
inkscape:cy="256"
inkscape:window-width="2856"
inkscape:window-height="1651"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path
fill="#ffffff"
d="m 363.3838,123.77433 108.17663,108.17663 c 6.3426,6.3426 9.95436,15.06368 9.95436,24.04904 0,8.98535 -3.61176,17.70643 -9.95436,24.04904 L 363.3838,388.22566 c -5.63787,5.63787 -13.21376,8.72108 -21.14202,8.72108 -16.47315,0 -29.86309,-13.38994 -29.86309,-29.86309 V 312.37869 H 199.6213 c -15.59223,0 -28.18935,-12.59711 -28.18935,-28.18935 v -56.37869 c 0,-15.59223 12.59712,-28.18935 28.18935,-28.18935 h 112.75739 v -54.70496 c 0,-16.47315 13.38994,-29.86309 29.86309,-29.86309 7.92826,0 15.50415,3.1713 21.14202,8.72108 z m -191.95185,-8.72108 h -56.3787 c -15.59222,0 -28.189349,12.59712 -28.189349,28.18935 v 225.51479 c 0,15.59223 12.597119,28.18935 28.189349,28.18935 h 56.3787 c 15.59223,0 28.18935,12.59712 28.18935,28.18935 0,15.59223 -12.59712,28.18935 -28.18935,28.18935 h -56.3787 c -46.688603,0 -84.56804,-37.87944 -84.56804,-84.56805 V 143.2426 c 0,-46.688607 37.879437,-84.568041 84.56804,-84.568041 h 56.3787 c 15.59223,0 28.18935,12.597115 28.18935,28.189347 0,15.592224 -12.59712,28.189344 -28.18935,28.189344 z"
id="path1"
style="stroke-width:0.880917" />
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 640 640"
version="1.1"
id="svg1"
sodipodi:docname="game-list.svg"
width="640"
height="640"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#000001"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.93429246"
inkscape:cx="436.69409"
inkscape:cy="330.73156"
inkscape:window-width="2844"
inkscape:window-height="1651"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path
fill="#ffffff"
d="m 264.14016,286.21023 c -46.25894,0 -83.78977,37.53084 -83.78977,83.78977 0,46.25893 37.53083,83.78978 83.78977,83.78978 h 111.71968 c 46.25894,0 83.78977,-37.53085 83.78977,-83.78978 0,-46.25894 -37.53083,-83.78977 -83.78977,-83.78977 z m 132.66713,45.38613 a 17.456203,17.456203 0 1 1 0,34.91239 17.456203,17.456203 0 1 1 0,-34.91239 z m -45.38612,59.35108 a 17.456203,17.456203 0 1 1 34.91239,0 17.456203,17.456203 0 1 1 -34.91239,0 z m -97.75473,-45.38612 c 0,-5.80419 4.66954,-10.47373 10.47372,-10.47373 5.80418,0 10.47371,4.66954 10.47371,10.47373 v 13.96496 h 13.96497 c 5.80417,0 10.47373,4.66953 10.47373,10.47372 0,5.80419 -4.66954,10.47372 -10.47373,10.47372 h -13.96497 v 13.96496 c 0,5.80419 -4.66953,10.47373 -10.47371,10.47373 -5.80419,0 -10.47372,-4.66954 -10.47372,-10.47373 v -13.96496 h -13.96496 c -5.8042,0 -10.47373,-4.66953 -10.47373,-10.47372 0,-5.8042 4.66953,-10.47373 10.47373,-10.47373 h 13.96496 z"
id="path1"
style="stroke-width:0.436405" />
<path
fill="#ffffff"
d="m 89.226718,138.67812 c -9.066093,0 -16.483806,7.41772 -16.483806,16.48381 v 329.67613 c 0,9.06609 7.417713,16.4838 16.483806,16.4838 H 550.77329 c 9.06608,0 16.4838,-7.41771 16.4838,-16.4838 V 155.16193 c 0,-9.06609 -7.41772,-16.48381 -16.4838,-16.48381 z m -65.935226,16.48381 c 0,-36.36739 29.567828,-65.935223 65.935226,-65.935223 H 550.77329 c 36.36739,0 65.93522,29.567833 65.93522,65.935223 v 329.67613 c 0,36.36739 -29.56783,65.93523 -65.93522,65.93523 H 89.226718 c -36.367398,0 -65.935226,-29.56784 -65.935226,-65.93523 z m 98.902838,65.93523 c 0,-18.20753 14.76011,-32.96759 32.96761,-32.96759 18.20751,0 32.96761,14.76006 32.96761,32.96759 0,18.20752 -14.7601,32.96759 -32.96761,32.96759 -18.2075,0 -32.96761,-14.76007 -32.96761,-32.96759 z m 107.14475,0 c 0,-13.70217 11.02352,-24.72572 24.72569,-24.72572 h 230.77329 c 13.70216,0 24.72571,11.02355 24.72571,24.72572 0,13.70217 -11.02355,24.72572 -24.72571,24.72572 H 254.06477 c -13.70217,0 -24.72569,-11.02355 -24.72569,-24.72572 z"
id="path1-5"
style="stroke-width:1.03024"
sodipodi:nodetypes="ssssssssssssssssssssssssssssss" />
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ffffff" d="M2.13127 13.6308C1.9492 12.5349 1.95521 11.434 2.13216 10.3695C3.23337 10.3963 4.22374 9.86798 4.60865 8.93871C4.99357 8.00944 4.66685 6.93557 3.86926 6.17581C4.49685 5.29798 5.27105 4.51528 6.17471 3.86911C6.9345 4.66716 8.0087 4.99416 8.93822 4.60914C9.86774 4.22412 10.3961 3.23332 10.369 2.13176C11.4649 1.94969 12.5658 1.9557 13.6303 2.13265C13.6036 3.23385 14.1319 4.22422 15.0612 4.60914C15.9904 4.99406 17.0643 4.66733 17.8241 3.86975C18.7019 4.49734 19.4846 5.27153 20.1308 6.1752C19.3327 6.93499 19.0057 8.00919 19.3907 8.93871C19.7757 9.86823 20.7665 10.3966 21.8681 10.3695C22.0502 11.4654 22.0442 12.5663 21.8672 13.6308C20.766 13.6041 19.7756 14.1324 19.3907 15.0616C19.0058 15.9909 19.3325 17.0648 20.1301 17.8245C19.5025 18.7024 18.7283 19.4851 17.8247 20.1312C17.0649 19.3332 15.9907 19.0062 15.0612 19.3912C14.1316 19.7762 13.6033 20.767 13.6303 21.8686C12.5344 22.0507 11.4335 22.0447 10.3691 21.8677C10.3958 20.7665 9.86749 19.7761 8.93822 19.3912C8.00895 19.0063 6.93508 19.333 6.17532 20.1306C5.29749 19.503 4.51479 18.7288 3.86862 17.8252C4.66667 17.0654 4.99367 15.9912 4.60865 15.0616C4.22363 14.1321 3.23284 13.6038 2.13127 13.6308ZM11.9997 15.0002C13.6565 15.0002 14.9997 13.657 14.9997 12.0002C14.9997 10.3433 13.6565 9.00018 11.9997 9.00018C10.3428 9.00018 8.99969 10.3433 8.99969 12.0002C8.99969 13.657 10.3428 15.0002 11.9997 15.0002Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 512 512"
version="1.1"
id="svg1"
sodipodi:docname="start-bios.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="2.640625"
inkscape:cx="256"
inkscape:cy="256"
inkscape:window-width="2852"
inkscape:window-height="1651"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path
fill="#ffffff"
d="m 186.11835,53.343194 c 0,-11.617826 -9.34668,-20.964498 -20.9645,-20.964498 -11.61782,0 -20.9645,9.346672 -20.9645,20.964498 v 34.940832 c -30.83528,0 -55.905324,25.070044 -55.905324,55.905324 H 53.343194 c -11.617826,0 -20.964498,9.34668 -20.964498,20.9645 0,11.61782 9.346672,20.9645 20.964498,20.9645 H 88.284026 V 235.0355 H 53.343194 c -11.617826,0 -20.964498,9.34668 -20.964498,20.96449 0,11.61783 9.346672,20.96451 20.964498,20.96451 h 34.940832 v 48.91716 H 53.343194 c -11.617826,0 -20.964498,9.34666 -20.964498,20.96449 0,11.61783 9.346672,20.9645 20.964498,20.9645 h 34.940832 c 0,30.83528 25.070044,55.90533 55.905324,55.90533 v 34.94082 c 0,11.61783 9.34668,20.9645 20.9645,20.9645 11.61782,0 20.9645,-9.34667 20.9645,-20.9645 v -34.94082 h 48.91715 v 34.94082 c 0,11.61783 9.34668,20.9645 20.96449,20.9645 11.61783,0 20.96451,-9.34667 20.96451,-20.9645 v -34.94082 h 48.91716 v 34.94082 c 0,11.61783 9.34666,20.9645 20.96449,20.9645 11.61783,0 20.9645,-9.34667 20.9645,-20.9645 v -34.94082 c 30.83528,0 55.90533,-25.07005 55.90533,-55.90533 h 34.94082 c 11.61783,0 20.9645,-9.34667 20.9645,-20.9645 0,-11.61783 -9.34667,-20.96449 -20.9645,-20.96449 H 423.71598 V 276.9645 h 34.94082 c 11.61783,0 20.9645,-9.34668 20.9645,-20.96451 0,-11.61781 -9.34667,-20.96449 -20.9645,-20.96449 h -34.94082 v -48.91715 h 34.94082 c 11.61783,0 20.9645,-9.34668 20.9645,-20.9645 0,-11.61782 -9.34667,-20.9645 -20.9645,-20.9645 h -34.94082 c 0,-30.83528 -25.07005,-55.905324 -55.90533,-55.905324 V 53.343194 c 0,-11.617826 -9.34667,-20.964498 -20.9645,-20.964498 -11.61783,0 -20.96449,9.346672 -20.96449,20.964498 V 88.284026 H 276.9645 V 53.343194 c 0,-11.617826 -9.34668,-20.964498 -20.96451,-20.964498 -11.61781,0 -20.96449,9.346672 -20.96449,20.964498 v 34.940832 h -48.91715 z m -13.97634,90.846156 h 167.71598 c 15.46131,0 27.95266,12.49134 27.95266,27.95266 v 167.71598 c 0,15.46131 -12.49135,27.95266 -27.95266,27.95266 H 172.14201 c -15.46132,0 -27.95266,-12.49135 -27.95266,-27.95266 V 172.14201 c 0,-15.46132 12.49134,-27.95266 27.95266,-27.95266 z m 167.71598,27.95266 H 172.14201 v 167.71598 h 167.71598 z"
id="path1"
style="stroke-width:0.87352" />
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 512 512"
version="1.1"
id="svg1"
sodipodi:docname="start-disc.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.8685849"
inkscape:cx="269.72282"
inkscape:cy="294.60797"
inkscape:window-width="2856"
inkscape:window-height="1652"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path
fill="#ffffff"
d="m 49.005172,256 a 206.99483,206.99483 0 1 1 413.989658,0 206.99483,206.99483 0 1 1 -413.989658,0 z M 256,281.87436 a 25.874355,25.874355 0 1 1 0,-51.74871 25.874355,25.874355 0 1 1 0,51.74871 z M 178.37694,256 a 77.62306,77.62306 0 1 0 155.24612,0 77.62306,77.62306 0 1 0 -155.24612,0 z m -51.7487,-12.93717 c 0,-28.30008 14.15003,-57.48958 36.54752,-79.88707 22.39749,-22.39749 51.58699,-36.54752 79.88707,-36.54752 7.11544,0 12.93717,-5.82173 12.93717,-12.93718 0,-7.11545 -5.82173,-12.93718 -12.93717,-12.93718 -36.70924,0 -72.12476,18.03119 -98.24169,44.06726 -26.11692,26.03607 -44.06726,61.53245 -44.06726,98.24169 0,7.11544 5.82173,12.93717 12.93718,12.93717 7.11545,0 12.93718,-5.82173 12.93718,-12.93717 z"
id="path1"
style="stroke-width:0.808574" />
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 576 576"
version="1.1"
id="svg1"
sodipodi:docname="start-file.svg"
width="576"
height="576"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="2.640625"
inkscape:cx="287.81065"
inkscape:cy="225.70414"
inkscape:window-width="2852"
inkscape:window-height="1651"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path
fill="#ffffff"
d="m 375.58614,492.32782 h 43.78453 c 10.39883,0 19.97669,-5.47306 25.17611,-14.50363 L 546.71069,302.68606 c 5.29063,-9.03055 5.29063,-20.15913 0.0912,-29.2809 -5.19941,-9.12179 -14.77728,-14.59484 -25.26731,-14.59484 H 156.66347 c -10.39883,0 -19.9767,5.47306 -25.17611,14.50363 L 69.0944,380.22117 V 142.05155 c 0,-8.02715 6.567679,-14.59484 14.594844,-14.59484 H 190.87013 c 3.83116,0 7.57108,1.55071 10.30762,4.28724 l 24.17271,24.17271 c 19.15573,19.15573 45.15279,29.91943 72.24447,29.91943 h 107.1809 c 8.02716,0 14.59484,6.56767 14.59484,14.59484 v 29.1897 h 43.78454 v -29.1897 c 0,-32.19988 -26.17951,-58.37938 -58.37938,-58.37938 h -107.1809 c -15.50702,0 -30.37551,-6.11158 -41.32164,-17.05772 L 232.10058,100.72991 C 221.15444,89.783772 206.28594,83.672181 190.77892,83.672181 H 83.689244 c -32.199876,0 -58.379378,26.179509 -58.379378,58.379369 v 291.89689 c 0,32.19988 26.179502,58.37938 58.379378,58.37938 h 21.618616 z"
id="path1"
style="stroke-width:0.912178" />
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,10 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 113.48 122.88">
<!-- https://uxwing.com/wp-content/themes/uxwing/download/sport-and-awards/trophy-icon.png -->
<title>trophy</title>
<path style="fill:#808080;" d="M3.21,18.74H19.86q0-4,.06-8.26V0H93.05V10.49c0,2.92,0,5.66,0,8.26h17.24a3.08,3.08,0,0,1,3.07,2.93,77.67,77.67,0,0,1-.4,13.9A34,34,0,0,1,109.11,48a21.77,21.77,0,0,1-8.8,8.6A31.91,31.91,0,0,1,86.41,60C83.14,65.43,78.78,68,73.68,72.67c-6.17,4.71-10.81,8.26-7.2,19.13h5.39a7.84,7.84,0,0,1,7.82,7.82v3.15h.77A7.69,7.69,0,0,1,85.91,105h0a7.67,7.67,0,0,1,2.26,5.45v5.23a1.77,1.77,0,0,1-1.77,1.77H26.58a1.77,1.77,0,0,1-1.77-1.77v-5.23A7.66,7.66,0,0,1,27.07,105h0a7.66,7.66,0,0,1,5.44-2.26h.77V99.62a7.75,7.75,0,0,1,2.3-5.51v0a7.81,7.81,0,0,1,5.51-2.29h6.06c3.22-10.26-1-13.58-6.83-18.17A44.47,44.47,0,0,1,27.34,60,31.87,31.87,0,0,1,13,56.54a21.47,21.47,0,0,1-8.73-8.6A34.07,34.07,0,0,1,.51,35.58,78.1,78.1,0,0,1,.13,21.9v-.08a3.08,3.08,0,0,1,3.09-3.08ZM92.71,30a121.67,121.67,0,0,1-2,18,15.17,15.17,0,0,0,5-1.9,10.49,10.49,0,0,0,3.69-3.89,18,18,0,0,0,1.93-6,45.37,45.37,0,0,0,.5-6.25H92.71ZM20.12,30H12a49.78,49.78,0,0,0,.45,6.27,18.41,18.41,0,0,0,1.8,6,10.13,10.13,0,0,0,3.57,3.88A14.57,14.57,0,0,0,22.54,48a92,92,0,0,1-2.42-18Z"/>
<path style="fill:#A0A0A0;" d="M20.08,21.82H3.21C2.75,31.1,3.34,40,7,46.43c3.43,6.11,9.7,10.15,20.62,10.46a27.9,27.9,0,0,1-3.48-5.51c-6.56-.88-10.36-3.59-12.54-7.67S8.94,34.32,8.94,28.14a1.23,1.23,0,0,1,1.23-1.23h9.91V21.82Zm72.77,5.1h10.82a1.23,1.23,0,0,1,1.23,1.22c0,6.2-.56,11.54-2.84,15.6s-6.16,6.75-12.7,7.64a25.38,25.38,0,0,1-3.69,5.52c11-.29,17.29-4.33,20.77-10.45,3.67-6.47,4.29-15.34,3.84-24.62H92.85v5.09Z"/>
<path style="fill:#222;" d="M79.69,102.76h.77A7.69,7.69,0,0,1,85.91,105h0a7.67,7.67,0,0,1,2.26,5.45v10.63a1.77,1.77,0,0,1-1.77,1.77H26.58a1.77,1.77,0,0,1-1.77-1.77V110.48A7.66,7.66,0,0,1,27.07,105h0a7.66,7.66,0,0,1,5.44-2.26H79.69Z"/>
<path style="fill:#C0C0C0;" d="M70.64,108H35.72a4.22,4.22,0,0,0-3,1.25h0a4.26,4.26,0,0,0-1.25,3v5.28H81.55v-5.28a4.26,4.26,0,0,0-1.26-3,4.31,4.31,0,0,0-3-1.26Z"/>
<path style="fill:#909090;" d="M50.71,93h6V75.21c-22.17-7.88-24.26-35-29.55-72.57H22.53V29.41C23,39.6,24.68,47.14,27,52.91a38.19,38.19,0,0,0,8.39,12.8,68.65,68.65,0,0,0,6.71,5.78C49.11,77,54.19,81,50.71,93Z"/>
<path style="fill:#B0B0B0;" d="M56.71,93H63c-3.88-12.71,1.68-17,9-22.55,8.05-6.14,18.5-14.12,18.5-40.35V2.64H27.16C30.58,26.92,32.66,46.81,39.67,60A39.14,39.14,0,0,0,49,71.13a29.3,29.3,0,0,0,5.47,3.17,19.1,19.1,0,0,0,2.21.74v.15l.07,0V93Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,13 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 113.48 122.88">
<!-- https://uxwing.com/wp-content/themes/uxwing/download/sport-and-awards/trophy-icon.png -->
<title>trophy</title>
<path style="fill:#f39d00;" d="M3.21,18.74H19.86q0-4,.06-8.26V0H93.05V10.49c0,2.92,0,5.66,0,8.26h17.24a3.08,3.08,0,0,1,3.07,2.93,77.67,77.67,0,0,1-.4,13.9A34,34,0,0,1,109.11,48a21.77,21.77,0,0,1-8.8,8.6A31.91,31.91,0,0,1,86.41,60C83.14,65.43,78.78,68,73.68,72.67c-6.17,4.71-10.81,8.26-7.2,19.13h5.39a7.84,7.84,0,0,1,7.82,7.82v3.15h.77A7.69,7.69,0,0,1,85.91,105h0a7.67,7.67,0,0,1,2.26,5.45v5.23a1.77,1.77,0,0,1-1.77,1.77H26.58a1.77,1.77,0,0,1-1.77-1.77v-5.23A7.66,7.66,0,0,1,27.07,105h0a7.66,7.66,0,0,1,5.44-2.26h.77V99.62a7.75,7.75,0,0,1,2.3-5.51v0a7.81,7.81,0,0,1,5.51-2.29h6.06c3.22-10.26-1-13.58-6.83-18.17A44.47,44.47,0,0,1,27.34,60,31.87,31.87,0,0,1,13,56.54a21.47,21.47,0,0,1-8.73-8.6A34.07,34.07,0,0,1,.51,35.58,78.1,78.1,0,0,1,.13,21.9v-.08a3.08,3.08,0,0,1,3.09-3.08ZM92.71,30a121.67,121.67,0,0,1-2,18,15.17,15.17,0,0,0,5-1.9,10.49,10.49,0,0,0,3.69-3.89,18,18,0,0,0,1.93-6,45.37,45.37,0,0,0,.5-6.25H92.71ZM20.12,30H12a49.78,49.78,0,0,0,.45,6.27,18.41,18.41,0,0,0,1.8,6,10.13,10.13,0,0,0,3.57,3.88A14.57,14.57,0,0,0,22.54,48a92,92,0,0,1-2.42-18Z"/>
<path style="fill:#f9c809;" d="M20.08,21.82H3.21C2.75,31.1,3.34,40,7,46.43c3.43,6.11,9.7,10.15,20.62,10.46a27.9,27.9,0,0,1-3.48-5.51c-6.56-.88-10.36-3.59-12.54-7.67S8.94,34.32,8.94,28.14a1.23,1.23,0,0,1,1.23-1.23h9.91V21.82Zm72.77,5.1h10.82a1.23,1.23,0,0,1,1.23,1.22c0,6.2-.56,11.54-2.84,15.6s-6.16,6.75-12.7,7.64a25.38,25.38,0,0,1-3.69,5.52c11-.29,17.29-4.33,20.77-10.45,3.67-6.47,4.29-15.34,3.84-24.62H92.85v5.09Z"/>
<path style="fill:#222;" d="M79.69,102.76h.77A7.69,7.69,0,0,1,85.91,105h0a7.67,7.67,0,0,1,2.26,5.45v10.63a1.77,1.77,0,0,1-1.77,1.77H26.58a1.77,1.77,0,0,1-1.77-1.77V110.48A7.66,7.66,0,0,1,27.07,105h0a7.66,7.66,0,0,1,5.44-2.26H79.69Z"/>
<path style="fill:#ead79e;" d="M70.64,108H35.72a4.22,4.22,0,0,0-3,1.25h0a4.26,4.26,0,0,0-1.25,3v5.28H81.55v-5.28a4.26,4.26,0,0,0-1.26-3,4.31,4.31,0,0,0-3-1.26Z"/>
<path style="fill:#f8b705;" d="M50.71,93h6V75.21c-22.17-7.88-24.26-35-29.55-72.57H22.53V29.41C23,39.6,24.68,47.14,27,52.91a38.19,38.19,0,0,0,8.39,12.8,68.65,68.65,0,0,0,6.71,5.78C49.11,77,54.19,81,50.71,93Z"/>
<path style="fill:#fac809;" d="M56.71,93H63c-3.88-12.71,1.68-17,9-22.55,8.05-6.14,18.5-14.12,18.5-40.35V2.64H27.16C30.58,26.92,32.66,46.81,39.67,60A39.14,39.14,0,0,0,49,71.13a29.3,29.3,0,0,0,5.47,3.17,19.1,19.1,0,0,0,2.21.74v.15l.07,0V93Z"/>
<path style="fill:#f39d00;" d="M58.26,20.13,61.06,27l7.39.56a1.9,1.9,0,0,1,1,3.41l-5.59,4.74,1.76,7.18a1.9,1.9,0,0,1-1.41,2.29,1.88,1.88,0,0,1-1.49-.26L56.5,41l-6.29,3.89a1.9,1.9,0,0,1-2.62-.62,1.85,1.85,0,0,1-.23-1.44l1.75-7.18-5.66-4.8a1.91,1.91,0,0,1,1.09-3.35L51.93,27l2.81-6.84a1.91,1.91,0,0,1,3.52,0Z"/>
<polygon style="fill:#fff;" points="56.5 20.86 59.75 28.78 68.31 29.43 61.76 34.98 63.79 43.3 56.5 38.79 49.21 43.3 51.24 34.98 44.69 29.43 53.24 28.78 56.5 20.86 56.5 20.86 56.5 20.86"/>
<path style="fill:#fff;" d="M76.62,47.62l-.07.1a3.79,3.79,0,0,0-5.17.83l-.1-.08a3.52,3.52,0,0,0,.62-2.75,3.57,3.57,0,0,0-1.44-2.42,26.79,26.79,0,0,0,2.82.53,3.58,3.58,0,0,0,2.42-1.45l.1.07a3.81,3.81,0,0,0,.82,5.17ZM84.27,34.8l-.07.1a3.78,3.78,0,0,0-5.17.82l-.1-.07a3.79,3.79,0,0,0-.83-5.17l.07-.1a3.8,3.8,0,0,0,5.18-.83l.09.08a3.79,3.79,0,0,0,.83,5.17Zm.06-13.56-.13.18a6.94,6.94,0,0,0-9.46,1.51l-.18-.13a6.5,6.5,0,0,0,1.14-5,6.49,6.49,0,0,0-2.65-4.43l.13-.18a6.94,6.94,0,0,0,9.46-1.51l.18.13a6.5,6.5,0,0,0-1.14,5,6.51,6.51,0,0,0,2.65,4.43Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -1,10 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 113.48 122.88">
<!-- https://uxwing.com/wp-content/themes/uxwing/download/sport-and-awards/trophy-icon.png -->
<title>trophy</title>
<path style="fill:#f39d00;" d="M3.21,18.74H19.86q0-4,.06-8.26V0H93.05V10.49c0,2.92,0,5.66,0,8.26h17.24a3.08,3.08,0,0,1,3.07,2.93,77.67,77.67,0,0,1-.4,13.9A34,34,0,0,1,109.11,48a21.77,21.77,0,0,1-8.8,8.6A31.91,31.91,0,0,1,86.41,60C83.14,65.43,78.78,68,73.68,72.67c-6.17,4.71-10.81,8.26-7.2,19.13h5.39a7.84,7.84,0,0,1,7.82,7.82v3.15h.77A7.69,7.69,0,0,1,85.91,105h0a7.67,7.67,0,0,1,2.26,5.45v5.23a1.77,1.77,0,0,1-1.77,1.77H26.58a1.77,1.77,0,0,1-1.77-1.77v-5.23A7.66,7.66,0,0,1,27.07,105h0a7.66,7.66,0,0,1,5.44-2.26h.77V99.62a7.75,7.75,0,0,1,2.3-5.51v0a7.81,7.81,0,0,1,5.51-2.29h6.06c3.22-10.26-1-13.58-6.83-18.17A44.47,44.47,0,0,1,27.34,60,31.87,31.87,0,0,1,13,56.54a21.47,21.47,0,0,1-8.73-8.6A34.07,34.07,0,0,1,.51,35.58,78.1,78.1,0,0,1,.13,21.9v-.08a3.08,3.08,0,0,1,3.09-3.08ZM92.71,30a121.67,121.67,0,0,1-2,18,15.17,15.17,0,0,0,5-1.9,10.49,10.49,0,0,0,3.69-3.89,18,18,0,0,0,1.93-6,45.37,45.37,0,0,0,.5-6.25H92.71ZM20.12,30H12a49.78,49.78,0,0,0,.45,6.27,18.41,18.41,0,0,0,1.8,6,10.13,10.13,0,0,0,3.57,3.88A14.57,14.57,0,0,0,22.54,48a92,92,0,0,1-2.42-18Z"/>
<path style="fill:#f9c809;" d="M20.08,21.82H3.21C2.75,31.1,3.34,40,7,46.43c3.43,6.11,9.7,10.15,20.62,10.46a27.9,27.9,0,0,1-3.48-5.51c-6.56-.88-10.36-3.59-12.54-7.67S8.94,34.32,8.94,28.14a1.23,1.23,0,0,1,1.23-1.23h9.91V21.82Zm72.77,5.1h10.82a1.23,1.23,0,0,1,1.23,1.22c0,6.2-.56,11.54-2.84,15.6s-6.16,6.75-12.7,7.64a25.38,25.38,0,0,1-3.69,5.52c11-.29,17.29-4.33,20.77-10.45,3.67-6.47,4.29-15.34,3.84-24.62H92.85v5.09Z"/>
<path style="fill:#222;" d="M79.69,102.76h.77A7.69,7.69,0,0,1,85.91,105h0a7.67,7.67,0,0,1,2.26,5.45v10.63a1.77,1.77,0,0,1-1.77,1.77H26.58a1.77,1.77,0,0,1-1.77-1.77V110.48A7.66,7.66,0,0,1,27.07,105h0a7.66,7.66,0,0,1,5.44-2.26H79.69Z"/>
<path style="fill:#ead79e;" d="M70.64,108H35.72a4.22,4.22,0,0,0-3,1.25h0a4.26,4.26,0,0,0-1.25,3v5.28H81.55v-5.28a4.26,4.26,0,0,0-1.26-3,4.31,4.31,0,0,0-3-1.26Z"/>
<path style="fill:#f8b705;" d="M50.71,93h6V75.21c-22.17-7.88-24.26-35-29.55-72.57H22.53V29.41C23,39.6,24.68,47.14,27,52.91a38.19,38.19,0,0,0,8.39,12.8,68.65,68.65,0,0,0,6.71,5.78C49.11,77,54.19,81,50.71,93Z"/>
<path style="fill:#fac809;" d="M56.71,93H63c-3.88-12.71,1.68-17,9-22.55,8.05-6.14,18.5-14.12,18.5-40.35V2.64H27.16C30.58,26.92,32.66,46.81,39.67,60A39.14,39.14,0,0,0,49,71.13a29.3,29.3,0,0,0,5.47,3.17,19.1,19.1,0,0,0,2.21.74v.15l.07,0V93Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,6 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 111.24">
<title>risk</title>
<path d="M2.5,85l43-74.41h0a22.59,22.59,0,0,1,8-8.35,15.72,15.72,0,0,1,16,0,22.52,22.52,0,0,1,7.93,8.38l.23.44,42.08,73.07a20.91,20.91,0,0,1,3,10.84A16.44,16.44,0,0,1,121,102.4a15.45,15.45,0,0,1-5.74,6,21,21,0,0,1-11.35,2.78v0H17.7c-.21,0-.43,0-.64,0a19,19,0,0,1-7.83-1.74,15.83,15.83,0,0,1-6.65-5.72A16.26,16.26,0,0,1,0,95.18a21.66,21.66,0,0,1,2.2-9.62c.1-.2.2-.4.31-.59Z"/>
<path style="fill:#fec901;fill-rule:evenodd;" d="M9.09,88.78l43-74.38c5.22-8.94,13.49-9.2,18.81,0l42.32,73.49c4.12,6.79,2.41,15.9-9.31,15.72H17.7C9.78,103.79,5,97.44,9.09,88.78Z"/>
<path style="fill:#010101;" d="M57.55,83.15a5.47,5.47,0,0,1,5.85-1.22,5.65,5.65,0,0,1,2,1.3A5.49,5.49,0,0,1,67,86.77a5.12,5.12,0,0,1-.08,1.4,5.22,5.22,0,0,1-.42,1.34,5.51,5.51,0,0,1-5.2,3.25,5.63,5.63,0,0,1-2.26-.53,5.51,5.51,0,0,1-2.81-2.92A6,6,0,0,1,55.9,88a5.28,5.28,0,0,1,0-1.31h0a6,6,0,0,1,.56-2,4.6,4.6,0,0,1,1.14-1.56Zm8.12-10.21c-.19,4.78-8.28,4.78-8.46,0-.82-8.19-2.92-27.63-2.85-35.32.07-2.37,2-3.78,4.55-4.31a11.65,11.65,0,0,1,2.48-.25,12.54,12.54,0,0,1,2.5.25c2.59.56,4.63,2,4.63,4.43V38l-2.84,35Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,11 +0,0 @@
# Psx.jpg Credits
To the Author: SOQUEROEU.
The "psx.jpg" background was edited from the one obtained from "Soqueroeu TV Backgrounds 2.0" repository: https://github.com/soqueroeu/Soqueroeu-TV-Backgrounds_V2.0/tree/main.
The material is free to use according to the agreement below:
## AGREEMENT
This pack is free. You should not pay for anything related to this graphics pack and shader preset. You may distribute and reproduce part from this content, as long as you give credit to the authors involved. You may not profit from the sale of products that contain material in this package without the author's prior permission.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

View File

@@ -1,7 +0,0 @@
image: "psx.webp"
displayStartX: 990
displayStartY: 260
displayEndX: 2850
displayEndY: 1655
alphaBlend: false
destinationAlphaBlend: false

View File

@@ -0,0 +1,2 @@
lbsubmit.wav: https://freesound.org/people/Eponn/sounds/636656/
unlock.wav and message.wav are from https://github.com/RetroAchievements/RAInterface

View File

@@ -1,3 +0,0 @@
lbsubmit.wav: https://pixabay.com/sound-effects/notification-sound-7062/
unlock.wav: https://pixabay.com/sound-effects/notification-pluck-on-269288/
message.wav: https://pixabay.com/sound-effects/system-notification-199277/

View File

@@ -874,11 +874,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h3>plutosvg - <a href="https://github.com/sammycage/plutosvg">https://github.com/sammycage/plutosvg</a></h3>
<h3>lunasvg - <a href="https://github.com/sammycage/lunasvg">https://github.com/sammycage/lunasvg</a></h3>
<pre>
MIT License
Copyright (c) 2020-2025 Samuel Ugochukwu <sammycageagle@gmail.com>
Copyright (c) 2020-2024 Samuel Ugochukwu <sammycageagle@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,6 +1,3 @@
set(_saved_CMAKE_MESSAGE_LOG_LEVEL ${CMAKE_MESSAGE_LOG_LEVEL})
set(CMAKE_MESSAGE_LOG_LEVEL NOTICE)
set(FMT_INSTALL OFF CACHE BOOL "")
add_subdirectory(fmt EXCLUDE_FROM_ALL)
disable_compiler_warnings_for_target(fmt)
@@ -58,4 +55,3 @@ if(WIN32)
add_subdirectory(winpixeventruntime EXCLUDE_FROM_ALL)
endif()
set(CMAKE_MESSAGE_LOG_LEVEL ${_saved_CMAKE_MESSAGE_LOG_LEVEL})

View File

@@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -158,7 +158,7 @@ Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
@@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest

View File

@@ -1 +1 @@
8.0
7.0.2

View File

@@ -187,6 +187,17 @@ struct AVCodecParameters;
* @{
*/
#if FF_API_BUFFER_MIN_SIZE
/**
* @ingroup lavc_encoding
* minimum encoding buffer size
* Used to avoid some checks during header writing.
* @deprecated Unused: avcodec_receive_packet() does not work
* with preallocated packet buffers.
*/
#define AV_INPUT_BUFFER_MIN_SIZE 16384
#endif
/**
* @ingroup lavc_encoding
*/
@@ -223,9 +234,18 @@ typedef struct RcOverride{
* Use qpel MC.
*/
#define AV_CODEC_FLAG_QPEL (1 << 4)
#if FF_API_DROPCHANGED
/**
* Don't output frames whose parameters differ from first
* decoded frame in stream.
*
* @deprecated callers should implement this functionality in their own code
*/
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
#endif
/**
* Request the encoder to output reconstructed frames, i.e.\ frames that would
* be produced by decoding the encoded bitstream. These frames may be retrieved
* be produced by decoding the encoded bistream. These frames may be retrieved
* by calling avcodec_receive_frame() immediately after a successful call to
* avcodec_receive_packet().
*
@@ -399,12 +419,6 @@ typedef struct RcOverride{
*/
#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
/**
* Decoding only.
* Do not apply picture enhancement layers, export them instead.
*/
#define AV_CODEC_EXPORT_DATA_ENHANCEMENTS (1 << 4)
/**
* The decoder will keep a reference to the frame and may reuse it later.
*/
@@ -495,21 +509,16 @@ typedef struct AVCodecContext {
int flags2;
/**
* Out-of-band global headers that may be used by some codecs.
*
* - decoding: Should be set by the caller when available (typically from a
* demuxer) before opening the decoder; some decoders require this to be
* set and will fail to initialize otherwise.
*
* The array must be allocated with the av_malloc() family of functions;
* allocated size must be at least AV_INPUT_BUFFER_PADDING_SIZE bytes
* larger than extradata_size.
*
* - encoding: May be set by the encoder in avcodec_open2() (possibly
* depending on whether the AV_CODEC_FLAG_GLOBAL_HEADER flag is set).
*
* After being set, the array is owned by the codec and freed in
* avcodec_free_context().
* some codecs need / can use extradata like Huffman tables.
* MJPEG: Huffman tables
* rv10: additional flags
* MPEG-4: global headers (they can be in the bitstream or here)
* The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
* than extradata_size to avoid problems if it is read with the bitstream reader.
* The bytewise contents of extradata must not depend on the architecture or CPU endianness.
* Must be allocated with the av_malloc() family of functions.
* - encoding: Set/allocated/freed by libavcodec.
* - decoding: Set/allocated/freed by user.
*/
uint8_t *extradata;
int extradata_size;
@@ -550,6 +559,23 @@ typedef struct AVCodecContext {
*/
AVRational framerate;
#if FF_API_TICKS_PER_FRAME
/**
* For some codecs, the time base is closer to the field rate than the frame rate.
* Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
* if no telecine is used ...
*
* Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
*
* @deprecated
* - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
* - encoding: Set AVCodecContext.framerate instead
*
*/
attribute_deprecated
int ticks_per_frame;
#endif
/**
* Codec delay.
*
@@ -1149,10 +1175,6 @@ typedef struct AVCodecContext {
* this callback and filled with the extra buffers if there are more
* buffers than buf[] can hold. extended_buf will be freed in
* av_frame_unref().
* Decoders will generally initialize the whole buffer before it is output
* but it can in rare error conditions happen that uninitialized data is passed
* through. \important The buffers returned by get_buffer* should thus not contain sensitive
* data.
*
* If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
* avcodec_default_get_buffer2() instead of providing buffers allocated by
@@ -1516,7 +1538,6 @@ typedef struct AVCodecContext {
#define FF_DCT_MMX 3
#define FF_DCT_ALTIVEC 5
#define FF_DCT_FAAN 6
#define FF_DCT_NEON 7
/**
* IDCT algorithm, see FF_IDCT_* below.
@@ -1616,29 +1637,165 @@ typedef struct AVCodecContext {
* See the AV_PROFILE_* defines in defs.h.
*/
int profile;
#if FF_API_FF_PROFILE_LEVEL
/** @deprecated The following defines are deprecated; use AV_PROFILE_*
* in defs.h instead. */
#define FF_PROFILE_UNKNOWN -99
#define FF_PROFILE_RESERVED -100
#define FF_PROFILE_AAC_MAIN 0
#define FF_PROFILE_AAC_LOW 1
#define FF_PROFILE_AAC_SSR 2
#define FF_PROFILE_AAC_LTP 3
#define FF_PROFILE_AAC_HE 4
#define FF_PROFILE_AAC_HE_V2 28
#define FF_PROFILE_AAC_LD 22
#define FF_PROFILE_AAC_ELD 38
#define FF_PROFILE_MPEG2_AAC_LOW 128
#define FF_PROFILE_MPEG2_AAC_HE 131
#define FF_PROFILE_DNXHD 0
#define FF_PROFILE_DNXHR_LB 1
#define FF_PROFILE_DNXHR_SQ 2
#define FF_PROFILE_DNXHR_HQ 3
#define FF_PROFILE_DNXHR_HQX 4
#define FF_PROFILE_DNXHR_444 5
#define FF_PROFILE_DTS 20
#define FF_PROFILE_DTS_ES 30
#define FF_PROFILE_DTS_96_24 40
#define FF_PROFILE_DTS_HD_HRA 50
#define FF_PROFILE_DTS_HD_MA 60
#define FF_PROFILE_DTS_EXPRESS 70
#define FF_PROFILE_DTS_HD_MA_X 61
#define FF_PROFILE_DTS_HD_MA_X_IMAX 62
#define FF_PROFILE_EAC3_DDP_ATMOS 30
#define FF_PROFILE_TRUEHD_ATMOS 30
#define FF_PROFILE_MPEG2_422 0
#define FF_PROFILE_MPEG2_HIGH 1
#define FF_PROFILE_MPEG2_SS 2
#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
#define FF_PROFILE_MPEG2_MAIN 4
#define FF_PROFILE_MPEG2_SIMPLE 5
#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
#define FF_PROFILE_H264_BASELINE 66
#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
#define FF_PROFILE_H264_MAIN 77
#define FF_PROFILE_H264_EXTENDED 88
#define FF_PROFILE_H264_HIGH 100
#define FF_PROFILE_H264_HIGH_10 110
#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
#define FF_PROFILE_H264_HIGH_422 122
#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
#define FF_PROFILE_H264_STEREO_HIGH 128
#define FF_PROFILE_H264_HIGH_444 144
#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
#define FF_PROFILE_H264_CAVLC_444 44
#define FF_PROFILE_VC1_SIMPLE 0
#define FF_PROFILE_VC1_MAIN 1
#define FF_PROFILE_VC1_COMPLEX 2
#define FF_PROFILE_VC1_ADVANCED 3
#define FF_PROFILE_MPEG4_SIMPLE 0
#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
#define FF_PROFILE_MPEG4_CORE 2
#define FF_PROFILE_MPEG4_MAIN 3
#define FF_PROFILE_MPEG4_N_BIT 4
#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
#define FF_PROFILE_MPEG4_HYBRID 8
#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
#define FF_PROFILE_VP9_0 0
#define FF_PROFILE_VP9_1 1
#define FF_PROFILE_VP9_2 2
#define FF_PROFILE_VP9_3 3
#define FF_PROFILE_HEVC_MAIN 1
#define FF_PROFILE_HEVC_MAIN_10 2
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
#define FF_PROFILE_HEVC_REXT 4
#define FF_PROFILE_HEVC_SCC 9
#define FF_PROFILE_VVC_MAIN_10 1
#define FF_PROFILE_VVC_MAIN_10_444 33
#define FF_PROFILE_AV1_MAIN 0
#define FF_PROFILE_AV1_HIGH 1
#define FF_PROFILE_AV1_PROFESSIONAL 2
#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
#define FF_PROFILE_SBC_MSBC 1
#define FF_PROFILE_PRORES_PROXY 0
#define FF_PROFILE_PRORES_LT 1
#define FF_PROFILE_PRORES_STANDARD 2
#define FF_PROFILE_PRORES_HQ 3
#define FF_PROFILE_PRORES_4444 4
#define FF_PROFILE_PRORES_XQ 5
#define FF_PROFILE_ARIB_PROFILE_A 0
#define FF_PROFILE_ARIB_PROFILE_C 1
#define FF_PROFILE_KLVA_SYNC 0
#define FF_PROFILE_KLVA_ASYNC 1
#define FF_PROFILE_EVC_BASELINE 0
#define FF_PROFILE_EVC_MAIN 1
#endif
/**
* Encoding level descriptor.
* - encoding: Set by user, corresponds to a specific level defined by the
* codec, usually corresponding to the profile level, if not specified it
* is set to AV_LEVEL_UNKNOWN.
* is set to FF_LEVEL_UNKNOWN.
* - decoding: Set by libavcodec.
* See AV_LEVEL_* in defs.h.
*/
int level;
#if FF_API_FF_PROFILE_LEVEL
/** @deprecated The following define is deprecated; use AV_LEVEL_UNKOWN
* in defs.h instead. */
#define FF_LEVEL_UNKNOWN -99
#endif
#if FF_API_CODEC_PROPS
/**
* Properties of the stream that gets decoded
* - encoding: unused
* - decoding: set by libavcodec
*/
attribute_deprecated
unsigned properties;
#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
#endif
/**
* Skip loop filtering for selected frames.
@@ -1727,13 +1884,8 @@ typedef struct AVCodecContext {
* For SUBTITLE_ASS subtitle type, it should contain the whole ASS
* [Script Info] and [V4+ Styles] section, plus the [Events] line and
* the Format line following. It shouldn't include any Dialogue line.
*
* - encoding: May be set by the caller before avcodec_open2() to an array
* allocated with the av_malloc() family of functions.
* - decoding: May be set by libavcodec in avcodec_open2().
*
* After being set, the array is owned by the codec and freed in
* avcodec_free_context().
* - encoding: Set/allocated/freed by user (before avcodec_open2())
* - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
*/
int subtitle_header_size;
uint8_t *subtitle_header;
@@ -1919,7 +2071,7 @@ typedef struct AVCodecContext {
* - encoding: may be set by user before calling avcodec_open2() for
* encoder configuration. Afterwards owned and freed by the
* encoder.
* - decoding: may be set by libavcodec in avcodec_open2().
* - decoding: unused
*/
AVFrameSideData **decoded_side_data;
int nb_decoded_side_data;
@@ -2217,6 +2369,24 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
*/
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
#if FF_API_AVCODEC_CLOSE
/**
* Close a given AVCodecContext and free all the data associated with it
* (but not the AVCodecContext itself).
*
* Calling this function on an AVCodecContext that hasn't been opened will free
* the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
* codec. Subsequent calls will do nothing.
*
* @deprecated Do not use this function. Use avcodec_free_context() to destroy a
* codec context (either open or closed). Opening and closing a codec context
* multiple times is not supported anymore -- use multiple codec contexts
* instead.
*/
attribute_deprecated
int avcodec_close(AVCodecContext *avctx);
#endif
/**
* Free all allocated data in the given subtitle struct.
*
@@ -2520,36 +2690,6 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
enum AVPixelFormat hw_pix_fmt,
AVBufferRef **out_frames_ref);
enum AVCodecConfig {
AV_CODEC_CONFIG_PIX_FORMAT, ///< AVPixelFormat, terminated by AV_PIX_FMT_NONE
AV_CODEC_CONFIG_FRAME_RATE, ///< AVRational, terminated by {0, 0}
AV_CODEC_CONFIG_SAMPLE_RATE, ///< int, terminated by 0
AV_CODEC_CONFIG_SAMPLE_FORMAT, ///< AVSampleFormat, terminated by AV_SAMPLE_FMT_NONE
AV_CODEC_CONFIG_CHANNEL_LAYOUT, ///< AVChannelLayout, terminated by {0}
AV_CODEC_CONFIG_COLOR_RANGE, ///< AVColorRange, terminated by AVCOL_RANGE_UNSPECIFIED
AV_CODEC_CONFIG_COLOR_SPACE, ///< AVColorSpace, terminated by AVCOL_SPC_UNSPECIFIED
};
/**
* Retrieve a list of all supported values for a given configuration type.
*
* @param avctx An optional context to use. Values such as
* `strict_std_compliance` may affect the result. If NULL,
* default values are used.
* @param codec The codec to query, or NULL to use avctx->codec.
* @param config The configuration to query.
* @param flags Currently unused; should be set to zero.
* @param out_configs On success, set to a list of configurations, terminated
* by a config-specific terminator, or NULL if all
* possible values are supported.
* @param out_num_configs On success, set to the number of elements in
*out_configs, excluding the terminator. Optional.
*/
int avcodec_get_supported_config(const AVCodecContext *avctx,
const AVCodec *codec, enum AVCodecConfig config,
unsigned flags, const void **out_configs,
int *out_num_configs);
/**
@@ -2900,7 +3040,7 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
*
* @note for encoders, this function will only do something if the encoder
* declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
* will drain any remaining packets, and can then be reused for a different
* will drain any remaining packets, and can then be re-used for a different
* stream (as opposed to sending a null frame which will leave the encoder
* in a permanent EOF state after draining). This can be desirable if the
* cost of tearing down and replacing the encoder instance is high.
@@ -2935,8 +3075,8 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
/**
* @return a positive value if s is open (i.e. avcodec_open2() was called on it),
* 0 otherwise.
* @return a positive value if s is open (i.e. avcodec_open2() was called on it
* with no corresponding avcodec_close()), 0 otherwise.
*/
int avcodec_is_open(AVCodecContext *s);

View File

@@ -0,0 +1,149 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_AVFFT_H
#define AVCODEC_AVFFT_H
#include "libavutil/attributes.h"
#include "version_major.h"
#if FF_API_AVFFT
/**
* @file
* @ingroup lavc_fft
* FFT functions
*/
/**
* @defgroup lavc_fft FFT functions
* @ingroup lavc_misc
*
* @{
*/
typedef float FFTSample;
typedef struct FFTComplex {
FFTSample re, im;
} FFTComplex;
typedef struct FFTContext FFTContext;
/**
* Set up a complex FFT.
* @param nbits log2 of the length of the input array
* @param inverse if 0 perform the forward transform, if 1 perform the inverse
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_FFT
*/
attribute_deprecated
FFTContext *av_fft_init(int nbits, int inverse);
/**
* Do the permutation needed BEFORE calling ff_fft_calc().
* @deprecated without replacement
*/
attribute_deprecated
void av_fft_permute(FFTContext *s, FFTComplex *z);
/**
* Do a complex FFT with the parameters defined in av_fft_init(). The
* input data must be permuted before. No 1.0/sqrt(n) normalization is done.
* @deprecated use the av_tx_fn value returned by av_tx_init, which also does permutation
*/
attribute_deprecated
void av_fft_calc(FFTContext *s, FFTComplex *z);
attribute_deprecated
void av_fft_end(FFTContext *s);
/**
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_MDCT,
* with a flag of AV_TX_FULL_IMDCT for a replacement to av_imdct_calc.
*/
attribute_deprecated
FFTContext *av_mdct_init(int nbits, int inverse, double scale);
attribute_deprecated
void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
attribute_deprecated
void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
attribute_deprecated
void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
attribute_deprecated
void av_mdct_end(FFTContext *s);
/* Real Discrete Fourier Transform */
enum RDFTransformType {
DFT_R2C,
IDFT_C2R,
IDFT_R2C,
DFT_C2R,
};
typedef struct RDFTContext RDFTContext;
/**
* Set up a real FFT.
* @param nbits log2 of the length of the input array
* @param trans the type of transform
*
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_RDFT
*/
attribute_deprecated
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
attribute_deprecated
void av_rdft_calc(RDFTContext *s, FFTSample *data);
attribute_deprecated
void av_rdft_end(RDFTContext *s);
/* Discrete Cosine Transform */
typedef struct DCTContext DCTContext;
enum DCTTransformType {
DCT_II = 0,
DCT_III,
DCT_I,
DST_I,
};
/**
* Set up DCT.
*
* @param nbits size of the input array:
* (1 << nbits) for DCT-II, DCT-III and DST-I
* (1 << nbits) + 1 for DCT-I
* @param type the type of transform
*
* @note the first element of the input of DST-I is ignored
*
* @deprecated use av_tx_init from libavutil/tx.h with an appropriate type of AV_TX_FLOAT_DCT
*/
attribute_deprecated
DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
attribute_deprecated
void av_dct_calc(DCTContext *s, FFTSample *data);
attribute_deprecated
void av_dct_end (DCTContext *s);
/**
* @}
*/
#endif /* FF_API_AVFFT */
#endif /* AVCODEC_AVFFT_H */

View File

@@ -80,6 +80,21 @@
*/
#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
#if FF_API_SUBFRAMES
/**
* Codec can output multiple frames per AVPacket
* Normally demuxers return one frame at a time, demuxers which do not do
* are connected to a parser to split what they return into proper frames.
* This flag is reserved to the very rare category of codecs which have a
* bitstream that cannot be split into frames without timeconsuming
* operations like full decoding. Demuxers carrying such bitstreams thus
* may return multiple frames in a packet. This has many disadvantages like
* prohibiting stream copy in many cases thus it should only be considered
* as a last resort.
*/
#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
#endif
/**
* Codec is experimental and is thus avoided in favor of non experimental
* encoders
@@ -190,19 +205,10 @@ typedef struct AVCodec {
*/
int capabilities;
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
/**
* Deprecated codec capabilities.
*/
attribute_deprecated
const AVRational *supported_framerates; ///< @deprecated use avcodec_get_supported_config()
attribute_deprecated
const enum AVPixelFormat *pix_fmts; ///< @deprecated use avcodec_get_supported_config()
attribute_deprecated
const int *supported_samplerates; ///< @deprecated use avcodec_get_supported_config()
attribute_deprecated
const enum AVSampleFormat *sample_fmts; ///< @deprecated use avcodec_get_supported_config()
const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}
@@ -220,9 +226,7 @@ typedef struct AVCodec {
/**
* Array of supported channel layouts, terminated with a zeroed layout.
* @deprecated use avcodec_get_supported_config()
*/
attribute_deprecated
const AVChannelLayout *ch_layouts;
} AVCodec;

View File

@@ -206,9 +206,7 @@ enum AVCodecID {
AV_CODEC_ID_BMV_VIDEO,
AV_CODEC_ID_VBLE,
AV_CODEC_ID_DXTORY,
#if FF_API_V408_CODECID
AV_CODEC_ID_V410,
#endif
AV_CODEC_ID_XWD,
AV_CODEC_ID_CDXL,
AV_CODEC_ID_XBM,
@@ -256,10 +254,8 @@ enum AVCodecID {
AV_CODEC_ID_012V,
AV_CODEC_ID_AVUI,
AV_CODEC_ID_TARGA_Y216,
#if FF_API_V408_CODECID
AV_CODEC_ID_V308,
AV_CODEC_ID_V408,
#endif
AV_CODEC_ID_YUV4,
AV_CODEC_ID_AVRN,
AV_CODEC_ID_CPIA,
@@ -326,11 +322,6 @@ enum AVCodecID {
AV_CODEC_ID_RTV1,
AV_CODEC_ID_VMIX,
AV_CODEC_ID_LEAD,
AV_CODEC_ID_DNXUC,
AV_CODEC_ID_RV60,
AV_CODEC_ID_JPEGXL_ANIM,
AV_CODEC_ID_APV,
AV_CODEC_ID_PRORES_RAW,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
@@ -425,8 +416,6 @@ enum AVCodecID {
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
AV_CODEC_ID_ADPCM_IMA_ACORN,
AV_CODEC_ID_ADPCM_XMD,
AV_CODEC_ID_ADPCM_IMA_XBOX,
AV_CODEC_ID_ADPCM_SANYO,
/* AMR */
AV_CODEC_ID_AMR_NB = 0x12000,
@@ -554,8 +543,6 @@ enum AVCodecID {
AV_CODEC_ID_AC4,
AV_CODEC_ID_OSQ,
AV_CODEC_ID_QOA,
AV_CODEC_ID_LC3,
AV_CODEC_ID_G728,
/* subtitle codecs */
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
@@ -585,7 +572,6 @@ enum AVCodecID {
AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
AV_CODEC_ID_TTML,
AV_CODEC_ID_ARIB_CAPTION,
AV_CODEC_ID_IVTV_VBI,
/* other specific kind of codecs (generally used for attachments) */
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
@@ -602,8 +588,6 @@ enum AVCodecID {
AV_CODEC_ID_TIMED_ID3,
AV_CODEC_ID_BIN_DATA,
AV_CODEC_ID_SMPTE_2038,
AV_CODEC_ID_LCEVC,
AV_CODEC_ID_SMPTE_436M_ANC,
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it

View File

@@ -148,7 +148,7 @@ typedef struct AVCodecParameters {
* durations. Should be set to { 0, 1 } when some frames have differing
* durations or if the value is not known.
*
* @note This field corresponds to values that are stored in codec-level
* @note This field correponds to values that are stored in codec-level
* headers and is typically overridden by container/transport-layer
* timestamps, when available. It should thus be used only as a last resort,
* when no higher-level timing information is available.

View File

@@ -1,130 +0,0 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_CONTAINER_FIFO_H
#define AVUTIL_CONTAINER_FIFO_H
#include <stddef.h>
/**
* AVContainerFifo is a FIFO for "containers" - dynamically allocated reusable
* structs (e.g. AVFrame or AVPacket). AVContainerFifo uses an internal pool of
* such containers to avoid allocating and freeing them repeatedly.
*/
typedef struct AVContainerFifo AVContainerFifo;
enum AVContainerFifoFlags {
/**
* Signal to av_container_fifo_write() that it should make a new reference
* to data in src rather than consume its contents.
*
* @note you must handle this flag manually in your own fifo_transfer()
* callback
*/
AV_CONTAINER_FIFO_FLAG_REF = (1 << 0),
/**
* This and all higher bits in flags may be set to any value by the caller
* and are guaranteed to be passed through to the fifo_transfer() callback
* and not be interpreted by AVContainerFifo code.
*/
AV_CONTAINER_FIFO_FLAG_USER = (1 << 16),
};
/**
* Allocate a new AVContainerFifo for the container type defined by provided
* callbacks.
*
* @param opaque user data that will be passed to the callbacks provided to this
* function
* @param container_alloc allocate a new container instance and return a pointer
* to it, or NULL on failure
* @param container_reset reset the provided container instance to a clean state
* @param container_free free the provided container instance
* @param fifo_transfer Transfer the contents of container src to dst.
* @param flags currently unused
*
* @return newly allocated AVContainerFifo, or NULL on failure
*/
AVContainerFifo*
av_container_fifo_alloc(void *opaque,
void* (*container_alloc)(void *opaque),
void (*container_reset)(void *opaque, void *obj),
void (*container_free) (void *opaque, void *obj),
int (*fifo_transfer) (void *opaque, void *dst, void *src, unsigned flags),
unsigned flags);
/**
* Allocate an AVContainerFifo instance for AVFrames.
*
* @param flags currently unused
*/
AVContainerFifo *av_container_fifo_alloc_avframe(unsigned flags);
/**
* Free a AVContainerFifo and everything in it.
*/
void av_container_fifo_free(AVContainerFifo **cf);
/**
* Write the contents of obj to the FIFO.
*
* The fifo_transfer() callback previously provided to av_container_fifo_alloc()
* will be called with obj as src in order to perform the actual transfer.
*/
int av_container_fifo_write(AVContainerFifo *cf, void *obj, unsigned flags);
/**
* Read the next available object from the FIFO into obj.
*
* The fifo_read() callback previously provided to av_container_fifo_alloc()
* will be called with obj as dst in order to perform the actual transfer.
*/
int av_container_fifo_read(AVContainerFifo *cf, void *obj, unsigned flags);
/**
* Access objects stored in the FIFO without retrieving them. The
* fifo_transfer() callback will NOT be invoked and the FIFO state will not be
* modified.
*
* @param pobj Pointer to the object stored in the FIFO will be written here on
* success. The object remains owned by the FIFO and the caller may
* only access it as long as the FIFO is not modified.
* @param offset Position of the object to retrieve - 0 is the next item that
* would be read, 1 the one after, etc. Must be smaller than
* av_container_fifo_can_read().
*
* @retval 0 success, a pointer was written into pobj
* @retval AVERROR(EINVAL) invalid offset value
*/
int av_container_fifo_peek(AVContainerFifo *cf, void **pobj, size_t offset);
/**
* Discard the specified number of elements from the FIFO.
*
* @param nb_elems number of elements to discard, MUST NOT be larger than
* av_fifo_can_read(f)
*/
void av_container_fifo_drain(AVContainerFifo *cf, size_t nb_elems);
/**
* @return number of objects available for reading
*/
size_t av_container_fifo_can_read(const AVContainerFifo *cf);
#endif // AVCODEC_CONTAINER_FIFO_H

View File

@@ -73,7 +73,6 @@
#define AV_PROFILE_AAC_HE_V2 28
#define AV_PROFILE_AAC_LD 22
#define AV_PROFILE_AAC_ELD 38
#define AV_PROFILE_AAC_USAC 41
#define AV_PROFILE_MPEG2_AAC_LOW 128
#define AV_PROFILE_MPEG2_AAC_HE 131
@@ -160,7 +159,6 @@
#define AV_PROFILE_HEVC_MAIN_10 2
#define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3
#define AV_PROFILE_HEVC_REXT 4
#define AV_PROFILE_HEVC_MULTIVIEW_MAIN 6
#define AV_PROFILE_HEVC_SCC 9
#define AV_PROFILE_VVC_MAIN_10 1
@@ -185,9 +183,6 @@
#define AV_PROFILE_PRORES_4444 4
#define AV_PROFILE_PRORES_XQ 5
#define AV_PROFILE_PRORES_RAW 0
#define AV_PROFILE_PRORES_RAW_HQ 1
#define AV_PROFILE_ARIB_PROFILE_A 0
#define AV_PROFILE_ARIB_PROFILE_C 1
@@ -197,14 +192,6 @@
#define AV_PROFILE_EVC_BASELINE 0
#define AV_PROFILE_EVC_MAIN 1
#define AV_PROFILE_APV_422_10 33
#define AV_PROFILE_APV_422_12 44
#define AV_PROFILE_APV_444_10 55
#define AV_PROFILE_APV_444_12 66
#define AV_PROFILE_APV_4444_10 77
#define AV_PROFILE_APV_4444_12 88
#define AV_PROFILE_APV_400_10 99
#define AV_LEVEL_UNKNOWN -99
@@ -336,20 +323,6 @@ typedef struct AVProducerReferenceTime {
int flags;
} AVProducerReferenceTime;
/**
* RTCP SR (Sender Report) information
*
* The received sender report information for an RTSP
* stream, exposed as AV_PKT_DATA_RTCP_SR side data.
*/
typedef struct AVRTCPSenderReport {
uint32_t ssrc; ///< Synchronization source identifier
uint64_t ntp_timestamp; ///< NTP time when the report was sent
uint32_t rtp_timestamp; ///< RTP time when the report was sent
uint32_t sender_nb_packets; ///< Total number of packets sent
uint32_t sender_nb_bytes; ///< Total number of bytes sent (excluding headers or padding)
} AVRTCPSenderReport;
/**
* Encode extradata length to a buffer. Used by xiph codecs.
*

View File

@@ -59,6 +59,10 @@ enum AVPacketSideDataType {
* An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
* @code
* u32le param_flags
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT)
* s32le channel_count
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT)
* u64le channel_layout
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE)
* s32le sample_rate
* if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS)
@@ -142,7 +146,7 @@ enum AVPacketSideDataType {
AV_PKT_DATA_CPB_PROPERTIES,
/**
* Recommends skipping the specified number of samples
* Recommmends skipping the specified number of samples
* @code
* u32le number of samples to skip from start of this packet
* u32le number of samples to skip from end of this packet
@@ -326,42 +330,6 @@ enum AVPacketSideDataType {
*/
AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,
/**
* The number of pixels to discard from the top/bottom/left/right border of the
* decoded frame to obtain the sub-rectangle intended for presentation.
*
* @code
* u32le crop_top
* u32le crop_bottom
* u32le crop_left
* u32le crop_right
* @endcode
*/
AV_PKT_DATA_FRAME_CROPPING,
/**
* Raw LCEVC payload data, as a uint8_t array, with NAL emulation
* bytes intact.
*/
AV_PKT_DATA_LCEVC,
/**
* This side data contains information about the reference display width(s)
* and reference viewing distance(s) as well as information about the
* corresponding reference stereo pair(s), i.e., the pair(s) of views to be
* displayed for the viewer's left and right eyes on the reference display
* at the reference viewing distance.
* The payload is the AV3DReferenceDisplaysInfo struct defined in
* libavutil/tdrdi.h.
*/
AV_PKT_DATA_3D_REFERENCE_DISPLAYS,
/**
* Contains the last received RTCP SR (Sender Report) information
* in the form of the AVRTCPSenderReport struct.
*/
AV_PKT_DATA_RTCP_SR,
/**
* The number of side data types.
* This is not part of the public API/ABI in the sense that it may
@@ -373,6 +341,8 @@ enum AVPacketSideDataType {
AV_PKT_DATA_NB
};
#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
/**
* This structure stores auxiliary information for decoding, presenting, or
* otherwise processing the coded stream. It is typically exported by demuxers
@@ -381,11 +351,11 @@ enum AVPacketSideDataType {
*
* Global side data is handled as follows:
* - During demuxing, it may be exported through
* @ref AVCodecParameters.coded_side_data "AVStream's codec parameters", which can
* @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
* then be passed as input to decoders through the
* @ref AVCodecContext.coded_side_data "decoder context's side data", for
* initialization.
* - For muxing, it can be fed through @ref AVCodecParameters.coded_side_data
* - For muxing, it can be fed through @ref AVStream.codecpar.side_data
* "AVStream's codec parameters", typically the output of encoders through
* the @ref AVCodecContext.coded_side_data "encoder context's side data", for
* initialization.
@@ -893,13 +863,6 @@ int av_packet_make_writable(AVPacket *pkt);
*/
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
/**
* Allocate an AVContainerFifo instance for AVPacket.
*
* @param flags currently unused
*/
struct AVContainerFifo *av_container_fifo_alloc_avpacket(unsigned flags);
/**
* @}
*/

View File

@@ -1,297 +0,0 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_REFSTRUCT_H
#define AVUTIL_REFSTRUCT_H
#include <stddef.h>
/**
* RefStruct is an API for creating reference-counted objects
* with minimal overhead. The API is designed for objects,
* not buffers like the AVBuffer API. The main differences
* to the AVBuffer API are as follows:
*
* - It uses void* instead of uint8_t* as its base type due to
* its focus on objects.
* - There are no equivalents of AVBuffer and AVBufferRef.
* E.g. there is no way to get the usable size of the object:
* The user is supposed to know what is at the other end of
* the pointer. It also avoids one level of indirection.
* - Custom allocators are not supported. This allows to simplify
* the implementation and reduce the amount of allocations.
* - It also has the advantage that the user's free callback need
* only free the resources owned by the object, but not the
* object itself.
* - Because referencing (and replacing) an object managed by the
* RefStruct API does not involve allocations, they can not fail
* and therefore need not be checked.
*
* @note Referencing and unreferencing the buffers is thread-safe and thus
* may be done from multiple threads simultaneously without any need for
* additional locking.
*/
/**
* This union is used for all opaque parameters in this API to spare the user
* to cast const away in case the opaque to use is const-qualified.
*
* The functions provided by this API with an AVRefStructOpaque come in pairs
* named foo_c and foo. The foo function accepts void* as opaque and is just
* a wrapper around the foo_c function; "_c" means "(potentially) const".
*/
typedef union {
void *nc;
const void *c;
} AVRefStructOpaque;
/**
* If this flag is set in av_refstruct_alloc_ext_c(), the object will not
* be initially zeroed.
*/
#define AV_REFSTRUCT_FLAG_NO_ZEROING (1 << 0)
/**
* Allocate a refcounted object of usable size `size` managed via
* the RefStruct API.
*
* By default (in the absence of flags to the contrary),
* the returned object is initially zeroed.
*
* @param size Desired usable size of the returned object.
* @param flags A bitwise combination of AV_REFSTRUCT_FLAG_* flags.
* @param opaque A pointer that will be passed to the free_cb callback.
* @param free_cb A callback for freeing this object's content
* when its reference count reaches zero;
* it must not free the object itself.
* @return A pointer to an object of the desired size or NULL on failure.
*/
void *av_refstruct_alloc_ext_c(size_t size, unsigned flags, AVRefStructOpaque opaque,
void (*free_cb)(AVRefStructOpaque opaque, void *obj));
/**
* A wrapper around av_refstruct_alloc_ext_c() for the common case
* of a non-const qualified opaque.
*
* @see av_refstruct_alloc_ext_c()
*/
static inline
void *av_refstruct_alloc_ext(size_t size, unsigned flags, void *opaque,
void (*free_cb)(AVRefStructOpaque opaque, void *obj))
{
return av_refstruct_alloc_ext_c(size, flags, (AVRefStructOpaque){.nc = opaque},
free_cb);
}
/**
* Equivalent to av_refstruct_alloc_ext(size, 0, NULL, NULL)
*/
static inline
void *av_refstruct_allocz(size_t size)
{
return av_refstruct_alloc_ext(size, 0, NULL, NULL);
}
/**
* Decrement the reference count of the underlying object and automatically
* free the object if there are no more references to it.
*
* `*objp == NULL` is legal and a no-op.
*
* @param objp Pointer to a pointer that is either NULL or points to an object
* managed via this API. `*objp` is set to NULL on return.
*/
void av_refstruct_unref(void *objp);
/**
* Create a new reference to an object managed via this API,
* i.e. increment the reference count of the underlying object
* and return obj.
* @return a pointer equal to obj.
*/
void *av_refstruct_ref(void *obj);
/**
* Analog of av_refstruct_ref(), but for constant objects.
* @see av_refstruct_ref()
*/
const void *av_refstruct_ref_c(const void *obj);
/**
* Ensure `*dstp` refers to the same object as src.
*
* If `*dstp` is already equal to src, do nothing. Otherwise unreference `*dstp`
* and replace it with a new reference to src in case `src != NULL` (this
* involves incrementing the reference count of src's underlying object) or
* with NULL otherwise.
*
* @param dstp Pointer to a pointer that is either NULL or points to an object
* managed via this API.
* @param src A pointer to an object managed via this API or NULL.
*/
void av_refstruct_replace(void *dstp, const void *src);
/**
* Check whether the reference count of an object managed
* via this API is 1.
*
* @param obj A pointer to an object managed via this API.
* @return 1 if the reference count of obj is 1; 0 otherwise.
*/
int av_refstruct_exclusive(const void *obj);
/**
* AVRefStructPool is an API for a thread-safe pool of objects managed
* via the RefStruct API.
*
* Frequently allocating and freeing large or complicated objects may be slow
* and wasteful. This API is meant to solve this in cases when the caller
* needs a set of interchangeable objects.
*
* At the beginning, the user must call allocate the pool via
* av_refstruct_pool_alloc() or its analogue av_refstruct_pool_alloc_ext().
* Then whenever an object is needed, call av_refstruct_pool_get() to
* get a new or reused object from the pool. This new object works in all
* aspects the same way as the ones created by av_refstruct_alloc_ext().
* However, when the last reference to this object is unreferenced, it is
* (optionally) reset and returned to the pool instead of being freed and
* will be reused for subsequent av_refstruct_pool_get() calls.
*
* When the caller is done with the pool and no longer needs to create any new
* objects, av_refstruct_pool_uninit() must be called to mark the pool as
* freeable. Then entries returned to the pool will then be freed.
* Once all the entries are freed, the pool will automatically be freed.
*
* Allocating and releasing objects with this API is thread-safe as long as
* the user-supplied callbacks (if provided) are thread-safe.
*/
/**
* The buffer pool. This structure is opaque and not meant to be accessed
* directly. It is allocated with the allocators below and freed with
* av_refstruct_pool_uninit().
*/
typedef struct AVRefStructPool AVRefStructPool;
/**
* If this flag is not set, every object in the pool will be zeroed before
* the init callback is called or before it is turned over to the user
* for the first time if no init callback has been provided.
*/
#define AV_REFSTRUCT_POOL_FLAG_NO_ZEROING AV_REFSTRUCT_FLAG_NO_ZEROING
/**
* If this flag is set and both init_cb and reset_cb callbacks are provided,
* then reset_cb will be called if init_cb fails.
* The object passed to reset_cb will be in the state left by init_cb.
*/
#define AV_REFSTRUCT_POOL_FLAG_RESET_ON_INIT_ERROR (1 << 16)
/**
* If this flag is set and both init_cb and free_entry_cb callbacks are
* provided, then free_cb will be called if init_cb fails.
*
* It will be called after reset_cb in case reset_cb and the
* AV_REFSTRUCT_POOL_FLAG_RESET_ON_INIT_ERROR flag are also set.
*
* The object passed to free_cb will be in the state left by
* the callbacks applied earlier (init_cb potentially followed by reset_cb).
*/
#define AV_REFSTRUCT_POOL_FLAG_FREE_ON_INIT_ERROR (1 << 17)
/**
* If this flag is set, the entries will be zeroed before
* being returned to the user (after the init or reset callbacks
* have been called (if provided)). Furthermore, to avoid zeroing twice
* it also makes the pool behave as if the AV_REFSTRUCT_POOL_FLAG_NO_ZEROING
* flag had been provided.
*/
#define AV_REFSTRUCT_POOL_FLAG_ZERO_EVERY_TIME (1 << 18)
/**
* Equivalent to av_refstruct_pool_alloc(size, flags, NULL, NULL, NULL, NULL, NULL)
*/
AVRefStructPool *av_refstruct_pool_alloc(size_t size, unsigned flags);
/**
* Allocate an AVRefStructPool, potentially using complex callbacks.
*
* @param size size of the entries of the pool
* @param flags a bitwise combination of AV_REFSTRUCT_POOL_FLAG_* flags
* @param opaque A pointer that will be passed to the callbacks below.
* @param init A callback that will be called directly after a new entry
* has been allocated. obj has already been zeroed unless
* the AV_REFSTRUCT_POOL_FLAG_NO_ZEROING flag is in use.
* @param reset A callback that will be called after an entry has been
* returned to the pool and before it is reused.
* @param free_entry A callback that will be called when an entry is freed
* after the pool has been marked as to be uninitialized.
* @param free A callback that will be called when the pool itself is
* freed (after the last entry has been returned and freed).
*/
AVRefStructPool *av_refstruct_pool_alloc_ext_c(size_t size, unsigned flags,
AVRefStructOpaque opaque,
int (*init_cb)(AVRefStructOpaque opaque, void *obj),
void (*reset_cb)(AVRefStructOpaque opaque, void *obj),
void (*free_entry_cb)(AVRefStructOpaque opaque, void *obj),
void (*free_cb)(AVRefStructOpaque opaque));
/**
* A wrapper around av_refstruct_pool_alloc_ext_c() for the common case
* of a non-const qualified opaque.
*
* @see av_refstruct_pool_alloc_ext_c()
*/
static inline
AVRefStructPool *av_refstruct_pool_alloc_ext(size_t size, unsigned flags,
void *opaque,
int (*init_cb)(AVRefStructOpaque opaque, void *obj),
void (*reset_cb)(AVRefStructOpaque opaque, void *obj),
void (*free_entry_cb)(AVRefStructOpaque opaque, void *obj),
void (*free_cb)(AVRefStructOpaque opaque))
{
return av_refstruct_pool_alloc_ext_c(size, flags, (AVRefStructOpaque){.nc = opaque},
init_cb, reset_cb, free_entry_cb, free_cb);
}
/**
* Get an object from the pool, reusing an old one from the pool when
* available.
*
* Every call to this function must happen before av_refstruct_pool_uninit().
* Otherwise undefined behaviour may occur.
*
* @param pool the pool from which to get the object
* @return a reference to the object on success, NULL on error.
*/
void *av_refstruct_pool_get(AVRefStructPool *pool);
/**
* Mark the pool as being available for freeing. It will actually be freed
* only once all the allocated buffers associated with the pool are released.
* Thus it is safe to call this function while some of the allocated buffers
* are still in use.
*
* It is illegal to try to get a new entry after this function has been called.
*
* @param poolp pointer to a pointer to either NULL or a pool to be freed.
* `*poolp` will be set to NULL.
*/
static inline void av_refstruct_pool_uninit(AVRefStructPool **poolp)
{
av_refstruct_unref(poolp);
}
#endif /* AVUTIL_REFSTRUCT_H */

View File

@@ -1,254 +0,0 @@
/*
* MXF SMPTE-436M VBI/ANC parsing functions
* Copyright (c) 2025 Jacob Lifshay
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_SMPTE_436M_H
#define AVCODEC_SMPTE_436M_H
#include <stdint.h>
/**
* Iterator over the ANC packets in a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data
*/
typedef struct AVSmpte436mAncIterator {
uint16_t anc_packets_left;
int size_left;
const uint8_t *data_left;
} AVSmpte436mAncIterator;
/**
* Wrapping Type from Table 7 (page 13) of:
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
*/
typedef enum AVSmpte436mWrappingType
{
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FRAME = 1,
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FIELD_1 = 2,
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FIELD_2 = 3,
AV_SMPTE_436M_WRAPPING_TYPE_VANC_PROGRESSIVE_FRAME = 4,
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FRAME = 0x11,
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FIELD_1 = 0x12,
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FIELD_2 = 0x13,
AV_SMPTE_436M_WRAPPING_TYPE_HANC_PROGRESSIVE_FRAME = 0x14,
/** not a real wrapping type, just here to guarantee the enum is big enough */
AV_SMPTE_436M_WRAPPING_TYPE_MAX = 0xFF,
} AVSmpte436mWrappingType;
/**
* Payload Sample Coding from Table 4 (page 10) and Table 7 (page 13) of:
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
*/
typedef enum AVSmpte436mPayloadSampleCoding
{
/** only used for VBI */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_LUMA = 1,
/** only used for VBI */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_COLOR_DIFF = 2,
/** only used for VBI */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_LUMA_AND_COLOR_DIFF = 3,
/** used for VBI and ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA = 4,
/** used for VBI and ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_COLOR_DIFF = 5,
/** used for VBI and ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_AND_COLOR_DIFF = 6,
/** used for VBI and ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_LUMA = 7,
/** used for VBI and ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_COLOR_DIFF = 8,
/** used for VBI and ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_LUMA_AND_COLOR_DIFF = 9,
/** only used for ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_WITH_PARITY_ERROR = 10,
/** only used for ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_COLOR_DIFF_WITH_PARITY_ERROR = 11,
/** only used for ANC */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_AND_COLOR_DIFF_WITH_PARITY_ERROR = 12,
/** not a real sample coding, just here to guarantee the enum is big enough */
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_MAX = 0xFF,
} AVSmpte436mPayloadSampleCoding;
/** the payload capacity of AVSmpte291mAnc8bit (and of AVSmpte291mAnc10bit when that gets added) */
#define AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY 0xFF
/**
* An ANC packet with an 8-bit payload.
* This can be decoded from AVSmpte436mCodedAnc::payload.
*
* Note: Some ANC packets need a 10-bit payload, if stored in this struct,
* the most-significant 2 bits of each sample are discarded.
*/
typedef struct AVSmpte291mAnc8bit {
uint8_t did;
uint8_t sdid_or_dbn;
uint8_t data_count;
uint8_t payload[AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY];
uint8_t checksum;
} AVSmpte291mAnc8bit;
/** max number of samples that can be stored in the payload of AVSmpte436mCodedAnc */
#define AV_SMPTE_436M_CODED_ANC_SAMPLE_CAPACITY \
(AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY + 4) /* 4 for did, sdid_or_dbn, data_count, and checksum */
/** max number of bytes that can be stored in the payload of AVSmpte436mCodedAnc */
#define AV_SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY (((AV_SMPTE_436M_CODED_ANC_SAMPLE_CAPACITY + 2) / 3) * 4)
/**
* An encoded ANC packet within a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
* The repeated section of Table 7 (page 13) of:
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
*/
typedef struct AVSmpte436mCodedAnc {
uint16_t line_number;
AVSmpte436mWrappingType wrapping_type;
AVSmpte436mPayloadSampleCoding payload_sample_coding;
uint16_t payload_sample_count;
uint32_t payload_array_length;
/** the payload, has size payload_array_length.
* can be decoded into AVSmpte291mAnc8bit
*/
uint8_t payload[AV_SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY];
} AVSmpte436mCodedAnc;
/**
* Validate a AVSmpte436mCodedAnc structure. Doesn't check if the payload is valid.
* @param[in] anc ANC packet to validate
* @return 0 on success, AVERROR codes otherwise.
*/
int av_smpte_436m_coded_anc_validate(const AVSmpte436mCodedAnc *anc);
/**
* Encode ANC packets into a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
* @param[in] anc_packet_count number of ANC packets to encode
* @param[in] anc_packets the ANC packets to encode
* @param[in] size the size of out. ignored if out is NULL.
* @param[out] out Output bytes. Doesn't write anything if out is NULL.
* @return the number of bytes written on success, AVERROR codes otherwise.
* If out is NULL, returns the number of bytes it would have written.
*/
int av_smpte_436m_anc_encode(uint8_t *out, int size, int anc_packet_count, const AVSmpte436mCodedAnc *anc_packets);
struct AVPacket;
/**
* Append more ANC packets to a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
* @param[in] anc_packet_count number of ANC packets to encode
* @param[in] anc_packets the ANC packets to encode
* @param pkt the AVPacket to append to.
* it must either be size 0 or contain valid SMPTE_436M_ANC data.
* @return 0 on success, AVERROR codes otherwise.
*/
int av_smpte_436m_anc_append(struct AVPacket *pkt, int anc_packet_count, const AVSmpte436mCodedAnc *anc_packets);
/**
* Set up iteration over the ANC packets in a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
* @param[in] buf Pointer to the data from a AV_CODEC_ID_SMPTE_436M_ANC AVPacket.
* @param[in] buf_size Size of the data from a AV_CODEC_ID_SMPTE_436M_ANC AVPacket.
* @param[out] iter Pointer to the iterator.
* @return 0 on success, AVERROR codes otherwise.
*/
int av_smpte_436m_anc_iter_init(AVSmpte436mAncIterator *iter, const uint8_t *buf, int buf_size);
/**
* Get the next ANC packet from the iterator, advancing the iterator.
* @param[in,out] iter Pointer to the iterator.
* @param[out] anc The returned ANC packet.
* @return 0 on success, AVERROR_EOF when the iterator has reached the end, AVERROR codes otherwise.
*/
int av_smpte_436m_anc_iter_next(AVSmpte436mAncIterator *iter, AVSmpte436mCodedAnc *anc);
/**
* Get the minimum number of bytes needed to store a AVSmpte436mCodedAnc payload.
* @param sample_coding the payload sample coding
* @param sample_count the number of samples stored in the payload
* @return returns the minimum number of bytes needed, on error returns < 0.
* always <= SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY
*/
int av_smpte_436m_coded_anc_payload_size(AVSmpte436mPayloadSampleCoding sample_coding, uint16_t sample_count);
/**
* Decode a AVSmpte436mCodedAnc payload into AVSmpte291mAnc8bit
* @param[in] sample_coding the payload sample coding
* @param[in] sample_count the number of samples stored in the payload
* @param[in] payload the bytes storing the payload,
* the needed size can be obtained from
avpriv_smpte_436m_coded_anc_payload_size
* @param[in] log_ctx context pointer for av_log
* @param[out] out The decoded ANC packet.
* @return returns 0 on success, otherwise < 0.
*/
int av_smpte_291m_anc_8bit_decode(AVSmpte291mAnc8bit *out,
AVSmpte436mPayloadSampleCoding sample_coding,
uint16_t sample_count,
const uint8_t *payload,
void *log_ctx);
/**
* Fill in the correct checksum for a AVSmpte291mAnc8bit
* @param[in,out] anc The ANC packet.
*/
void av_smpte_291m_anc_8bit_fill_checksum(AVSmpte291mAnc8bit *anc);
/**
* Compute the sample count needed to encode a AVSmpte291mAnc8bit into a AVSmpte436mCodedAnc payload
* @param[in] anc The ANC packet.
* @param[in] sample_coding The sample coding.
* @param[in] log_ctx context pointer for av_log
* @return returns the sample count on success, otherwise < 0.
*/
int av_smpte_291m_anc_8bit_get_sample_count(const AVSmpte291mAnc8bit *anc,
AVSmpte436mPayloadSampleCoding sample_coding,
void *log_ctx);
/**
* Encode a AVSmpte291mAnc8bit into a AVSmpte436mCodedAnc
* @param[in] line_number the line number the ANC packet is on
* @param[in] wrapping_type the wrapping type
* @param[in] sample_coding the payload sample coding
* @param[in] payload the ANC packet to encode.
* @param[in] log_ctx context pointer for av_log
* @param[out] out The encoded ANC packet.
* @return returns 0 on success, otherwise < 0.
*/
int av_smpte_291m_anc_8bit_encode(AVSmpte436mCodedAnc *out,
uint16_t line_number,
AVSmpte436mWrappingType wrapping_type,
AVSmpte436mPayloadSampleCoding sample_coding,
const AVSmpte291mAnc8bit *payload,
void *log_ctx);
/** AVSmpte291mAnc8bit::did when carrying CTA-708 data (for AV_CODEC_ID_EIA_608) */
#define AV_SMPTE_291M_ANC_DID_CTA_708 0x61
/** AVSmpte291mAnc8bit::sdid_or_dbn when carrying CTA-708 data (for AV_CODEC_ID_EIA_608) */
#define AV_SMPTE_291M_ANC_SDID_CTA_708 0x1
/**
* Try to decode an ANC packet into EIA-608/CTA-708 data (AV_CODEC_ID_EIA_608). This
* @param[in] anc The ANC packet.
* @param[in] log_ctx Context pointer for av_log
* @param[out] cc_data the buffer to store the extracted EIA-608/CTA-708 data,
* you can pass NULL to not store the data.
* the required size is 3 * cc_count bytes.
* SMPTE_291M_ANC_PAYLOAD_CAPACITY is always enough size.
* @return returns cc_count (>= 0) on success, AVERROR(EAGAIN) if it wasn't a CTA-708 ANC packet, < 0 on error.
*/
int av_smpte_291m_anc_8bit_extract_cta_708(const AVSmpte291mAnc8bit *anc, uint8_t *cc_data, void *log_ctx);
#endif /* AVCODEC_SMPTE_436M_H */

View File

@@ -1,164 +0,0 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* @ingroup lavu_video_3d_reference_displays_info
* Spherical video
*/
#ifndef AVUTIL_TDRDI_H
#define AVUTIL_TDRDI_H
#include <stddef.h>
#include <stdint.h>
#include "libavutil/avassert.h"
/**
* @defgroup lavu_video_3d_reference_displays_info 3D Reference Displays Information
* @ingroup lavu_video
*
* The 3D Reference Displays Information describes information about the reference display
* width(s) and reference viewing distance(s) as well as information about the corresponding
* reference stereo pair(s).
* @{
*/
#define AV_TDRDI_MAX_NUM_REF_DISPLAY 32
/**
* This structure describes information about the reference display width(s) and reference
* viewing distance(s) as well as information about the corresponding reference stereo pair(s).
* See section G.14.3.2.3 of ITU-T H.265 for more information.
*
* @note The struct must be allocated with av_tdrdi_alloc() and
* its size is not a part of the public ABI.
*/
typedef struct AV3DReferenceDisplaysInfo {
/**
* The exponent of the maximum allowable truncation error for
* {exponent,mantissa}_ref_display_width as given by 2<sup>(-prec_ref_display_width)</sup>.
*/
uint8_t prec_ref_display_width;
/**
* A flag to indicate the presence of reference viewing distance.
* If false, the values of prec_ref_viewing_dist, exponent_ref_viewing_distance,
* and mantissa_ref_viewing_distance are undefined.
*/
uint8_t ref_viewing_distance_flag;
/**
* The exponent of the maximum allowable truncation error for
* {exponent,mantissa}_ref_viewing_distance as given by 2<sup>^(-prec_ref_viewing_dist)</sup>.
* The value of prec_ref_viewing_dist shall be in the range of 0 to 31, inclusive.
*/
uint8_t prec_ref_viewing_dist;
/**
* The number of reference displays that are signalled in this struct.
* Allowed range is 1 to 32, inclusive.
*/
uint8_t num_ref_displays;
/**
* Offset in bytes from the beginning of this structure at which the array
* of reference displays starts.
*/
size_t entries_offset;
/**
* Size of each entry in bytes. May not match sizeof(AV3DReferenceDisplay).
*/
size_t entry_size;
} AV3DReferenceDisplaysInfo;
/**
* Data structure for single deference display information.
* It is allocated as a part of AV3DReferenceDisplaysInfo and should be retrieved with
* av_tdrdi_get_display().
*
* sizeof(AV3DReferenceDisplay) is not a part of the ABI and new fields may be
* added to it.
*/
typedef struct AV3DReferenceDisplay {
/**
* The ViewId of the left view of a stereo pair corresponding to the n-th reference display.
*/
uint16_t left_view_id;
/**
* The ViewId of the left view of a stereo pair corresponding to the n-th reference display.
*/
uint16_t right_view_id;
/**
* The exponent part of the reference display width of the n-th reference display.
*/
uint8_t exponent_ref_display_width;
/**
* The mantissa part of the reference display width of the n-th reference display.
*/
uint8_t mantissa_ref_display_width;
/**
* The exponent part of the reference viewing distance of the n-th reference display.
*/
uint8_t exponent_ref_viewing_distance;
/**
* The mantissa part of the reference viewing distance of the n-th reference display.
*/
uint8_t mantissa_ref_viewing_distance;
/**
* An array of flags to indicates that the information about additional horizontal shift of
* the left and right views for the n-th reference display is present.
*/
uint8_t additional_shift_present_flag;
/**
* The recommended additional horizontal shift for a stereo pair corresponding to the n-th
* reference baseline and the n-th reference display.
*/
int16_t num_sample_shift;
} AV3DReferenceDisplay;
static av_always_inline AV3DReferenceDisplay*
av_tdrdi_get_display(AV3DReferenceDisplaysInfo *tdrdi, unsigned int idx)
{
av_assert0(idx < tdrdi->num_ref_displays);
return (AV3DReferenceDisplay *)((uint8_t *)tdrdi + tdrdi->entries_offset +
idx * tdrdi->entry_size);
}
/**
* Allocate a AV3DReferenceDisplaysInfo structure and initialize its fields to default
* values.
*
* @return the newly allocated struct or NULL on failure
*/
AV3DReferenceDisplaysInfo *av_tdrdi_alloc(unsigned int nb_displays, size_t *size);
/**
* @}
*/
#endif /* AVUTIL_TDRDI_H */

View File

@@ -93,6 +93,28 @@ typedef struct AVVDPAUContext {
AVVDPAU_Render2 render2;
} AVVDPAUContext;
#if FF_API_VDPAU_ALLOC_GET_SET
/**
* @brief allocation function for AVVDPAUContext
*
* Allows extending the struct without breaking API/ABI
* @deprecated use av_vdpau_bind_context() instead
*/
attribute_deprecated
AVVDPAUContext *av_alloc_vdpaucontext(void);
/**
* @deprecated render2 is public and can be accessed directly
*/
attribute_deprecated
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
/**
* @deprecated render2 is public and can be accessed directly
*/
attribute_deprecated
void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
#endif
/**
* Associate a VDPAU device with a codec context for hardware acceleration.
* This function is meant to be called from the get_format() codec callback,
@@ -133,6 +155,17 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
uint32_t *width, uint32_t *height);
#if FF_API_VDPAU_ALLOC_GET_SET
/**
* Allocate an AVVDPAUContext.
*
* @return Newly-allocated AVVDPAUContext or NULL on failure.
* @deprecated use av_vdpau_bind_context() instead
*/
attribute_deprecated
AVVDPAUContext *av_vdpau_alloc_context(void);
#endif
/** @} */
#endif /* AVCODEC_VDPAU_H */

View File

@@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBAVCODEC_VERSION_MINOR 11
#define LIBAVCODEC_VERSION_MINOR 3
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

View File

@@ -25,7 +25,7 @@
* Libavcodec version macros.
*/
#define LIBAVCODEC_VERSION_MAJOR 62
#define LIBAVCODEC_VERSION_MAJOR 61
/**
* FF_API_* defines may be placed below to indicate public API that will be
@@ -37,19 +37,15 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_V408_CODECID (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_CODEC_PROPS (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_EXR_GAMMA (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_NVDEC_OLD_PIX_FMTS (LIBAVCODEC_VERSION_MAJOR < 63)
// reminder to remove the OMX encoder on next major bump
#define FF_CODEC_OMX (LIBAVCODEC_VERSION_MAJOR < 63)
// reminder to remove Sonic Lossy/Lossless encoders on next major bump
#define FF_CODEC_SONIC_ENC (LIBAVCODEC_VERSION_MAJOR < 63)
// reminder to remove Sonic decoder on next-next major bump
#define FF_CODEC_SONIC_DEC (LIBAVCODEC_VERSION_MAJOR < 63)
#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_AVCODEC_CLOSE (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_BUFFER_MIN_SIZE (LIBAVCODEC_VERSION_MAJOR < 62)
#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
#endif /* AVCODEC_VERSION_MAJOR_H */

View File

@@ -0,0 +1,397 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVDEVICE_AVDEVICE_H
#define AVDEVICE_AVDEVICE_H
#include "version_major.h"
#ifndef HAVE_AV_CONFIG_H
/* When included as part of the ffmpeg build, only include the major version
* to avoid unnecessary rebuilds. When included externally, keep including
* the full version information. */
#include "version.h"
#endif
/**
* @file
* @ingroup lavd
* Main libavdevice API header
*/
/**
* @defgroup lavd libavdevice
* Special devices muxing/demuxing library.
*
* Libavdevice is a complementary library to @ref libavf "libavformat". It
* provides various "special" platform-specific muxers and demuxers, e.g. for
* grabbing devices, audio capture and playback etc. As a consequence, the
* (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
* I/O functions). The filename passed to avformat_open_input() often does not
* refer to an actually existing file, but has some special device-specific
* meaning - e.g. for xcbgrab it is the display name.
*
* To use libavdevice, simply call avdevice_register_all() to register all
* compiled muxers and demuxers. They all use standard libavformat API.
*
* @{
*/
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavformat/avformat.h"
/**
* Return the LIBAVDEVICE_VERSION_INT constant.
*/
unsigned avdevice_version(void);
/**
* Return the libavdevice build-time configuration.
*/
const char *avdevice_configuration(void);
/**
* Return the libavdevice license.
*/
const char *avdevice_license(void);
/**
* Initialize libavdevice and register all the input and output devices.
*/
void avdevice_register_all(void);
/**
* Audio input devices iterator.
*
* If d is NULL, returns the first registered input audio/video device,
* if d is non-NULL, returns the next registered input audio/video device after d
* or NULL if d is the last one.
*/
const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d);
/**
* Video input devices iterator.
*
* If d is NULL, returns the first registered input audio/video device,
* if d is non-NULL, returns the next registered input audio/video device after d
* or NULL if d is the last one.
*/
const AVInputFormat *av_input_video_device_next(const AVInputFormat *d);
/**
* Audio output devices iterator.
*
* If d is NULL, returns the first registered output audio/video device,
* if d is non-NULL, returns the next registered output audio/video device after d
* or NULL if d is the last one.
*/
const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d);
/**
* Video output devices iterator.
*
* If d is NULL, returns the first registered output audio/video device,
* if d is non-NULL, returns the next registered output audio/video device after d
* or NULL if d is the last one.
*/
const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d);
typedef struct AVDeviceRect {
int x; /**< x coordinate of top left corner */
int y; /**< y coordinate of top left corner */
int width; /**< width */
int height; /**< height */
} AVDeviceRect;
/**
* Message types used by avdevice_app_to_dev_control_message().
*/
enum AVAppToDevMessageType {
/**
* Dummy message.
*/
AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
/**
* Window size change message.
*
* Message is sent to the device every time the application changes the size
* of the window device renders to.
* Message should also be sent right after window is created.
*
* data: AVDeviceRect: new window size.
*/
AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
/**
* Repaint request message.
*
* Message is sent to the device when window has to be repainted.
*
* data: AVDeviceRect: area required to be repainted.
* NULL: whole area is required to be repainted.
*/
AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'),
/**
* Request pause/play.
*
* Application requests pause/unpause playback.
* Mostly usable with devices that have internal buffer.
* By default devices are not paused.
*
* data: NULL
*/
AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '),
AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'),
AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'),
/**
* Volume control message.
*
* Set volume level. It may be device-dependent if volume
* is changed per stream or system wide. Per stream volume
* change is expected when possible.
*
* data: double: new volume with range of 0.0 - 1.0.
*/
AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),
/**
* Mute control messages.
*
* Change mute state. It may be device-dependent if mute status
* is changed per stream or system wide. Per stream mute status
* change is expected when possible.
*
* data: NULL.
*/
AV_APP_TO_DEV_MUTE = MKBETAG(' ', 'M', 'U', 'T'),
AV_APP_TO_DEV_UNMUTE = MKBETAG('U', 'M', 'U', 'T'),
AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'),
/**
* Get volume/mute messages.
*
* Force the device to send AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED or
* AV_DEV_TO_APP_MUTE_STATE_CHANGED command respectively.
*
* data: NULL.
*/
AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),
AV_APP_TO_DEV_GET_MUTE = MKBETAG('G', 'M', 'U', 'T'),
};
/**
* Message types used by avdevice_dev_to_app_control_message().
*/
enum AVDevToAppMessageType {
/**
* Dummy message.
*/
AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
/**
* Create window buffer message.
*
* Device requests to create a window buffer. Exact meaning is device-
* and application-dependent. Message is sent before rendering first
* frame and all one-shot initializations should be done here.
* Application is allowed to ignore preferred window buffer size.
*
* @note: Application is obligated to inform about window buffer size
* with AV_APP_TO_DEV_WINDOW_SIZE message.
*
* data: AVDeviceRect: preferred size of the window buffer.
* NULL: no preferred size of the window buffer.
*/
AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'),
/**
* Prepare window buffer message.
*
* Device requests to prepare a window buffer for rendering.
* Exact meaning is device- and application-dependent.
* Message is sent before rendering of each frame.
*
* data: NULL.
*/
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'),
/**
* Display window buffer message.
*
* Device requests to display a window buffer.
* Message is sent when new frame is ready to be displayed.
* Usually buffers need to be swapped in handler of this message.
*
* data: NULL.
*/
AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'),
/**
* Destroy window buffer message.
*
* Device requests to destroy a window buffer.
* Message is sent when device is about to be destroyed and window
* buffer is not required anymore.
*
* data: NULL.
*/
AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S'),
/**
* Buffer fullness status messages.
*
* Device signals buffer overflow/underflow.
*
* data: NULL.
*/
AV_DEV_TO_APP_BUFFER_OVERFLOW = MKBETAG('B','O','F','L'),
AV_DEV_TO_APP_BUFFER_UNDERFLOW = MKBETAG('B','U','F','L'),
/**
* Buffer readable/writable.
*
* Device informs that buffer is readable/writable.
* When possible, device informs how many bytes can be read/write.
*
* @warning Device may not inform when number of bytes than can be read/write changes.
*
* data: int64_t: amount of bytes available to read/write.
* NULL: amount of bytes available to read/write is not known.
*/
AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '),
AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' '),
/**
* Mute state change message.
*
* Device informs that mute state has changed.
*
* data: int: 0 for not muted state, non-zero for muted state.
*/
AV_DEV_TO_APP_MUTE_STATE_CHANGED = MKBETAG('C','M','U','T'),
/**
* Volume level change message.
*
* Device informs that volume level has changed.
*
* data: double: new volume with range of 0.0 - 1.0.
*/
AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = MKBETAG('C','V','O','L'),
};
/**
* Send control message from application to device.
*
* @param s device context.
* @param type message type.
* @param data message data. Exact type depends on message type.
* @param data_size size of message data.
* @return >= 0 on success, negative on error.
* AVERROR(ENOSYS) when device doesn't implement handler of the message.
*/
int avdevice_app_to_dev_control_message(struct AVFormatContext *s,
enum AVAppToDevMessageType type,
void *data, size_t data_size);
/**
* Send control message from device to application.
*
* @param s device context.
* @param type message type.
* @param data message data. Can be NULL.
* @param data_size size of message data.
* @return >= 0 on success, negative on error.
* AVERROR(ENOSYS) when application doesn't implement handler of the message.
*/
int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
enum AVDevToAppMessageType type,
void *data, size_t data_size);
/**
* Structure describes basic parameters of the device.
*/
typedef struct AVDeviceInfo {
char *device_name; /**< device name, format depends on device */
char *device_description; /**< human friendly name */
enum AVMediaType *media_types; /**< array indicating what media types(s), if any, a device can provide. If null, cannot provide any */
int nb_media_types; /**< length of media_types array, 0 if device cannot provide any media types */
} AVDeviceInfo;
/**
* List of devices.
*/
typedef struct AVDeviceInfoList {
AVDeviceInfo **devices; /**< list of autodetected devices */
int nb_devices; /**< number of autodetected devices */
int default_device; /**< index of default device or -1 if no default */
} AVDeviceInfoList;
/**
* List devices.
*
* Returns available device names and their parameters.
*
* @note: Some devices may accept system-dependent device names that cannot be
* autodetected. The list returned by this function cannot be assumed to
* be always completed.
*
* @param s device context.
* @param[out] device_list list of autodetected devices.
* @return count of autodetected devices, negative on error.
*/
int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);
/**
* Convenient function to free result of avdevice_list_devices().
*
* @param device_list device list to be freed.
*/
void avdevice_free_list_devices(AVDeviceInfoList **device_list);
/**
* List devices.
*
* Returns available device names and their parameters.
* These are convinient wrappers for avdevice_list_devices().
* Device context is allocated and deallocated internally.
*
* @param device device format. May be NULL if device name is set.
* @param device_name device name. May be NULL if device format is set.
* @param device_options An AVDictionary filled with device-private options. May be NULL.
* The same options must be passed later to avformat_write_header() for output
* devices or avformat_open_input() for input devices, or at any other place
* that affects device-private options.
* @param[out] device_list list of autodetected devices
* @return count of autodetected devices, negative on error.
* @note device argument takes precedence over device_name when both are set.
*/
int avdevice_list_input_sources(const AVInputFormat *device, const char *device_name,
AVDictionary *device_options, AVDeviceInfoList **device_list);
int avdevice_list_output_sinks(const AVOutputFormat *device, const char *device_name,
AVDictionary *device_options, AVDeviceInfoList **device_list);
/**
* @}
*/
#endif /* AVDEVICE_AVDEVICE_H */

View File

@@ -0,0 +1,45 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVDEVICE_VERSION_H
#define AVDEVICE_VERSION_H
/**
* @file
* @ingroup lavd
* Libavdevice version macros
*/
#include "libavutil/version.h"
#include "version_major.h"
#define LIBAVDEVICE_VERSION_MINOR 1
#define LIBAVDEVICE_VERSION_MICRO 100
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \
LIBAVDEVICE_VERSION_MICRO)
#define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \
LIBAVDEVICE_VERSION_MICRO)
#define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT
#define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION)
#endif /* AVDEVICE_VERSION_H */

View File

@@ -0,0 +1,43 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVDEVICE_VERSION_MAJOR_H
#define AVDEVICE_VERSION_MAJOR_H
/**
* @file
* @ingroup lavd
* Libavdevice version macros
*/
#define LIBAVDEVICE_VERSION_MAJOR 61
/**
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
*/
// reminder to remove the bktr device on next major bump
#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
// reminder to remove the opengl device on next major bump
#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
// reminder to remove the sdl2 device on next major bump
#define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
#endif /* AVDEVICE_VERSION_MAJOR_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,173 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVFILTER_BUFFERSINK_H
#define AVFILTER_BUFFERSINK_H
/**
* @file
* @ingroup lavfi_buffersink
* memory buffer sink API for audio and video
*/
#include "avfilter.h"
/**
* @defgroup lavfi_buffersink Buffer sink API
* @ingroup lavfi
* @{
*
* The buffersink and abuffersink filters are there to connect filter graphs
* to applications. They have a single input, connected to the graph, and no
* output. Frames must be extracted using av_buffersink_get_frame() or
* av_buffersink_get_samples().
*
* The format negotiated by the graph during configuration can be obtained
* using the accessor functions:
* - av_buffersink_get_time_base(),
* - av_buffersink_get_format(),
* - av_buffersink_get_frame_rate(),
* - av_buffersink_get_w(),
* - av_buffersink_get_h(),
* - av_buffersink_get_sample_aspect_ratio(),
* - av_buffersink_get_channels(),
* - av_buffersink_get_ch_layout(),
* - av_buffersink_get_sample_rate().
*
* The layout returned by av_buffersink_get_ch_layout() must de uninitialized
* by the caller.
*
* The format can be constrained by setting options, using av_opt_set() and
* related functions with the AV_OPT_SEARCH_CHILDREN flag.
* - pix_fmts (int list),
* - color_spaces (int list),
* - color_ranges (int list),
* - sample_fmts (int list),
* - sample_rates (int list),
* - ch_layouts (string),
* - channel_counts (int list),
* - all_channel_counts (bool).
* Most of these options are of type binary, and should be set using
* av_opt_set_int_list() or av_opt_set_bin(). If they are not set, all
* corresponding formats are accepted.
*
* As a special case, if ch_layouts is not set, all valid channel layouts are
* accepted except for UNSPEC layouts, unless all_channel_counts is set.
*/
/**
* Get a frame with filtered data from sink and put it in frame.
*
* @param ctx pointer to a buffersink or abuffersink filter context.
* @param frame pointer to an allocated frame that will be filled with data.
* The data must be freed using av_frame_unref() / av_frame_free()
* @param flags a combination of AV_BUFFERSINK_FLAG_* flags
*
* @return >= 0 in for success, a negative AVERROR code for failure.
*/
int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags);
/**
* Tell av_buffersink_get_buffer_ref() to read video/samples buffer
* reference, but not remove it from the buffer. This is useful if you
* need only to read a video/samples buffer, without to fetch it.
*/
#define AV_BUFFERSINK_FLAG_PEEK 1
/**
* Tell av_buffersink_get_buffer_ref() not to request a frame from its input.
* If a frame is already buffered, it is read (and removed from the buffer),
* but if no frame is present, return AVERROR(EAGAIN).
*/
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
/**
* Set the frame size for an audio buffer sink.
*
* All calls to av_buffersink_get_buffer_ref will return a buffer with
* exactly the specified number of samples, or AVERROR(EAGAIN) if there is
* not enough. The last buffer at EOF will be padded with 0.
*/
void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size);
/**
* @defgroup lavfi_buffersink_accessors Buffer sink accessors
* Get the properties of the stream
* @{
*/
enum AVMediaType av_buffersink_get_type (const AVFilterContext *ctx);
AVRational av_buffersink_get_time_base (const AVFilterContext *ctx);
int av_buffersink_get_format (const AVFilterContext *ctx);
AVRational av_buffersink_get_frame_rate (const AVFilterContext *ctx);
int av_buffersink_get_w (const AVFilterContext *ctx);
int av_buffersink_get_h (const AVFilterContext *ctx);
AVRational av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx);
enum AVColorSpace av_buffersink_get_colorspace (const AVFilterContext *ctx);
enum AVColorRange av_buffersink_get_color_range (const AVFilterContext *ctx);
int av_buffersink_get_channels (const AVFilterContext *ctx);
int av_buffersink_get_ch_layout (const AVFilterContext *ctx,
AVChannelLayout *ch_layout);
int av_buffersink_get_sample_rate (const AVFilterContext *ctx);
AVBufferRef * av_buffersink_get_hw_frames_ctx (const AVFilterContext *ctx);
/** @} */
/**
* Get a frame with filtered data from sink and put it in frame.
*
* @param ctx pointer to a context of a buffersink or abuffersink AVFilter.
* @param frame pointer to an allocated frame that will be filled with data.
* The data must be freed using av_frame_unref() / av_frame_free()
*
* @return
* - >= 0 if a frame was successfully returned.
* - AVERROR(EAGAIN) if no frames are available at this point; more
* input frames must be added to the filtergraph to get more output.
* - AVERROR_EOF if there will be no more output frames on this sink.
* - A different negative AVERROR code in other failure cases.
*/
int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame);
/**
* Same as av_buffersink_get_frame(), but with the ability to specify the number
* of samples read. This function is less efficient than
* av_buffersink_get_frame(), because it copies the data around.
*
* @param ctx pointer to a context of the abuffersink AVFilter.
* @param frame pointer to an allocated frame that will be filled with data.
* The data must be freed using av_frame_unref() / av_frame_free()
* frame will contain exactly nb_samples audio samples, except at
* the end of stream, when it can contain less than nb_samples.
*
* @return The return codes have the same meaning as for
* av_buffersink_get_frame().
*
* @warning do not mix this function with av_buffersink_get_frame(). Use only one or
* the other with a single sink, not both.
*/
int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples);
/**
* @}
*/
#endif /* AVFILTER_BUFFERSINK_H */

View File

@@ -0,0 +1,215 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVFILTER_BUFFERSRC_H
#define AVFILTER_BUFFERSRC_H
/**
* @file
* @ingroup lavfi_buffersrc
* Memory buffer source API.
*/
#include "avfilter.h"
/**
* @defgroup lavfi_buffersrc Buffer source API
* @ingroup lavfi
* @{
*/
enum {
/**
* Do not check for format changes.
*/
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1,
/**
* Immediately push the frame to the output.
*/
AV_BUFFERSRC_FLAG_PUSH = 4,
/**
* Keep a reference to the frame.
* If the frame if reference-counted, create a new reference; otherwise
* copy the frame data.
*/
AV_BUFFERSRC_FLAG_KEEP_REF = 8,
};
/**
* Get the number of failed requests.
*
* A failed request is when the request_frame method is called while no
* frame is present in the buffer.
* The number is reset when a frame is added.
*/
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src);
/**
* This structure contains the parameters describing the frames that will be
* passed to this filter.
*
* It should be allocated with av_buffersrc_parameters_alloc() and freed with
* av_free(). All the allocated fields in it remain owned by the caller.
*/
typedef struct AVBufferSrcParameters {
/**
* video: the pixel format, value corresponds to enum AVPixelFormat
* audio: the sample format, value corresponds to enum AVSampleFormat
*/
int format;
/**
* The timebase to be used for the timestamps on the input frames.
*/
AVRational time_base;
/**
* Video only, the display dimensions of the input frames.
*/
int width, height;
/**
* Video only, the sample (pixel) aspect ratio.
*/
AVRational sample_aspect_ratio;
/**
* Video only, the frame rate of the input video. This field must only be
* set to a non-zero value if input stream has a known constant framerate
* and should be left at its initial value if the framerate is variable or
* unknown.
*/
AVRational frame_rate;
/**
* Video with a hwaccel pixel format only. This should be a reference to an
* AVHWFramesContext instance describing the input frames.
*/
AVBufferRef *hw_frames_ctx;
/**
* Audio only, the audio sampling rate in samples per second.
*/
int sample_rate;
/**
* Audio only, the audio channel layout
*/
AVChannelLayout ch_layout;
/**
* Video only, the YUV colorspace and range.
*/
enum AVColorSpace color_space;
enum AVColorRange color_range;
} AVBufferSrcParameters;
/**
* Allocate a new AVBufferSrcParameters instance. It should be freed by the
* caller with av_free().
*/
AVBufferSrcParameters *av_buffersrc_parameters_alloc(void);
/**
* Initialize the buffersrc or abuffersrc filter with the provided parameters.
* This function may be called multiple times, the later calls override the
* previous ones. Some of the parameters may also be set through AVOptions, then
* whatever method is used last takes precedence.
*
* @param ctx an instance of the buffersrc or abuffersrc filter
* @param param the stream parameters. The frames later passed to this filter
* must conform to those parameters. All the allocated fields in
* param remain owned by the caller, libavfilter will make internal
* copies or references when necessary.
* @return 0 on success, a negative AVERROR code on failure.
*/
int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *param);
/**
* Add a frame to the buffer source.
*
* @param ctx an instance of the buffersrc filter
* @param frame frame to be added. If the frame is reference counted, this
* function will make a new reference to it. Otherwise the frame data will be
* copied.
*
* @return 0 on success, a negative AVERROR on error
*
* This function is equivalent to av_buffersrc_add_frame_flags() with the
* AV_BUFFERSRC_FLAG_KEEP_REF flag.
*/
av_warn_unused_result
int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame);
/**
* Add a frame to the buffer source.
*
* @param ctx an instance of the buffersrc filter
* @param frame frame to be added. If the frame is reference counted, this
* function will take ownership of the reference(s) and reset the frame.
* Otherwise the frame data will be copied. If this function returns an error,
* the input frame is not touched.
*
* @return 0 on success, a negative AVERROR on error.
*
* @note the difference between this function and av_buffersrc_write_frame() is
* that av_buffersrc_write_frame() creates a new reference to the input frame,
* while this function takes ownership of the reference passed to it.
*
* This function is equivalent to av_buffersrc_add_frame_flags() without the
* AV_BUFFERSRC_FLAG_KEEP_REF flag.
*/
av_warn_unused_result
int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame);
/**
* Add a frame to the buffer source.
*
* By default, if the frame is reference-counted, this function will take
* ownership of the reference(s) and reset the frame. This can be controlled
* using the flags.
*
* If this function returns an error, the input frame is not touched.
*
* @param buffer_src pointer to a buffer source context
* @param frame a frame, or NULL to mark EOF
* @param flags a combination of AV_BUFFERSRC_FLAG_*
* @return >= 0 in case of success, a negative AVERROR code
* in case of failure
*/
av_warn_unused_result
int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src,
AVFrame *frame, int flags);
/**
* Close the buffer source after EOF.
*
* This is similar to passing NULL to av_buffersrc_add_frame_flags()
* except it takes the timestamp of the EOF, i.e. the timestamp of the end
* of the last frame.
*/
int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags);
/**
* @}
*/
#endif /* AVFILTER_BUFFERSRC_H */

View File

@@ -0,0 +1,48 @@
/*
* Version macros.
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVFILTER_VERSION_H
#define AVFILTER_VERSION_H
/**
* @file
* @ingroup lavfi
* Libavfilter version macros
*/
#include "libavutil/version.h"
#include "version_major.h"
#define LIBAVFILTER_VERSION_MINOR 1
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MICRO)
#define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MICRO)
#define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
#define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)
#endif /* AVFILTER_VERSION_H */

View File

@@ -1,4 +1,6 @@
/*
* Version macros.
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
@@ -16,31 +18,23 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_HWCONTEXT_AMF_H
#define AVUTIL_HWCONTEXT_AMF_H
#include "pixfmt.h"
#include "hwcontext.h"
#include <AMF/core/Factory.h>
#include <AMF/core/Context.h>
#include <AMF/core/Trace.h>
#include <AMF/core/Debug.h>
#ifndef AVFILTER_VERSION_MAJOR_H
#define AVFILTER_VERSION_MAJOR_H
/**
* This struct is allocated as AVHWDeviceContext.hwctx
* @file
* @ingroup lavfi
* Libavfilter version macros
*/
typedef struct AVAMFDeviceContext {
void * library;
AMFFactory *factory;
void *trace_writer;
int64_t version; ///< version of AMF runtime
AMFContext *context;
AMF_MEMORY_TYPE memory_type;
} AVAMFDeviceContext;
#define LIBAVFILTER_VERSION_MAJOR 10
enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt);
enum AVPixelFormat av_amf_to_av_format(enum AMF_SURFACE_FORMAT fmt);
/**
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
*/
#endif /* AVUTIL_HWCONTEXT_AMF_H */
#define FF_API_LINK_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 11)
#endif /* AVFILTER_VERSION_MAJOR_H */

View File

@@ -146,8 +146,8 @@
* consumed). The calling program can handle such unrecognized options as it
* wishes, e.g.
* @code
* const AVDictionaryEntry *e;
* if ((e = av_dict_iterate(options, NULL))) {
* AVDictionaryEntry *e;
* if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
* fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key);
* abort();
* }
@@ -459,7 +459,7 @@ typedef struct AVProbeData {
#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1)
#define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension
#define AVPROBE_SCORE_MIME_BONUS 30 ///< score added for matching mime type
#define AVPROBE_SCORE_MIME 75 ///< score for file mime type
#define AVPROBE_SCORE_MAX 100 ///< maximum score
#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
@@ -470,7 +470,8 @@ typedef struct AVProbeData {
/**
* The muxer/demuxer is experimental and should be used with caution.
*
* It will not be selected automatically, and must be specified explicitly.
* - demuxers: will not be selected automatically by probing, must be specified
* explicitly.
*/
#define AVFMT_EXPERIMENTAL 0x0004
#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */
@@ -484,6 +485,9 @@ typedef struct AVProbeData {
#define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */
#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */
#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */
#if FF_API_ALLOW_FLUSH
#define AVFMT_ALLOW_FLUSH 0x10000 /**< @deprecated: Just send a NULL packet if you want to flush a muxer. */
#endif
#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly
increasing timestamps, but they must
still be monotonic */
@@ -709,11 +713,6 @@ typedef struct AVIndexEntry {
* The video stream contains still images.
*/
#define AV_DISPOSITION_STILL_IMAGE (1 << 20)
/**
* The video stream contains multiple layers, e.g. stereoscopic views (cf. H.264
* Annex G/H, or HEVC Annex F).
*/
#define AV_DISPOSITION_MULTILAYER (1 << 21)
/**
* @return The AV_DISPOSITION_* flag corresponding to disp or a negative error
@@ -843,6 +842,38 @@ typedef struct AVStream {
*/
AVPacket attached_pic;
#if FF_API_AVSTREAM_SIDE_DATA
/**
* An array of side data that applies to the whole stream (i.e. the
* container does not allow it to change between packets).
*
* There may be no overlap between the side data in this array and side data
* in the packets. I.e. a given side data is either exported by the muxer
* (demuxing) / set by the caller (muxing) in this array, then it never
* appears in the packets, or the side data is exported / sent through
* the packets (always in the first packet where the value becomes known or
* changes), then it does not appear in this array.
*
* - demuxing: Set by libavformat when the stream is created.
* - muxing: May be set by the caller before avformat_write_header().
*
* Freed by libavformat in avformat_free_context().
*
* @deprecated use AVStream's @ref AVCodecParameters.coded_side_data
* "codecpar side data".
*/
attribute_deprecated
AVPacketSideData *side_data;
/**
* The number of elements in the AVStream.side_data array.
*
* @deprecated use AVStream's @ref AVCodecParameters.nb_coded_side_data
* "codecpar side data".
*/
attribute_deprecated
int nb_side_data;
#endif
/**
* Flags indicating events happening on the stream, a combination of
* AVSTREAM_EVENT_FLAG_*.
@@ -926,7 +957,7 @@ typedef struct AVStream {
* the sixth @ref AVStreamGroup.streams "stream" in the group is "512,512",
* etc.
*
* The following is an example of a canvas with overlapping tiles:
* The following is an example of a canvas with overlaping tiles:
*
* +-----------+
* | %%%%% |
@@ -1046,52 +1077,13 @@ typedef struct AVStreamGroupTileGrid {
* final image before presentation.
*/
int height;
/**
* Additional data associated with the grid.
*
* Should be allocated with av_packet_side_data_new() or
* av_packet_side_data_add(), and will be freed by avformat_free_context().
*/
AVPacketSideData *coded_side_data;
/**
* Amount of entries in @ref coded_side_data.
*/
int nb_coded_side_data;
} AVStreamGroupTileGrid;
/**
* AVStreamGroupLCEVC is meant to define the relation between video streams
* and a data stream containing LCEVC enhancement layer NALUs.
*
* No more than one stream of @ref AVCodecParameters.codec_type "codec_type"
* AVMEDIA_TYPE_DATA shall be present, and it must be of
* @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC.
*/
typedef struct AVStreamGroupLCEVC {
const AVClass *av_class;
/**
* Index of the LCEVC data stream in AVStreamGroup.
*/
unsigned int lcevc_index;
/**
* Width of the final stream for presentation.
*/
int width;
/**
* Height of the final image for presentation.
*/
int height;
} AVStreamGroupLCEVC;
enum AVStreamGroupParamsType {
AV_STREAM_GROUP_PARAMS_NONE,
AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT,
AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION,
AV_STREAM_GROUP_PARAMS_TILE_GRID,
AV_STREAM_GROUP_PARAMS_LCEVC,
};
struct AVIAMFAudioElement;
@@ -1133,7 +1125,6 @@ typedef struct AVStreamGroup {
struct AVIAMFAudioElement *iamf_audio_element;
struct AVIAMFMixPresentation *iamf_mix_presentation;
struct AVStreamGroupTileGrid *tile_grid;
struct AVStreamGroupLCEVC *lcevc;
} params;
/**
@@ -1420,7 +1411,7 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the filling code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
#define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible
#define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted
@@ -1434,6 +1425,9 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_BITEXACT 0x0400
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
#if FF_API_LAVF_SHORTEST
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
#endif
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
/**
@@ -1445,7 +1439,7 @@ typedef struct AVFormatContext {
*
* @note this is \e not used for determining the \ref AVInputFormat
* "input format"
* @see format_probesize
* @sa format_probesize
*/
int64_t probesize;
@@ -1670,11 +1664,9 @@ typedef struct AVFormatContext {
int use_wallclock_as_timestamps;
/**
* Skip duration calculation in estimate_timings_from_pts.
* Skip duration calcuation in estimate_timings_from_pts.
* - encoding: unused
* - decoding: set by user
*
* @see duration_probesize
*/
int skip_estimate_duration_from_pts;
@@ -1737,7 +1729,7 @@ typedef struct AVFormatContext {
*
* Demuxing only, set by the caller before avformat_open_input().
*
* @see probesize
* @sa probesize
*/
int format_probesize;
@@ -1773,7 +1765,7 @@ typedef struct AVFormatContext {
/**
* IO repositioned flag.
* This is set by avformat when the underlying IO context read pointer
* This is set by avformat when the underlaying IO context read pointer
* is repositioned, for example when doing byte based seeking.
* Demuxers can use the flag to detect such changes.
*/
@@ -1869,23 +1861,40 @@ typedef struct AVFormatContext {
/**
* A callback for closing the streams opened with AVFormatContext.io_open().
*
* Using this is preferred over io_close, because this can return an error.
* Therefore this callback is used instead of io_close by the generic
* libavformat code if io_close is NULL or the default.
*
* @param s the format context
* @param pb IO context to be closed and freed
* @return 0 on success, a negative AVERROR code on failure
*/
int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb);
/**
* Maximum number of bytes read from input in order to determine stream durations
* when using estimate_timings_from_pts in avformat_find_stream_info().
* Demuxing only, set by the caller before avformat_find_stream_info().
* Can be set to 0 to let avformat choose using a heuristic.
*
* @see skip_estimate_duration_from_pts
*/
int64_t duration_probesize;
} AVFormatContext;
/**
* This function will cause global side data to be injected in the next packet
* of each stream as well as after any subsequent seek.
*
* @note global side data is always available in every AVStream's
* @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
* in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
* initialized with said stream's codecpar.
* @see av_packet_side_data_get()
*/
void av_format_inject_global_side_data(AVFormatContext *s);
#if FF_API_GET_DUR_ESTIMATE_METHOD
/**
* Returns the method used to set ctx->duration.
*
* @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
* @deprecated duration_estimation_method is public and can be read directly.
*/
attribute_deprecated
enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
#endif
/**
* @defgroup lavf_core Core functions
* @ingroup libavf
@@ -2063,6 +2072,57 @@ AVStream *avformat_new_stream(AVFormatContext *s, const struct AVCodec *c);
*/
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st);
#if FF_API_AVSTREAM_SIDE_DATA
/**
* Wrap an existing array as stream side data.
*
* @param st stream
* @param type side information type
* @param data the side data array. It must be allocated with the av_malloc()
* family of functions. The ownership of the data is transferred to
* st.
* @param size side information size
*
* @return zero on success, a negative AVERROR code on failure. On failure,
* the stream is unchanged and the data remains owned by the caller.
* @deprecated use av_packet_side_data_add() with the stream's
* @ref AVCodecParameters.coded_side_data "codecpar side data"
*/
attribute_deprecated
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
uint8_t *data, size_t size);
/**
* Allocate new information from stream.
*
* @param stream stream
* @param type desired side information type
* @param size side information size
*
* @return pointer to fresh allocated data or NULL otherwise
* @deprecated use av_packet_side_data_new() with the stream's
* @ref AVCodecParameters.coded_side_data "codecpar side data"
*/
attribute_deprecated
uint8_t *av_stream_new_side_data(AVStream *stream,
enum AVPacketSideDataType type, size_t size);
/**
* Get side information from stream.
*
* @param stream stream
* @param type desired side information type
* @param size If supplied, *size will be set to the size of the side data
* or to zero if the desired side data is not present.
*
* @return pointer to data if present or NULL otherwise
* @deprecated use av_packet_side_data_get() with the stream's
* @ref AVCodecParameters.coded_side_data "codecpar side data"
*/
attribute_deprecated
uint8_t *av_stream_get_side_data(const AVStream *stream,
enum AVPacketSideDataType type, size_t *size);
#endif
AVProgram *av_new_program(AVFormatContext *s, int id);
/**
@@ -2171,7 +2231,7 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
* which case an AVFormatContext is allocated by this
* function and written into ps.
* Note that a user-supplied AVFormatContext will be freed
* on failure and its pointer set to NULL.
* on failure.
* @param url URL of the stream to open.
* @param fmt If non-NULL, this parameter forces a specific input format.
* Otherwise the format is autodetected.
@@ -2180,8 +2240,7 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
*
* @return 0 on success; on failure: frees ps, sets its pointer to NULL,
* and returns a negative AVERROR.
* @return 0 on success, a negative AVERROR on failure.
*
* @note If you want to use custom IO, preallocate the format context and set its pb field.
*/
@@ -2971,7 +3030,6 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st,
int avformat_queue_attached_pictures(AVFormatContext *s);
#if FF_API_INTERNAL_TIMING
enum AVTimebaseSource {
AVFMT_TBCF_AUTO = -1,
AVFMT_TBCF_DECODER,
@@ -2982,20 +3040,25 @@ enum AVTimebaseSource {
};
/**
* @deprecated do not call this function
* Transfer internal timing information from one stream to another.
*
* This function is useful when doing stream copy.
*
* @param ofmt target output format for ost
* @param ost output stream which needs timings copy and adjustments
* @param ist reference input stream to copy timings from
* @param copy_tb define from where the stream codec timebase needs to be imported
*/
attribute_deprecated
int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
AVStream *ost, const AVStream *ist,
enum AVTimebaseSource copy_tb);
/**
* @deprecated do not call this function
* Get the internal codec timebase from a stream.
*
* @param st input stream to extract the timebase from
*/
attribute_deprecated
AVRational av_stream_get_codec_timebase(const AVStream *st);
#endif
/**
* @}

Some files were not shown because too many files have changed in this diff Show More