diff --git a/scripts/function-apple.sh b/scripts/function-apple.sh index 8e7f345..17280cc 100755 --- a/scripts/function-apple.sh +++ b/scripts/function-apple.sh @@ -143,6 +143,15 @@ disable_macos_architecture_not_supported_on_detected_sdk_version() { fi } +disable_tvos_videotoolbox_on_not_supported_sdk_version() { + + # INTRODUCED IN TVOS SDK 10.2 + if [[ $(compare_versions "$TVOS_MIN_VERSION" "10.2") -lt 0 ]]; then + set_library "tvos-videotoolbox" 0 + echo -e "INFO: Disabled tvos-videotoolbox which is not supported on tvOS SDK $TVOS_MIN_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 + fi +} + build_apple_architecture_variant_strings() { export ALL_IOS_ARCHITECTURES="$(get_apple_architectures_for_variant "${ARCH_VAR_IOS}")" export IPHONEOS_ARCHITECTURES="$(get_apple_architectures_for_variant "${ARCH_VAR_IPHONEOS}")" diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index 86e4b92..a5284c2 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -90,11 +90,6 @@ enable_lts_build() { # MAC CATALYST IS INTRODUCED IN 13.0 export MAC_CATALYST_MIN_VERSION=13.0 fi - - # IOS SDK 9.3 SUPPORTS VIDEOTOOLBOX - # HOWEVER, THE LATEST FFMPEG VERSION USES SDK 11.0 APIS - # THEREFORE, VIDEOTOOLBOX IS DISABLED IN LTS RELEASES - ENABLED_LIBRARIES[LIBRARY_VIDEOTOOLBOX]=0 } get_common_includes() { diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index 9d9750b..f953e96 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -64,9 +64,6 @@ enable_lts_build() { # XCODE 7.3 HAS TVOS SDK 9.2 export TVOS_MIN_VERSION=9.2 fi - - # TVOS SDK 9.2 DOES NOT INCLUDE VIDEOTOOLBOX - ENABLED_LIBRARIES[LIBRARY_VIDEOTOOLBOX]=0 } get_common_includes() { diff --git a/scripts/function.sh b/scripts/function.sh index 7bf23cc..d678bf0 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -265,19 +265,6 @@ is_library_supported_on_platform() { fi ;; - # ONLY IOS, MACOS AND TVOS MAIN - 52) - if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] && [[ $1 == "ios-videotoolbox" ]] && [[ -z ${FFMPEG_KIT_LTS_BUILD} ]]; then - echo "0" - elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]] && [[ $1 == "macos-videotoolbox" ]]; then - echo "0" - elif [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] && [[ $1 == "tvos-videotoolbox" ]] && [[ -z ${FFMPEG_KIT_LTS_BUILD} ]]; then - echo "0" - else - echo "1" - fi - ;; - # ONLY IOS AND MACOS 53) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] && [[ $1 == "ios-avfoundation" ]]; then @@ -290,7 +277,7 @@ is_library_supported_on_platform() { ;; # IOS, MACOS AND TVOS - 49 | 50 | 51 | 54 | 55) + 49 | 50 | 51 | 52 | 54 | 55) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then echo "0" else diff --git a/tvos.sh b/tvos.sh index 16d2723..c0d4081 100755 --- a/tvos.sh +++ b/tvos.sh @@ -159,6 +159,9 @@ fi # DISABLE NOT SUPPORTED ARCHITECTURES disable_tvos_architecture_not_supported_on_detected_sdk_version "${ARCH_ARM64_SIMULATOR}" +# DISABLE NOT SUPPORTED LIBRARIES +disable_tvos_videotoolbox_on_not_supported_sdk_version + # CHECK SOME RULES FOR .framework BUNDLES # 1. DISABLE arm64-simulator WHEN arm64 IS ENABLED IN framework BUNDLES