diff --git a/CMakeLists.txt b/CMakeLists.txt index a8cd210bb..1bfaaa3bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -736,7 +736,6 @@ if(ANDROID) set(PULSE_FEATURE_TYPE "DISABLED") set(CUPS_FEATURE_TYPE "DISABLED") set(PCSC_FEATURE_TYPE "DISABLED") - set(FFMPEG_FEATURE_TYPE "DISABLED") set(VAAPI_FEATURE_TYPE "DISABLED") set(OPENSLES_FEATURE_TYPE "REQUIRED") endif() diff --git a/scripts/android-build-freerdp.sh b/scripts/android-build-freerdp.sh index 40f26f2f2..0f2189d11 100755 --- a/scripts/android-build-freerdp.sh +++ b/scripts/android-build-freerdp.sh @@ -7,6 +7,7 @@ OPENSSL_TAG=master WITH_JPEG=0 WITH_OPENH264=0 WITH_OPENSSL=0 +WITH_FFMPEG=0 SRC_DIR=$(dirname "${BASH_SOURCE[0]}") SRC_DIR=$(realpath "$SRC_DIR") @@ -43,6 +44,14 @@ do ANDROID_NDK_OPENH264=$1 shift ;; + --ffmpeg) + WITH_FFMPEG=1 + shift + ;; + --ffmpeg-path) + FFMPEG_PATH="$2" + shift + ;; --openssl) WITH_OPENSSL=1 shift @@ -133,6 +142,15 @@ do CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_OPENH264=ON" else CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_OPENH264=OFF" + fi + if [ $WITH_FFMPEG -ne 0 ]; + then + CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_FFMPEG=ON" + CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DAVCODEC_INCLUDE_DIRS=$FFMPEG_PATH/$ARCH/include -DAVCODEC_LIBRARY_DIRS=$FFMPEG_PATH/$ARCH/lib" + CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DAVUTIL_INCLUDE_DIRS=$FFMPEG_PATH/$ARCH/include -DAVUTIL_LIBRARY_DIRS=$FFMPEG_PATH/$ARCH/lib" + CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DSWRESAMPLE_INCLUDE_DIRS=$FFMPEG_PATH/$ARCH/include -DSWRESAMPLE_LIBRARY_DIRS=$FFMPEG_PATH/$ARCH/lib" + else + CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_FFMPEG=OFF" fi if [ $WITH_OPENSSL -ne 0 ]; then diff --git a/scripts/android-build-release.conf b/scripts/android-build-release.conf index 51ca44df9..0009ed305 100644 --- a/scripts/android-build-release.conf +++ b/scripts/android-build-release.conf @@ -10,6 +10,7 @@ # create seperate configurations for each NDK API level # and architecture you want to support. WITH_JPEG=0 +WITH_FFMPEG=0 WITH_OPENH264=1 WITH_OPENSSL=1 BUILD_DEPS=1