From f473b6158557d446e26b8d0cdb2b0f482938227d Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 20 Mar 2019 19:07:59 +0300 Subject: [PATCH] android: build package with API 21 enables Video I/O backend via Media NDK --- platforms/android/build-tests/test_cmake_build.py | 8 ++++---- platforms/android/build_sdk.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platforms/android/build-tests/test_cmake_build.py b/platforms/android/build-tests/test_cmake_build.py index b90bf5a133..d837c9fa8c 100644 --- a/platforms/android/build-tests/test_cmake_build.py +++ b/platforms/android/build-tests/test_cmake_build.py @@ -112,10 +112,10 @@ class TestCmakeBuild(unittest.TestCase): def suite(workdir, opencv_cmake_path): abis = { - "armeabi-v7a": { "ANDROID_ABI": "armeabi-v7a", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static" }, - "arm64-v8a": { "ANDROID_ABI": "arm64-v8a", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static" }, - "x86": { "ANDROID_ABI": "x86", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static" }, - "x86_64": { "ANDROID_ABI": "x86_64", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static" }, + "armeabi-v7a": { "ANDROID_ABI": "armeabi-v7a", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static", 'ANDROID_NATIVE_API_LEVEL': "21" }, + "arm64-v8a": { "ANDROID_ABI": "arm64-v8a", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static", 'ANDROID_NATIVE_API_LEVEL': "21" }, + "x86": { "ANDROID_ABI": "x86", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static", 'ANDROID_NATIVE_API_LEVEL': "21" }, + "x86_64": { "ANDROID_ABI": "x86_64", "ANDROID_TOOLCHAIN": "clang", "ANDROID_STL": "c++_static", 'ANDROID_NATIVE_API_LEVEL': "21" }, } suite = unittest.TestSuite() diff --git a/platforms/android/build_sdk.py b/platforms/android/build_sdk.py index 929d94aec5..9a95fc380e 100755 --- a/platforms/android/build_sdk.py +++ b/platforms/android/build_sdk.py @@ -281,7 +281,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Build OpenCV for Android SDK') parser.add_argument("work_dir", nargs='?', default='.', help="Working directory (and output)") parser.add_argument("opencv_dir", nargs='?', default=os.path.join(SCRIPT_DIR, '../..'), help="Path to OpenCV source dir") - parser.add_argument('--config', default='ndk-18.config.py', type=str, help="Package build configuration", ) + parser.add_argument('--config', default='ndk-18-api-level-21.config.py', type=str, help="Package build configuration", ) parser.add_argument('--ndk_path', help="Path to Android NDK to use for build") parser.add_argument('--sdk_path', help="Path to Android SDK to use for build") parser.add_argument('--use_android_buildtools', action="store_true", help='Use cmake/ninja build tools from Android SDK')