这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
libopus-dev

- run: |
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/7.1
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/8.0
cd ffmpeg
mkdir build
cd build
Expand All @@ -84,7 +84,7 @@ jobs:
- run: |
FFMPEG_INCLUDE_DIR=${HOME}/ffmpeg_build/include \
FFMPEG_PKG_CONFIG_PATH=${HOME}/ffmpeg_build/lib/pkgconfig \
cargo clippy -- -D warnings
cargo clippy --features ffmpeg8 -- -D warnings

rust_clippy_check_windows:
runs-on: windows-latest
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
# Disable exr,phm to workaround "multiple definition of 'ff_init_half2float_tables'"
# Ref: `https://github.com/larksuite/rsmpeg/pull/98#issuecomment-1467511193`
- run: |
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/7.1
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/8.0
cd ffmpeg
mkdir build
cd build
Expand All @@ -304,7 +304,7 @@ jobs:
run: |
FFMPEG_INCLUDE_DIR=${HOME}/ffmpeg_build/include \
FFMPEG_PKG_CONFIG_PATH=${HOME}/ffmpeg_build/lib/pkgconfig \
cargo test --verbose
cargo test --features ffmpeg8 --verbose

- name: Run Slice Example
run: |
Expand Down Expand Up @@ -452,7 +452,7 @@ jobs:

- name: Build FFmpeg dylib
run: |
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/7.1
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/8.0
cd ffmpeg
mkdir build
cd build
Expand All @@ -462,7 +462,6 @@ jobs:
--enable-small \
--disable-debug \
--disable-programs \
--disable-postproc \
--disable-doc \
--disable-hwaccels \
--disable-parsers \
Expand Down Expand Up @@ -508,8 +507,8 @@ jobs:
LD_LIBRARY_PATH: ${{ github.workspace }}/ffmpeg_prebuilt/lib/
run: |
cp -r ~/ffmpeg_prebuilt ${{ github.workspace }}/ffmpeg_prebuilt
cargo build --example slice
cargo run --example slice
cargo build --example slice --features ffmpeg8
cargo run --example slice --features ffmpeg8

build_dynamic_and_test_macos:
runs-on: macos-latest
Expand All @@ -535,7 +534,7 @@ jobs:

- name: Build FFmpeg dylib
run: |
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/7.1
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/8.0
cd ffmpeg
mkdir build
cd build
Expand All @@ -545,7 +544,6 @@ jobs:
--enable-small \
--disable-debug \
--disable-programs \
--disable-postproc \
--disable-doc \
--disable-hwaccels \
--disable-parsers \
Expand Down Expand Up @@ -591,9 +589,9 @@ jobs:
FFMPEG_DLL_PATH: ${{ github.workspace }}/ffmpeg_prebuilt/lib/libffmpeg.dylib
run: |
cp -r ~/ffmpeg_prebuilt ${{ github.workspace }}/ffmpeg_prebuilt
cargo build --example slice
cargo build --example slice --features ffmpeg8
cp ${{ github.workspace }}/ffmpeg_prebuilt/lib/libffmpeg.dylib .
cargo run --example slice
cargo run --example slice --features ffmpeg8

build_dynamic_and_test_windows_pre:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -622,7 +620,7 @@ jobs:
cd ../..
- name: Build FFmpeg
run: |
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/7.1
git clone https://github.com/ffmpeg/ffmpeg --depth 1 --single-branch --branch release/8.0
cd ffmpeg
mkdir build
cd build
Expand All @@ -631,7 +629,6 @@ jobs:
--enable-small \
--disable-debug \
--disable-programs \
--disable-postproc \
--disable-doc \
--disable-hwaccels \
--disable-parsers \
Expand Down Expand Up @@ -663,6 +660,8 @@ jobs:
-lgdi32 \
-lpsapi \
-lole32 \
-lcrypt32 \
-lncrypt \
-lstrmiids \
-luuid \
-loleaut32 \
Expand Down Expand Up @@ -717,9 +716,9 @@ jobs:
LIBCLANG_PATH: ${{ github.workspace }}/clang/lib
LLVM_CONFIG_PATH: ${{ github.workspace }}/clang/bin/llvm-config
run: |
cargo build --target i686-pc-windows-msvc --example slice
cargo build --target i686-pc-windows-msvc --example slice --features ffmpeg8
copy ${{ github.workspace }}/ffmpeg_prebuilt_cross/lib/libffmpeg.dll .
cargo run --target i686-pc-windows-msvc --example slice
cargo run --target i686-pc-windows-msvc --example slice --features ffmpeg8

# Check if correct documentation can be generated by docs.rs
docs_rs_check:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rusty_ffmpeg"
version = "0.16.5+ffmpeg.7.1"
version = "0.16.6+ffmpeg.8"
authors = ["ldm0 <ldm2993593805@163.com>"]
edition = "2021"
description = "A library that provides Rust bindings for FFmpeg"
Expand Down
5 changes: 2 additions & 3 deletions examples/slice/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,11 @@ fn decode_packet(
));
} else {
println!(
"Frame {} (type={}, size={} bytes) pts {} key_frame {}",
"Frame {} (type={}, size={} bytes) pts {}",
codec_context.frame_num,
unsafe { ffi::av_get_picture_type_char(frame.pict_type) },
frame.pkt_size,
frame.linesize[0] * frame.height,
frame.pts,
frame.key_frame,
);

let frame_filename = format!(
Expand Down
Loading
Loading