Skip to content

Commit 86e6da6

Browse files
Merge pull request #65 from Polochon-street/polochon/ffmpeg6.1
Initial support for ffmpeg 6.1
2 parents 7f09111 + 65e294a commit 86e6da6

File tree

4 files changed

+61
-3
lines changed

4 files changed

+61
-3
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,39 @@ jobs:
3939
- name: Check format
4040
run: |
4141
cargo fmt -- --check
42+
# Added only because there is no ffmpeg6.1 docker image here yet
43+
# https://github.com/jrottenberg/ffmpeg
44+
build-test-lint-latest:
45+
name: FFmpeg Latest - build, test and lint
46+
runs-on: ubuntu-latest
47+
strategy:
48+
fail-fast: false
49+
env:
50+
FEATURES: avcodec,avdevice,avfilter,avformat,postproc,swresample,swscale
51+
steps:
52+
- uses: actions/checkout@v2
53+
- name: Install dependencies
54+
run: |
55+
sudo apt update
56+
sudo apt install -y software-properties-common
57+
sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg6
58+
sudo apt update
59+
sudo apt install -y --no-install-recommends clang curl pkg-config ffmpeg libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libavfilter-dev libavdevice-dev libswresample-dev
60+
- name: Set up Rust
61+
uses: actions-rs/toolchain@v1
62+
with:
63+
toolchain: stable
64+
override: true
65+
components: rustfmt, clippy
66+
- name: Build
67+
run: |
68+
cargo build --features $FEATURES
69+
- name: Test
70+
run: |
71+
cargo test --features $FEATURES
72+
- name: Lint
73+
run: |
74+
cargo clippy --features $FEATURES -- -D warnings
75+
- name: Check format
76+
run: |
77+
cargo fmt -- --check

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ffmpeg-sys-next"
3-
version = "6.0.1"
3+
version = "6.1.0"
44
build = "build.rs"
55
links = "ffmpeg"
66

build.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ fn check_features(
588588
("ffmpeg_5_0", 59, 18),
589589
("ffmpeg_5_1", 59, 37),
590590
("ffmpeg_6_0", 60, 3),
591+
("ffmpeg_6_1", 60, 31),
591592
];
592593
for &(ffmpeg_version_flag, lavc_version_major, lavc_version_minor) in
593594
ffmpeg_lavc_versions.iter()
@@ -650,8 +651,8 @@ fn main() {
650651
search().join("lib").to_string_lossy()
651652
);
652653
link_to_libraries(statik);
653-
if fs::metadata(&search().join("lib").join("libavutil.a")).is_err() {
654-
fs::create_dir_all(&output()).expect("failed to create build directory");
654+
if fs::metadata(search().join("lib").join("libavutil.a")).is_err() {
655+
fs::create_dir_all(output()).expect("failed to create build directory");
655656
fetch().unwrap();
656657
build().unwrap();
657658
}

channel_layout_fixed.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,24 @@ const unsigned long long AV_CH_LAYOUT_22POINT2 =
186186
AV_CH_TOP_SIDE_RIGHT | AV_CH_TOP_BACK_CENTER | AV_CH_BOTTOM_FRONT_CENTER |
187187
AV_CH_BOTTOM_FRONT_LEFT | AV_CH_BOTTOM_FRONT_RIGHT);
188188
#endif
189+
190+
#if (LIBAVUTIL_VERSION_MAJOR >= 58 && LIBAVUTIL_VERSION_MINOR >= 29)
191+
192+
#undef AV_CH_LAYOUT_3POINT1POINT2
193+
#undef AV_CH_LAYOUT_5POINT1POINT2_BACK
194+
#undef AV_CH_LAYOUT_5POINT1POINT4_BACK
195+
#undef AV_CH_LAYOUT_7POINT1POINT2
196+
#undef AV_CH_LAYOUT_7POINT1POINT4_BACK
197+
198+
const unsigned long long AV_CH_LAYOUT_3POINT1POINT2 =
199+
(AV_CH_LAYOUT_3POINT1 | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT);
200+
const unsigned long long AV_CH_LAYOUT_5POINT1POINT2_BACK =
201+
(AV_CH_LAYOUT_5POINT1_BACK | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT);
202+
const unsigned long long AV_CH_LAYOUT_5POINT1POINT4_BACK =
203+
(AV_CH_LAYOUT_5POINT1POINT2_BACK | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT);
204+
const unsigned long long AV_CH_LAYOUT_7POINT1POINT2 =
205+
(AV_CH_LAYOUT_7POINT1 | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT);
206+
const unsigned long long AV_CH_LAYOUT_7POINT1POINT4_BACK =
207+
(AV_CH_LAYOUT_7POINT1POINT2 | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT);
208+
209+
#endif

0 commit comments

Comments
 (0)