-
Notifications
You must be signed in to change notification settings - Fork 262
Open
Description
Please include as much info as possible to save me (solo maintainer helping for free) some time. A minimal, complete, and reproducible example is a must. Link to a gist if you don't feel like posting all the code inline. At the same time, please leave out unnecessary code so I don't need to wade through a hundred lines to get to the problematic part. Tell me your OS, FFmpeg version, etc. if there's even a slim chance of relevancy.
在使用 FFmpeg 8.0 版本时,rust-ffmpeg 项目出现编译错误,提示缺少对 AV_FRAME_DATA_EXIF 和 AV_PKT_DATA_EXIF 类型的处理。
➜ rust-ffmpeg git:(master) cargo build
warning: no edition set: defaulting to the 2015 edition while the latest is 2024
Compiling ffmpeg-sys-next v8.0.1
Compiling ffmpeg-next v8.0.0 (/data/workspace/rust-ffmpeg)
error[E0004]: non-exhaustive patterns: `sys::AVFrameSideDataType::AV_FRAME_DATA_EXIF` not covered
--> src/util/frame/side_data.rs:89:15
|
89 | match value {
| ^^^^^ pattern `sys::AVFrameSideDataType::AV_FRAME_DATA_EXIF` not covered
|
note: `sys::AVFrameSideDataType` defined here
--> /data/workspace/rust-ffmpeg/target/debug/build/ffmpeg-sys-next-45a26cf37ae90925/out/bindings.rs:5559:1
|
5559 | pub enum AVFrameSideDataType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
5623 | AV_FRAME_DATA_EXIF = 31,
| ------------------ not covered
= note: the matched value is of type `sys::AVFrameSideDataType`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
150 ~ AV_FRAME_DATA_3D_REFERENCE_DISPLAYS => Type::THREE_D_REFERENCE_DISPLAYS,
151 ~ sys::AVFrameSideDataType::AV_FRAME_DATA_EXIF => todo!(),
|
error[E0004]: non-exhaustive patterns: `sys::AVPacketSideDataType::AV_PKT_DATA_EXIF` not covered
--> src/codec/packet/side_data.rs:80:15
|
80 | match value {
| ^^^^^ pattern `sys::AVPacketSideDataType::AV_PKT_DATA_EXIF` not covered
|
note: `sys::AVPacketSideDataType` defined here
--> /data/workspace/rust-ffmpeg/target/debug/build/ffmpeg-sys-next-45a26cf37ae90925/out/bindings.rs:7196:1
|
7196 | pub enum AVPacketSideDataType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
7278 | AV_PKT_DATA_EXIF = 40,
| ---------------- not covered
= note: the matched value is of type `sys::AVPacketSideDataType`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
146 ~ AV_PKT_DATA_RTCP_SR => Type::RTCP_SR,
147 ~ sys::AVPacketSideDataType::AV_PKT_DATA_EXIF => todo!(),
|
For more information about this error, try `rustc --explain E0004`.
error: could not compile `ffmpeg-next` (lib) due to 2 previous errors
环境信息
- rust-ffmpeg 版本: 8.0.0
- ffmpeg-sys-next 版本: 8.0.1
- FFmpeg 版本: 8.0
- Rust 版本: 1.87.0
- 操作系统: Linux 5.4.119-19.0009.44
复现步骤
- 编译 FFmpeg 8.0 并设置 PKG_CONFIG_PATH:
./configure \
--prefix=/data/workspace/FFmpeg/output \
--enable-static \
--disable-shared \
--disable-debug \
--disable-doc \
--arch=x86_64 \
--enable-x86asm \
--enable-inline-asm
make && make install export PKG_CONFIG_PATH=/path/to/ffmpeg-8.0/lib/pkgconfig:$PKG_CONFIG_PATH- 尝试编译 rust-ffmpeg 项目:
cargo build
解决方案
目前没有太好的解决方案,本人试图添加这些枚举,但是目前还不太清楚这些字段的具体作用不太敢贸然添加 ,不过如果使用 这个版本的 ffmpeg 可能会有用
➜ rust-ffmpeg git:(master) ✗ ffmpeg -h
ffmpeg version 5.1.6-0+deb12u1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
Metadata
Metadata
Assignees
Labels
No labels