50-ffnvcodec.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. SCRIPT_REPO="https://github.com/FFmpeg/nv-codec-headers.git"
  3. SCRIPT_COMMIT="9934f17316b66ce6de12f3b82203a298bc9351d8"
  4. SCRIPT_REPO2="https://github.com/FFmpeg/nv-codec-headers.git"
  5. SCRIPT_COMMIT2="22441b505d9d9afc1e3002290820909846c24bdc"
  6. SCRIPT_BRANCH2="sdk/12.0"
  7. SCRIPT_REPO3="https://github.com/FFmpeg/nv-codec-headers.git"
  8. SCRIPT_COMMIT3="75f032b24263c2b684b9921755cafc1c08e41b9d"
  9. SCRIPT_BRANCH3="sdk/12.1"
  10. ffbuild_enabled() {
  11. [[ $TARGET == winarm64 ]] && return -1
  12. return 0
  13. }
  14. ffbuild_dockerdl() {
  15. default_dl ffnvcodec
  16. echo "git-mini-clone \"$SCRIPT_REPO2\" \"$SCRIPT_COMMIT2\" ffnvcodec2"
  17. echo "git-mini-clone \"$SCRIPT_REPO3\" \"$SCRIPT_COMMIT3\" ffnvcodec3"
  18. }
  19. ffbuild_dockerbuild() {
  20. if [[ $ADDINS_STR == *4.4* || $ADDINS_STR == *5.0* || $ADDINS_STR == *5.1* || $ADDINS_STR == *6.0* || $ADDINS_STR == *6.1* ]]; then
  21. cd ffnvcodec2
  22. elif [[ $ADDINS_STR == *7.0* ]]; then
  23. cd ffnvcodec3
  24. else
  25. cd ffnvcodec
  26. fi
  27. make PREFIX="$FFBUILD_PREFIX" install
  28. }
  29. ffbuild_configure() {
  30. echo --enable-ffnvcodec --enable-cuda-llvm
  31. }
  32. ffbuild_unconfigure() {
  33. echo --disable-ffnvcodec --disable-cuda-llvm
  34. }
  35. ffbuild_cflags() {
  36. return 0
  37. }
  38. ffbuild_ldflags() {
  39. return 0
  40. }