This directory can independently build NativePlayer with CMake. Before building, prepare the Android NDK, CMake, Ninja, and the FFmpeg headers and shared libraries. The FFmpeg headers and dynamic libraries are not included in this directory and must be imported by developers separately.
By default, third-party dependencies are read from a directory at the same level as NativePlayer-opensource/:
NativePlayer-third-party/
├── include/
│ └── cyffmpeg/
│ ├── libavcodec/
│ ├── libavformat/
│ ├── libavutil/
│ ├── libswresample/
│ └── libswscale/
└── libs/
├── arm64-v8a/
│ └── libcyffmpeg.so
├── armeabi-v7a/
│ └── libcyffmpeg.so
├── x86/
│ └── libcyffmpeg.so
└── x86_64/
└── libcyffmpeg.so
Place the FFmpeg headers under include/cyffmpeg/. libs/<abi>/libcyffmpeg.so is the FFmpeg dynamic library for the corresponding ABI. The FFmpeg files and shared libraries listed above are external dependencies and are not provided with the NativePlayer-opensource/ directory. Developers must prepare and import them according to the FFmpeg version, build configuration, and license requirements they use.
You can also specify the paths through environment variables:
export NATIVEPLAYER_THIRDPARTY_HEADER_DIR=/path/to/NativePlayer-third-party/include
export NATIVEPLAYER_THIRDPARTY_SO_DIR=/path/to/NativePlayer-third-party/libsSet the NDK first:
export ANDROID_NDK=/path/to/android-ndkBuild all ABIs:
./build-nativeplayer.sh allBuild a single ABI only:
./build-nativeplayer.sh arm64Available options: armv7a, arm64, x86, x86_64, all.
Build artifacts are generated at:
release/nativeplayer-<arch>/
├── include/
└── lib/
├── libnativeplayer.so
├── libijkplayer.so
└── libijksdl.so
Clean build artifacts:
./build-nativeplayer.sh cleanNativePlayer is modified from ijkplayer. The project as a whole is licensed under LGPLv2.1. See COPYING.LGPLv2.1 for details.
ijkplayer required features are based on or derives from projects below:
- LGPL
- zlib license
- BSD-style license
- ISC license
android/ijkplayer-exo is based on or derives from projects below:
- Apache License 2.0
android/example is based on or derives from projects below:
- GPL
- android-ndk-profiler (not included by default)
ios/IJKMediaDemo is based on or derives from projects below:
- Unknown license
ijkplayer's build scripts are based on or derives from projects below:
ijkplayer is licensed under LGPLv2.1 or later, so itself is free for commercial use under LGPLv2.1 or later.
But ijkplayer is also based on other different projects under various licenses, which I have no idea whether they are compatible to each other or to your product.
IANAL, you should always ask your lawyer for these stuffs before use it in your product.