diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index f656acb..7d0c703 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -52,6 +52,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") include_directories(src/main/cpp) include_directories(src/main/cpp/include) +if(${CMAKE_ANDROID_ARCH_ABI} MATCHES "armeabi-v7a") + include_directories(src/main/cpp/include/armeabi-v7a) + message("This is armeabi-v7a") +elseif(${CMAKE_ANDROID_ARCH_ABI} MATCHES "arm64-v8a") + include_directories(src/main/cpp/include/arm64-v8a) + message("This is arm64-v8a") +endif() find_library( # Sets the name of the path variable. log-lib diff --git a/app/build.gradle b/app/build.gradle index 7058e14..d2e9522 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,7 +17,7 @@ android { } } ndk { - abiFilters "armeabi-v7a" + abiFilters "armeabi-v7a", "arm64-v8a" } } buildTypes { diff --git a/app/libs/arm64-v8a/libffmpeg.so b/app/libs/arm64-v8a/libffmpeg.so new file mode 100644 index 0000000..bd80f40 Binary files /dev/null and b/app/libs/arm64-v8a/libffmpeg.so differ diff --git a/app/src/main/cpp/include/arm64-v8a/libavcodec/arm/mathops.h b/app/src/main/cpp/include/arm64-v8a/libavcodec/arm/mathops.h new file mode 100644 index 0000000..888a35e --- /dev/null +++ b/app/src/main/cpp/include/arm64-v8a/libavcodec/arm/mathops.h @@ -0,0 +1,26 @@ +/* + * simple math operations + * Copyright (c) 2006 Michael Niedermayer et al + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_MATHOPS_H +#define AVCODEC_ARM_MATHOPS_H + + +#endif /* AVCODEC_ARM_MATHOPS_H */ diff --git a/app/src/main/cpp/include/libavutil/aarch64/timer.h b/app/src/main/cpp/include/arm64-v8a/libavutil/arm/timer.h similarity index 100% rename from app/src/main/cpp/include/libavutil/aarch64/timer.h rename to app/src/main/cpp/include/arm64-v8a/libavutil/arm/timer.h diff --git a/app/src/main/cpp/include/libavcodec/arm/mathops.h b/app/src/main/cpp/include/armeabi-v7a/libavcodec/arm/mathops.h similarity index 100% rename from app/src/main/cpp/include/libavcodec/arm/mathops.h rename to app/src/main/cpp/include/armeabi-v7a/libavcodec/arm/mathops.h diff --git a/app/src/main/cpp/include/libavutil/arm/timer.h b/app/src/main/cpp/include/armeabi-v7a/libavutil/arm/timer.h similarity index 100% rename from app/src/main/cpp/include/libavutil/arm/timer.h rename to app/src/main/cpp/include/armeabi-v7a/libavutil/arm/timer.h diff --git a/app/src/main/cpp/include/libavcodec/mathops.h b/app/src/main/cpp/include/libavcodec/mathops.h index ed23322..723a4c3 100644 --- a/app/src/main/cpp/include/libavcodec/mathops.h +++ b/app/src/main/cpp/include/libavcodec/mathops.h @@ -35,17 +35,19 @@ extern const uint8_t ff_crop_tab[256 + 2 * MAX_NEG_CROP]; extern const uint8_t ff_zigzag_direct[64]; extern const uint8_t ff_zigzag_scan[16+1]; -#if ARCH_ARM -# include "arm/mathops.h" -#elif ARCH_AVR32 -# include "avr32/mathops.h" -#elif ARCH_MIPS -# include "mips/mathops.h" -#elif ARCH_PPC -# include "ppc/mathops.h" -#elif ARCH_X86 -# include "x86/mathops.h" -#endif +//TODO +#include "libavcodec/arm/mathops.h" +//#if ARCH_ARM +//# include "arm/mathops.h" +//#elif ARCH_AVR32 +//# include "avr32/mathops.h" +//#elif ARCH_MIPS +//# include "mips/mathops.h" +//#elif ARCH_PPC +//# include "ppc/mathops.h" +//#elif ARCH_X86 +//# include "x86/mathops.h" +//#endif /* generic implementation */ diff --git a/app/src/main/cpp/include/libavutil/timer.h b/app/src/main/cpp/include/libavutil/timer.h index 45b3bf0..7493bb0 100644 --- a/app/src/main/cpp/include/libavutil/timer.h +++ b/app/src/main/cpp/include/libavutil/timer.h @@ -38,15 +38,17 @@ #include "log.h" -#if ARCH_AARCH64 -# include "aarch64/timer.h" -#elif ARCH_ARM -# include "arm/timer.h" -#elif ARCH_PPC -# include "ppc/timer.h" -#elif ARCH_X86 -# include "x86/timer.h" -#endif +//TODO +#include "libavutil/arm/timer.h" +//#if ARCH_AARCH64 +//# include "aarch64/timer.h" +//#elif ARCH_ARM +//# include "arm/timer.h" +//#elif ARCH_PPC +//# include "ppc/timer.h" +//#elif ARCH_X86 +//# include "x86/timer.h" +//#endif #if !defined(AV_READ_TIME) # if HAVE_GETHRTIME