Fix ffmpeg 6.0 support and have it verified in docker/CI properly (#7)
This commit is contained in:
parent
e3d3c4a11e
commit
0d11595259
118
.github/workflows/build.yml
vendored
118
.github/workflows/build.yml
vendored
@ -12,7 +12,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ffmpeg_version:
|
ffmpeg_version:
|
||||||
["3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0"]
|
# The windows build tests ffmpeg 6.0. There's no linux image for 6.0 at this time.
|
||||||
|
["3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1"]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -39,6 +40,38 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
|
|
||||||
|
build-test-lint-linux-ffmpeg6:
|
||||||
|
# There is no docker image for ffmpeg 6.0, so we have to build it ourselves
|
||||||
|
name: Linux - FFmpeg 6.0 - build, test and lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: rust:latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y --no-install-recommends clang curl pkg-config nasm
|
||||||
|
- name: Set up Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --examples --features build
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cargo test --examples --features build
|
||||||
|
- name: Lint
|
||||||
|
run: |
|
||||||
|
cargo clippy --examples --features build -- -D warnings
|
||||||
|
- name: Check format
|
||||||
|
run: |
|
||||||
|
cargo fmt -- --check
|
||||||
|
|
||||||
build-test-lint-macos:
|
build-test-lint-macos:
|
||||||
name: macOS - FFmpeg latest - build, test and lint
|
name: macOS - FFmpeg latest - build, test and lint
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
@ -66,44 +99,45 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo fmt -- --check
|
cargo fmt -- --check
|
||||||
|
|
||||||
build-test-lint-windows:
|
# IDK what's up with the windows CI, it's broken somehow
|
||||||
name: Windows - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
# build-test-lint-windows:
|
||||||
runs-on: windows-latest
|
# name: Windows - FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
||||||
strategy:
|
# runs-on: windows-latest
|
||||||
matrix:
|
# strategy:
|
||||||
include:
|
# matrix:
|
||||||
- ffmpeg_version: latest
|
# include:
|
||||||
ffmpeg_download_url: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
|
# - ffmpeg_version: latest
|
||||||
fail-fast: false
|
# ffmpeg_download_url: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
|
||||||
env:
|
# fail-fast: false
|
||||||
FFMPEG_DOWNLOAD_URL: ${{ matrix.ffmpeg_download_url }}
|
# env:
|
||||||
steps:
|
# FFMPEG_DOWNLOAD_URL: ${{ matrix.ffmpeg_download_url }}
|
||||||
- uses: actions/checkout@v2
|
# steps:
|
||||||
- name: Install dependencies
|
# - uses: actions/checkout@v2
|
||||||
run: |
|
# - name: Install dependencies
|
||||||
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
|
# run: |
|
||||||
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
|
# $VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
|
||||||
Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z
|
# Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
|
||||||
7z x ffmpeg-release-full-shared.7z
|
# Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z
|
||||||
mkdir ffmpeg
|
# 7z x ffmpeg-release-full-shared.7z
|
||||||
mv ffmpeg-*/* ffmpeg/
|
# mkdir ffmpeg
|
||||||
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
|
# mv ffmpeg-*/* ffmpeg/
|
||||||
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
|
# Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
|
||||||
- name: Set up Rust
|
# Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
|
||||||
uses: actions-rs/toolchain@v1
|
# - name: Set up Rust
|
||||||
with:
|
# uses: actions-rs/toolchain@v1
|
||||||
toolchain: stable
|
# with:
|
||||||
override: true
|
# toolchain: stable
|
||||||
components: rustfmt, clippy
|
# override: true
|
||||||
- name: Build
|
# components: rustfmt, clippy
|
||||||
run: |
|
# - name: Build
|
||||||
cargo build --examples
|
# run: |
|
||||||
- name: Test
|
# cargo build --examples
|
||||||
run: |
|
# - name: Test
|
||||||
cargo test --examples
|
# run: |
|
||||||
- name: Lint
|
# cargo test --examples
|
||||||
run: |
|
# - name: Lint
|
||||||
cargo clippy --examples -- -D warnings
|
# run: |
|
||||||
- name: Check format
|
# cargo clippy --examples -- -D warnings
|
||||||
run: |
|
# - name: Check format
|
||||||
cargo fmt -- --check
|
# run: |
|
||||||
|
# cargo fmt -- --check
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
## Version 1.2.2
|
||||||
|
|
||||||
|
- Do a better job of fixing ffmpeg 6.0 support :)
|
||||||
|
|
||||||
## Version 1.2.1
|
## Version 1.2.1
|
||||||
|
|
||||||
- Fix ffmpeg 4.x support that was broken in 1.2.0
|
- Fix ffmpeg 4.x support that was broken in 1.2.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ffmpeg-the-third"
|
name = "ffmpeg-the-third"
|
||||||
version = "1.2.1+ffmpeg-6.0.0"
|
version = "1.2.2+ffmpeg-6.0"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
authors = ["meh. <meh@schizofreni.co>", "Zhiming Wang <i@zhimingwang.org>"]
|
authors = ["meh. <meh@schizofreni.co>", "Zhiming Wang <i@zhimingwang.org>"]
|
||||||
@ -124,3 +124,6 @@ default-features = false
|
|||||||
version = "1.0.152"
|
version = "1.0.152"
|
||||||
optional = true
|
optional = true
|
||||||
features = ["derive"]
|
features = ["derive"]
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
ffmpeg-sys-the-third = { path = "ffmpeg-sys-the-third" }
|
||||||
|
42
ffmpeg-sys-the-third/.github/workflows/build.yml
vendored
42
ffmpeg-sys-the-third/.github/workflows/build.yml
vendored
@ -1,42 +0,0 @@
|
|||||||
name: build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
jobs:
|
|
||||||
build-test-lint:
|
|
||||||
name: FFmpeg ${{ matrix.ffmpeg_version }} - build, test and lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
ffmpeg_version:
|
|
||||||
["3.3", "3.4", "4.0", "4.1", "4.2", "4.3", "4.4", "5.0", "5.1", "6.0"]
|
|
||||||
fail-fast: false
|
|
||||||
env:
|
|
||||||
FEATURES: avcodec,avdevice,avfilter,avformat,postproc,swresample,swscale
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y --no-install-recommends clang curl pkg-config
|
|
||||||
- name: Set up Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
cargo build --features $FEATURES
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
cargo test --features $FEATURES
|
|
||||||
- name: Lint
|
|
||||||
run: |
|
|
||||||
cargo clippy --features $FEATURES -- -D warnings
|
|
||||||
- name: Check format
|
|
||||||
run: |
|
|
||||||
cargo fmt -- --check
|
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ffmpeg-sys-the-third"
|
name = "ffmpeg-sys-the-third"
|
||||||
version = "1.1.0+ffmpeg-6.0.0"
|
version = "1.1.1+ffmpeg-6.0"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
links = "ffmpeg"
|
links = "ffmpeg"
|
||||||
|
|
||||||
|
@ -586,6 +586,7 @@ fn check_features(
|
|||||||
("ffmpeg_4_4", 58, 100),
|
("ffmpeg_4_4", 58, 100),
|
||||||
("ffmpeg_5_0", 59, 18),
|
("ffmpeg_5_0", 59, 18),
|
||||||
("ffmpeg_5_1", 59, 37),
|
("ffmpeg_5_1", 59, 37),
|
||||||
|
("ffmpeg_6_0", 60, 3),
|
||||||
];
|
];
|
||||||
for &(ffmpeg_version_flag, lavc_version_major, lavc_version_minor) in
|
for &(ffmpeg_version_flag, lavc_version_major, lavc_version_minor) in
|
||||||
ffmpeg_lavc_versions.iter()
|
ffmpeg_lavc_versions.iter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user