Add ffnvcodec

This commit is contained in:
BtbN 2020-09-03 19:32:54 +02:00
parent 70b70e5bb7
commit d3eccc19ab
2 changed files with 44 additions and 0 deletions

40
scripts.d/50-ffnvcodec.sh Executable file
View file

@ -0,0 +1,40 @@
#!/bin/bash
FFNVCODEC_REPO="https://git.videolan.org/git/ffmpeg/nv-codec-headers.git"
FFNVCODEC_COMMIT="c928e22d81869fefb63a86405c0e1cbed8763a9e"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /root/ffnvcodec.sh"
to_df "RUN bash -c 'source /root/ffnvcodec.sh && ffbuild_dockerbuild && rm /root/ffnvcodec.sh'"
}
ffbuild_dockerbuild() {
git clone "$FFNVCODEC_REPO" ffnvcodec || return -1
pushd ffnvcodec
git checkout "$FFNVCODEC_COMMIT" || return -1
make PREFIX="$FFBUILD_PREFIX" install || return -1
popd
rm -rf ffnvcodec
}
ffbuild_configure() {
echo --enable-ffnvcodec --enable-cuda-llvm
}
ffbuild_unconfigure() {
echo --disable-ffnvcodec --disable-cuda-llvm
}
ffbuild_cflags() {
return 0
}
ffbuild_ldflags() {
return 0
}

View file

@ -49,6 +49,10 @@ ffbuild_configure() {
echo --enable-libx264
}
ffbuild_configure() {
echo --disable-libx264
}
ffbuild_cflags() {
return 0
}