fix linux ffmpeg link, still link ffmpeg in hwcodec (#8747)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-07-18 13:18:21 +08:00
committed by GitHub
Unverified
parent edc5d86ee7
commit 48464835f5
2 changed files with 6 additions and 3 deletions

View File

@@ -189,6 +189,8 @@ fn gen_vcpkg_package(package: &str, ffi_header: &str, generated: &str, regex: &s
}
// If you have problems installing ffmpeg, you can download $VCPKG_ROOT/installed from ci
// Linux require link in hwcodec
/*
fn ffmpeg() {
// ffmpeg
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
@@ -230,6 +232,7 @@ fn ffmpeg() {
println!("cargo:rustc-link-lib=framework=AVFoundation");
}
}
*/
fn main() {
// note: all link symbol names in x86 (32-bit) are prefixed wth "_".
@@ -247,7 +250,7 @@ fn main() {
gen_vcpkg_package("libvpx", "vpx_ffi.h", "vpx_ffi.rs", "^[vV].*");
gen_vcpkg_package("aom", "aom_ffi.h", "aom_ffi.rs", "^(aom|AOM|OBU|AV1).*");
gen_vcpkg_package("libyuv", "yuv_ffi.h", "yuv_ffi.rs", ".*");
ffmpeg();
// ffmpeg();
// there is problem with cfg(target_os) in build.rs, so use our workaround
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();