fix android ndk r22 compability issues for android

This commit is contained in:
Taner Sener 2021-01-10 10:30:24 +00:00
parent 8a3372f81c
commit e27b8e6fc1
14 changed files with 121 additions and 129 deletions

View File

@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO =
PROJECT_LOGO = ../../docs/assets/ffmpeg-kit-icon-v4.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is

View File

@ -39,6 +39,6 @@ task javadoc(type: Javadoc) {
}
dependencies {
testImplementation "androidx.test.ext:junit:1.1.1"
testImplementation "androidx.test.ext:junit:1.1.2"
testImplementation "org.json:json:20190722"
}

View File

@ -20,6 +20,9 @@
*/
/*
* CHANGES 01.2021
* - NDK r22 incompatibility issues regarding INT64_MAX fixed
*
* CHANGES 01.2020
* - ffprobe support changes
* - (optindex < argc) validation in parse_options() method updated with (optindex >= argc) check
@ -358,7 +361,7 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
} else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {
*(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
} else if (po->flags & OPT_INT64) {
*(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
*(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, (double)INT64_MAX);
} else if (po->flags & OPT_TIME) {
*(int64_t *)dst = parse_time_or_die(opt, arg, 1);
} else if (po->flags & OPT_FLOAT) {

View File

@ -24,6 +24,9 @@
*/
/*
* CHANGES 01.2021
* - NDK r22 incompatibility issues regarding INT64_MAX fixed
*
* CHANGES 06.2020
* - ignoring signals implemented
* - cancel_operation() method signature updated with id
@ -3779,7 +3782,7 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
// parse user provided disposition, and update stream values
if (ost->disposition) {
static const AVOption opts[] = {
{ "disposition" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
{ "disposition" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, (double)INT64_MAX, .unit = "flags" },
{ "default" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "flags" },
{ "dub" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "flags" },
{ "original" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "flags" },

View File

@ -19,6 +19,9 @@
*/
/*
* CHANGES 01.2021
* - NDK r22 incompatibility issues regarding INT64_MAX fixed
*
* CHANGES 01.2020
* - ffprobe support changes
*
@ -222,7 +225,7 @@ AVDictionary *strip_specifiers(AVDictionary *dict)
int opt_abort_on(void *optctx, const char *opt, const char *arg)
{
const AVOption opts[] = {
{ "abort_on" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
{ "abort_on" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, (double)INT64_MAX, .unit = "flags" },
{ "empty_output" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = ABORT_ON_FLAG_EMPTY_OUTPUT }, .unit = "flags" },
{ NULL },
};

View File

@ -1,15 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:4.1.1'
}
}

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2
android/gradlew vendored
View File

@ -82,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath

22
android/gradlew.bat vendored Executable file → Normal file
View File

@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -64,28 +64,14 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell

View File

@ -1,4 +1,4 @@
include ':app'
include ':ffmpeg-kit'
project(':ffmpeg-kit').projectDir = new File('..')
rootProject.name='FFmpegKit'
rootProject.name = 'ffmpeg-kit-android'

View File

@ -39,6 +39,6 @@ task javadoc(type: Javadoc) {
}
dependencies {
testImplementation "androidx.test.ext:junit:1.1.1"
testImplementation "androidx.test.ext:junit:1.1.2"
testImplementation "org.json:json:20190722"
}

View File

@ -39,6 +39,6 @@ task javadoc(type: Javadoc) {
}
dependencies {
testImplementation "androidx.test.ext:junit:1.1.1"
testImplementation "androidx.test.ext:junit:1.1.2"
testImplementation "org.json:json:20190722"
}

View File

@ -166,7 +166,7 @@ artifacts {
}
dependencies {
testImplementation "androidx.test.ext:junit:1.1.1"
testImplementation "androidx.test.ext:junit:1.1.2"
testImplementation "org.json:json:20190722"
}