Ai
1 Star 0 Fork 0

programmingWindows/FFmpegInterop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
FFmpegConfig.sh 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# Common configure settings for all architectures
common_settings=" \
--toolchain=msvc \
--target-os=win32 \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--enable-shared \
--enable-cross-compile \
--extra-cflags=\"-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00 -GUARD:CF\" \
--extra-ldflags=\"-APPCONTAINER WindowsApp.lib -PROFILE -GUARD:CF -DYNAMICBASE\" \
"
# Architecture specific configure settings
arch="${1,,}"
if [ -z $arch ]; then
echo "ERROR: No architecture set" 1>&2
exit 1
elif [ $arch == "x86" ]; then
arch_settings="
--arch=x86 \
--prefix=../../Build/$arch \
"
elif [ $arch == "x64" ]; then
arch_settings="
--arch=x86_64 \
--prefix=../../Build/$arch \
"
elif [ $arch == "arm" ]; then
arch_settings="
--arch=arm \
--as=armasm \
--cpu=armv7 \
--enable-thumb \
--extra-cflags=\"-D__ARM_PCS_VFP\" \
--prefix=../../Build/$arch \
"
elif [ $arch == "arm64" ]; then
arch_settings="
--arch=arm64 \
--as=armasm64 \
--cpu=armv7 \
--enable-thumb \
--extra-cflags=\"-D__ARM_PCS_VFP\" \
--prefix=../../Build/$arch \
"
else
echo "ERROR: $arch is not a valid architecture" 1>&2
exit 1
fi
# Extra configure settings supplied by user
extra_settings="${2:-""}"
# Build FFmpeg
pushd $dir/ffmpeg > /dev/null
rm -rf Output/$arch
mkdir -p Output/$arch
cd Output/$arch
eval ../../configure $common_settings $arch_settings $extra_settings &&
make -j`nproc` &&
make install
result=$?
popd > /dev/null
if [ $result -ne 0 ]; then
echo "ERROR: FFmpeg build for $arch failed with exit code $result" 1>&2
fi
exit $result
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/programmingwindows/FFmpegInterop.git
git@gitee.com:programmingwindows/FFmpegInterop.git
programmingwindows
FFmpegInterop
FFmpegInterop
main

搜索帮助