Compare commits

..

3 Commits

Author SHA1 Message Date
Taner Sener 7e821df9a5 android cpu abi implemented 2018-11-10 14:39:21 +03:00
Taner Sener ce7e8f55eb Using different implementations for getCpuArch() and getArch() methods 2018-11-10 01:00:27 +03:00
Taner Sener 19ffadd640 new architecture: ios arm64e 2018-11-08 20:13:46 +03:00
2835 changed files with 42179 additions and 143428 deletions
-33
View File
@@ -1,33 +0,0 @@
---
name: Issue Template
about: Create an issue to help us improve
---
**Description**
Description of what the issue is about.
**Expected behavior**
What you expected to happen.
**Current behavior**
What happened.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Logs**
Post logs here or paste them to [Ghostbin](https://ghostbin.com) and insert the link here.
**Environment**
- Platform: [e.g. Android/IOS]
- Architecture: [arm-v7a, arm-v7a-neon, arm64-v8a, x86, x86_64, armv7, armv7s, arm64, i386, x86_64]
- Version (if applicable) [e.g. v1.2]
- Source branch (if applicable) [e.g. master, dev-v2.x]
- Xcode version (if applicable) [e.g. 7.3.1, 9.0.1]
- Cocoapods version (if applicable) [e.g. 1.2.1]
- Android Studio version (if applicable) [e.g. 3.1]
- Android NDK version (if applicable) [e.g. 16b, 17c]
**Other**
Add any other context about the problem here.
+44 -80
View File
@@ -1,4 +1,4 @@
# MobileFFmpeg [![Join the chat at https://gitter.im/mobile-ffmpeg/Lobby](https://badges.gitter.im/mobile-ffmpeg/Lobby.svg)](https://gitter.im/mobile-ffmpeg/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![GitHub release](https://img.shields.io/badge/release-v4.2-blue.svg) ![Bintray](https://img.shields.io/badge/bintray-v4.2-blue.svg) ![CocoaPods](https://img.shields.io/badge/pod-v4.2-blue.svg)
# MobileFFmpeg [![Join the chat at https://gitter.im/mobile-ffmpeg/Lobby](https://badges.gitter.im/mobile-ffmpeg/Lobby.svg)](https://gitter.im/mobile-ffmpeg/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![GitHub release](https://img.shields.io/badge/release-v3.0-blue.svg) ![Bintray](https://img.shields.io/badge/bintray-v3.0-blue.svg) ![CocoaPods](https://img.shields.io/badge/pod-v3.0-blue.svg)
FFmpeg for Android and IOS
@@ -8,7 +8,7 @@ FFmpeg for Android and IOS
- Use binaries available at `Github`/`JCenter`/`CocoaPods` or build your own version with external libraries you need
- Supports
- Both Android and IOS
- FFmpeg `v3.4.x`, `v4.0.x`, `v4.1` and `v4.2-dev` releases
- FFmpeg `v3.4.x`, `v4.0.x` and `v4.1-dev-x` (master) releases
- 27 external libraries
`chromaprint`, `fontconfig`, `freetype`, `fribidi`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libtheora`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `opencore-amr`, `opus`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `twolame`, `wavpack`
@@ -18,6 +18,7 @@ FFmpeg for Android and IOS
`vid.stab`, `x264`, `x265`, `xvidcore`
- Exposes both FFmpeg library and MobileFFmpeg wrapper library capabilities
- Creates shared libraries (.so for Android, .dylib for IOS)
- Includes cross-compile instructions for 43 open-source libraries
`chromaprint`, `expat`, `ffmpeg`, `fontconfig`, `freetype`, `fribidi`, `giflib`, `gmp`, `gnutls`, `kvazaar`, `lame`, `leptonica`, `libaom`, `libass`, `libiconv`, `libilbc`, `libjpeg`, `libjpeg-turbo`, `libogg`, `libpng`, `libsndfile`, `libtheora`, `libuuid`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `nettle`, `opencore-amr`, `opus`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `tiff`, `twolame`, `vid.stab`, `wavpack`, `x264`, `x265`, `xvidcore`
@@ -27,18 +28,16 @@ FFmpeg for Android and IOS
#### 1.1 Android
- Builds `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures
- Supports `zlib` and `MediaCodec` system libraries
- Camera access on [supported devices](https://developer.android.com/ndk/guides/stable_apis#camera)
- Builds shared native libraries (.so)
- Creates Android archive with .aar extension
#### 1.2 IOS
- Builds `armv7`, `armv7s`, `arm64`, `arm64e`, `i386` and `x86_64` architectures
- Builds `armv7`, `armv7s`, `arm64`, `i386` and `x86_64` architectures
- Supports `bzip2`, `zlib` system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` system frameworks
- Objective-C API
- Camera access
- `ARC` enabled library
- Built with `-fembed-bitcode` flag
- Creates static framework and static universal (fat) library (.a)
- Creates IOS shared/dynamic universal (fat) library
- Creates IOS static universal (fat) library
- Creates IOS dynamic framework for IOS 8 or later
- Supports Xcode 7.3.1 or later
### 2. Using
@@ -69,10 +68,10 @@ There are eight different binary packages. Below you can see which system librar
<td align="center"><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup></td>
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup><br><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
<td align="center"><sup>lame</sup><br><sup>libilbc</sup><br><sup>libvorbis</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>lame</sup><br><sup>libilbc</sup><br><sup>libvorbis</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>kvazaar</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libtheora</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>snappy</sup></td>
<td align="center"><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>vid.stab</sup><br><sup>wavpack</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>sdl</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>tesseract</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>sdl</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>tesseract</sup><br><sup>twolame</sup><br><sup>vid.stab</sup><br><sup>wavpack</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
</tr>
<tr>
<td align="center"><sup>android system libraries</sup></td>
@@ -92,13 +91,12 @@ There are eight different binary packages. Below you can see which system librar
- `chromaprint`, `vid.stab` and `x265` are supported since `v2.1`
- `sdl`, `tesseract`, `twolame` external libraries; `zlib`, `MediaCodec` Android system libraries; `bzip2`, `zlib` IOS system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` IOS system frameworks are supported since `v3.0`
- Since `v4.2`, `chromaprint`, `sdl` and `tesseract` libraries are not included in binary releases. You can still build them and include in your releases
#### 2.1 Android
1. Add MobileFFmpeg dependency from `jcenter()`
```
dependencies {
implementation 'com.arthenica:mobile-ffmpeg-full:4.2'
dependencies {`
implementation 'com.arthenica:mobile-ffmpeg-full:3.0'
}
```
@@ -130,20 +128,15 @@ There are eight different binary packages. Below you can see which system librar
5. Get media information for a file.
```
MediaInformation info = FFmpeg.getMediaInformation("<file path or uri>");
MediaInformation info = FFmpeg.getMediaInformation('<file path or uri>');
```
6. Record video and audio using Android camera.
```
FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 <record file path>");
```
7. List enabled external libraries.
6. List enabled external libraries.
```
List<String> externalLibraries = Config.getExternalLibraries();
```
8. Enable log callback.
7. Enable log callback.
```
Config.enableLogCallback(new LogCallback() {
public void apply(LogMessage message) {
@@ -152,7 +145,7 @@ There are eight different binary packages. Below you can see which system librar
});
```
9. Enable statistics callback.
8. Enable statistics callback.
```
Config.enableStatisticsCallback(new StatisticsCallback() {
public void apply(Statistics newStatistics) {
@@ -161,12 +154,12 @@ There are eight different binary packages. Below you can see which system librar
});
```
10. Set log level.
9. Set log level.
```
Config.setLogLevel(Level.AV_LOG_FATAL);
```
11. Register custom fonts directory.
10. Register custom fonts directory.
```
Config.setFontDirectory(this, "<folder with fonts>", Collections.EMPTY_MAP);
```
@@ -174,7 +167,7 @@ There are eight different binary packages. Below you can see which system librar
#### 2.2 IOS
1. Add MobileFFmpeg pod to your `Podfile`
```
pod 'mobile-ffmpeg-full', '~> 4.2'
pod 'mobile-ffmpeg-full', '~> 3.0'
```
2. Execute commands.
@@ -208,45 +201,39 @@ There are eight different binary packages. Below you can see which system librar
MediaInformation *mediaInformation = [MobileFFmpeg getMediaInformation:@"<file path or uri>"];
```
6. Record video and audio using IOS camera
6. List enabled external libraries.
```
[MobileFFmpeg execute: @"-f avfoundation -r 30 -video_size 1280x720 -pixel_format bgr0 -i 0:0 -vcodec h264_videotoolbox -vsync 2 -f h264 -t 00:00:05 %@", recordFilePath];
NASArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
```
7. List enabled external libraries.
7. Enable log callback.
```
NSArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
```
8. Enable log callback.
```
[MobileFFmpegConfig setLogDelegate:self];
- (void)logCallback: (int)level :(NSString*)message {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"%@", message);
});
}
...
[MobileFFmpegConfig setLogDelegate:self];
```
9. Enable statistics callback.
8. Enable statistics callback.
```
[MobileFFmpegConfig setStatisticsDelegate:self];
- (void)statisticsCallback:(Statistics *)newStatistics {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"frame: %d, time: %d\n", newStatistics.getVideoFrameNumber, newStatistics.getTime);
});
}
...
[MobileFFmpegConfig setStatisticsDelegate:self];
```
10. Set log level.
9. Set log level.
```
[MobileFFmpegConfig setLogLevel:AV_LOG_FATAL];
```
11. Register custom fonts directory.
10. Register custom fonts directory.
```
[MobileFFmpegConfig setFontDirectory:@"<folder with fonts>" with:nil];
```
@@ -261,34 +248,14 @@ execution, video encoding, accessing https, encoding audio, burning subtitles an
### 3. Versions
`MobileFFmpeg` uses the same version number as `FFmpeg` since `v4.2`. Before that, `MobileFFmpeg` version of a release and `FFmpeg` version included in that release was different, as shown in the following table.
- `MobileFFmpeg v1.x` is the previous stable, includes `FFmpeg v3.4.4`
| | v1.0 | v1.1 | v1.2 | v2.0 | v2.1 | v2.2 | v3.0 | v3.1 | v4.2 |
| :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: |
| FFmpeg | 3.4.2 | 3.4.2 | 3.4.4 | 4.0.1 | 4.0.2 | 4.0.3 | 4.1-dev-1517 | v4.1-10 | v4.2-dev-480 |
| packages | min<br/>full | min<br/>min-gpl<br/>https<br/>https-gpl<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl |
- `MobileFFmpeg v2.x` is the current stable, includes `FFmpeg v4.0.2`
### 4. LTS Releases
- `MobileFFmpeg v3.x` is the next stable, includes `FFmpeg v4.1-dev-1517`
Starting from `v4.2`, `MobileFFmpeg` binaries are published in two different variants: `Main Release` and `LTS Release`.
- Main releases include complete functionality of the library and support the latest SDK/API features
- LTS releases are customized to support a wide range of devices. They are built using older API/SDK versions, so some features are not available for them
This table shows the differences between two variants.
| | Main Release | LTS Release |
| :----: | :----: | :----: |
| Android API Level | 24 | 21 |
| Android Camera Access | x | - |
| Android Architectures | arm-v7a-neon<br/>arm64-v8a<br/>x86<br/>x86-64</br> | arm-v7a<br/>arm-v7a-neon<br/>arm64-v8a<br/>x86<br/>x86-64</br> |
| IOS SDK | 12.1 | 9.3 |
| Xcode Support | 10.1 | 7.3.1 |
| IOS Architectures | arm64<br/>arm64e<br/>x86-64</br> | armv7<br/>arm64<br/>i386<br/>x86-64</br> |
### 5. Building
#### 5.1 Prerequisites
### 4. Building
#### 4.1 Prerequisites
1. Use your package manager (apt, yum, dnf, brew, etc.) to install the following packages.
```
@@ -301,20 +268,21 @@ Please visit [Android Prerequisites](https://github.com/tanersener/mobile-ffmpeg
2. Android builds require these additional packages.
- **Android SDK 5.0 Lollipop (API Level 21)** or later
- **Android NDK r17c** or later with LLDB and CMake
- **gradle 4.4** or later
3. IOS builds need these extra packages and tools.
- **IOS SDK 8.0.x** or later
- **Xcode 7.3.1** or later
- **Command Line Tools**
#### 5.2 Build Scripts
#### 4.2 Build Scripts
Use `android.sh` and `ios.sh` to build MobileFFmpeg for each platform.
After a successful build, compiled FFmpeg and MobileFFmpeg libraries can be found under `prebuilt` directory.
Both `android.sh` and `ios.sh` can be customized to override default settings,
[android.sh](https://github.com/tanersener/mobile-ffmpeg/wiki/android.sh) and
[ios.sh](https://github.com/tanersener/mobile-ffmpeg/wiki/ios.sh) wiki pages include all available build options.
##### 5.2.1 Android
##### 4.2.1 Android
```
export ANDROID_NDK_ROOT=<Android NDK Path>
./android.sh
@@ -322,32 +290,28 @@ export ANDROID_NDK_ROOT=<Android NDK Path>
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/android_custom.gif" width="600">
##### 5.2.2 IOS
##### 4.2.2 IOS
```
./ios.sh
```
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/ios_custom.gif" width="600">
##### 5.2.3 Building LTS Binaries
Use `--lts` option to build lts binaries for each platform.
#### 5.3 GPL Support
#### 4.3 GPL Support
It is possible to enable GPL licensed libraries `x264`, `xvidcore` since `v1.1` and `vid.stab`, `x265` since `v2.1`
from the top level build scripts.
Their source code is not included in the repository and downloaded when enabled.
#### 5.4 External Libraries
#### 4.4 External Libraries
`build` directory includes build scripts for external libraries. There are two scripts for each library, one for Android
and one for IOS. They include all options/flags used to cross-compile the libraries. `ASM` is enabled by most of them,
exceptions are listed under the [ASM Support](https://github.com/tanersener/mobile-ffmpeg/wiki/ASM-Support) page.
### 6. Documentation
### 5. Documentation
A more detailed documentation is available at [Wiki](https://github.com/tanersener/mobile-ffmpeg/wiki).
### 7. License
### 6. License
This project is licensed under the LGPL v3.0. However, if source code is built using optional `--enable-gpl` flag or
prebuilt binaries with `-gpl` postfix are used then MobileFFmpeg is subject to the GPL v3.0 license.
@@ -360,11 +324,11 @@ In test applications, fonts embedded are licensed under the [SIL Open Font Licen
Please visit [License](https://github.com/tanersener/mobile-ffmpeg/wiki/License) page for the details.
### 8. Contributing
### 7. Contributing
If you have any recommendations or ideas to improve it, please feel free to submit issues or pull requests. Any help is appreciated.
### 9. See Also
### 8. See Also
- [libav gas-preprocessor](https://github.com/libav/gas-preprocessor/raw/master/gas-preprocessor.pl)
- [FFmpeg API Documentation](https://ffmpeg.org/doxygen/4.0/index.html)
+18 -61
View File
@@ -62,8 +62,8 @@ export BASEDIR=$(pwd)
export MOBILE_FFMPEG_TMPDIR="${BASEDIR}/.tmp"
# USING API LEVEL 24 / Android 7.0 (NOUGAT)
export API=24
# USING API LEVEL 21 / Android 5.0 (LOLLIPOP)
export API=21
get_mobile_ffmpeg_version() {
local MOBILE_FFMPEG_VERSION=$(grep '#define MOBILE_FFMPEG_VERSION' ${BASEDIR}/android/app/src/main/cpp/mobileffmpeg.h | grep -Eo '\".*\"' | sed -e 's/\"//g')
@@ -88,8 +88,7 @@ When compilation ends an Android Archive (AAR) file is created with enabled plat
echo -e " -h, --help\t\t\tdisplay this help and exit"
echo -e " -V, --version\t\t\tdisplay version information and exit"
echo -e " -d, --debug\t\t\tbuild with debug information"
echo -e " -s, --speed\t\t\toptimize for speed instead of size"
echo -e " -l, --lts\t\t\tbuild lts packages to support API 21+ devices\n"
echo -e " -S, --speed\t\t\toptimize for speed instead of size\n"
echo -e "Licensing options:"
@@ -153,7 +152,7 @@ display_version() {
COMMAND=`echo $0 | sed -e 's/\.\///g'`
echo -e "\
$COMMAND v$(get_mobile_ffmpeg_version)\n\
$COMMAND $(get_mobile_ffmpeg_version)\n\
Copyright (c) 2018 Taner Sener\n\
License LGPLv3.0: GNU LGPL version 3 or later\n\
<https://www.gnu.org/licenses/lgpl-3.0.en.html>\n\
@@ -169,22 +168,13 @@ skip_library() {
}
enable_debug() {
export MOBILE_FFMPEG_DEBUG="-DDEBUG -g"
BUILD_TYPE_ID+="debug "
export MOBILE_FFMPEG_DEBUG="-d"
}
optimize_for_speed() {
export MOBILE_FFMPEG_OPTIMIZED_FOR_SPEED="1"
}
enable_lts_build() {
export MOBILE_FFMPEG_LTS_BUILD="1"
# USING API LEVEL 21 / Android 5.0 (LOLLIPOP)
export API=21
}
reconf_library() {
RECONF_VARIABLE=$(echo "RECONF_$1" | sed "s/\-/\_/g")
@@ -458,10 +448,6 @@ print_enabled_libraries() {
}
build_application_mk() {
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
local LTS_BUILD__FLAG="-DMOBILE_FFMPEG_LTS "
fi
rm -f ${BASEDIR}/android/jni/Application.mk
cat > "${BASEDIR}/android/jni/Application.mk" << EOF
@@ -471,34 +457,25 @@ APP_ABI := ${ANDROID_ARCHITECTURES}
APP_STL := c++_shared
APP_PLATFORM := android-${API}
APP_PLATFORM := android-21
APP_CFLAGS := -O3 -DANDROID ${LTS_BUILD__FLAG}-Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable
APP_CFLAGS := -O3 -DANDROID -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable
EOF
}
# ENABLE COMMON FUNCTIONS
. ${BASEDIR}/build/android-common.sh
DETECTED_NDK_VERSION=$(grep -Eo Revision.* ${ANDROID_NDK_ROOT}/source.properties | sed 's/Revision//g;s/=//g;s/ //g')
echo -e "\nINFO: Using Android NDK v${DETECTED_NDK_VERSION} provided at ${ANDROID_NDK_ROOT}\n" 1>>${BASEDIR}/build.log 2>&1
# CLEAR OLD NATIVE LIBS
rm -rf ${BASEDIR}/android/libs 1>>${BASEDIR}/build.log 2>&1
rm -rf ${BASEDIR}/android/obj 1>>${BASEDIR}/build.log 2>&1
GPL_ENABLED="no"
DISPLAY_HELP=""
BUILD_LTS=""
BUILD_TYPE_ID=""
while [ ! $# -eq 0 ]
do
case $1 in
-h | --help)
DISPLAY_HELP="1"
display_help
exit 0
;;
-V | --version)
display_version
@@ -512,12 +489,9 @@ do
-d | --debug)
enable_debug
;;
-s | --speed)
-S | --speed)
optimize_for_speed
;;
-l | --lts)
BUILD_LTS="1"
;;
--reconf-*)
CONF_LIBRARY=`echo $1 | sed -e 's/^--[A-Za-z]*-//g'`
@@ -556,33 +530,16 @@ do
shift
done;
# DETECT BUILD TYPE
rm -f ${BASEDIR}/android/jni/Android.mk 1>>${BASEDIR}/build.log 2>&1
if [[ ! -z ${BUILD_LTS} ]]; then
enable_lts_build
BUILD_TYPE_ID+="LTS "
cp ${BASEDIR}/tools/ndk/Android.lts.mk ${BASEDIR}/android/jni/Android.mk 1>>${BASEDIR}/build.log 2>&1
else
cp ${BASEDIR}/tools/ndk/Android.mk ${BASEDIR}/android/jni/Android.mk 1>>${BASEDIR}/build.log 2>&1
fi
if [[ ! -z ${DISPLAY_HELP} ]]; then
display_help
exit 0
fi
if [[ -z ${ANDROID_NDK_ROOT} ]]; then
echo "ANDROID_NDK_ROOT not defined"
exit 1
fi
echo -e "Building mobile-ffmpeg ${BUILD_TYPE_ID}library for Android\n"
echo -e -n "INFO: Building mobile-ffmpeg ${BUILD_TYPE_ID}library for Android: " 1>>${BASEDIR}/build.log 2>&1
echo -e "Building mobile-ffmpeg for Android\n"
echo -e -n "INFO: Building mobile-ffmpeg for Android: " 1>>${BASEDIR}/build.log 2>&1
echo -e `date` 1>>${BASEDIR}/build.log 2>&1
# PERFORM THIS CHECK ONLY ON LTS
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[0]} -eq 0 ]] && [[ ${ENABLED_ARCHITECTURES[1]} -eq 1 ]]; then
if [[ ${ENABLED_ARCHITECTURES[0]} -eq 0 ]] && [[ ${ENABLED_ARCHITECTURES[1]} -eq 1 ]]; then
ENABLED_ARCHITECTURES[0]=1
echo -e "(*) arm-v7a architecture enabled since arm-v7a-neon will be built\n"
@@ -629,11 +586,11 @@ do
mkdir -p ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH}
if [[ $run_arch -eq 0 ]] || [[ $run_arch -eq 1 ]]; then
cp ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/$(get_target_host)/lib/armv7-a/libc++_shared.so ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH} 1>>${BASEDIR}/build.log 2>&1
cp ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/$(get_target_host)/lib/armv7-a/libc++_shared.so ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH} 1>>${BASEDIR}/build.log 2>&1
elif [[ $run_arch -eq 4 ]]; then
cp ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/$(get_target_host)/lib64/libc++_shared.so ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH} 1>>${BASEDIR}/build.log 2>&1
cp ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/$(get_target_host)/lib64/libc++_shared.so ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH} 1>>${BASEDIR}/build.log 2>&1
else
cp ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/$(get_target_host)/lib/libc++_shared.so ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH} 1>>${BASEDIR}/build.log 2>&1
cp ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/$(get_target_host)/lib/libc++_shared.so ${BASEDIR}/prebuilt/android-cpp-shared/${TOOLCHAIN_ARCH} 1>>${BASEDIR}/build.log 2>&1
fi
. ${BASEDIR}/build/main-android.sh "${ENABLED_LIBRARIES[@]}" || exit 1
@@ -694,7 +651,7 @@ if [[ ! -z ${ANDROID_ARCHITECTURES} ]]; then
echo -e -n "\n\nCreating Android archive under prebuilt/android-aar: "
./gradlew clean build 1>>${BASEDIR}/build.log 2>&1
gradle clean build 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
echo -e "failed\n"
+1 -1
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MobileFFmpeg Android API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 4.2
PROJECT_NUMBER = 3.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
+3 -5
View File
@@ -2,16 +2,14 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 24
minSdkVersion 21
targetSdkVersion 27
versionCode 240420
versionName "4.2"
versionCode 30
versionName "3.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
project.archivesBaseName = "mobile-ffmpeg"
}
buildTypes {
release {
minifyEnabled false
+4 -4
View File
@@ -8,17 +8,17 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
android {
compileSdkVersion Integer.parseInt(releaseTargetSdk)
compileSdkVersion 27
defaultConfig {
minSdkVersion Integer.parseInt(releaseMinSdk)
targetSdkVersion Integer.parseInt(releaseTargetSdk)
minSdkVersion 21
targetSdkVersion 27
versionCode Integer.parseInt(releaseVersionCode)
versionName releaseVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-4
View File
@@ -358,10 +358,6 @@ void mobileffmpeg_log_callback_function(void *ptr, int level, const char* format
if (level >= 0) {
level &= 0xff;
}
int activeLogLevel = av_log_get_level();
if ((activeLogLevel == AV_LOG_QUIET) || (level > activeLogLevel)) {
return;
}
avutil_log_format_line(ptr, level, format, vargs, part, &print_prefix);
snprintf(line, sizeof(line), "%s%s%s%s", part[0].str, part[1].str, part[2].str, part[3].str);
+1 -1
View File
@@ -27,7 +27,7 @@
#include "libavutil/ffversion.h"
/** Library version string */
#define MOBILE_FFMPEG_VERSION "4.2"
#define MOBILE_FFMPEG_VERSION "3.0"
/** Defines tag used for Android logging. */
#define LIB_NAME "mobile-ffmpeg"
@@ -26,7 +26,7 @@ const char *abiDetectClassName = "com/arthenica/mobileffmpeg/AbiDetect";
/** Prototypes of native functions defined by this file. */
JNINativeMethod abiDetectMethods[] = {
{"getNativeAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi},
{"getNativeCpuAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeCpuAbi}
{"getCpuAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getCpuAbi}
};
/**
@@ -87,7 +87,7 @@ JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi
* \param object reference to the class on which this method is invoked
* \return ABI name of the running cpu as UTF string
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeCpuAbi(JNIEnv *env, jclass object) {
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getCpuAbi(JNIEnv *env, jclass object) {
AndroidCpuFamily family = android_getCpuFamily();
if (family == ANDROID_CPU_FAMILY_ARM) {
@@ -113,18 +113,3 @@ JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeCpu
return (*env)->NewStringUTF(env, ABI_UNKNOWN);
}
}
/**
* Returns whether MobileFFmpeg release is a long term release or not.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \return YES or NO
*/
JNIEXPORT jboolean JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_isNativeLTSBuild(JNIEnv *env, jclass object) {
#if defined(MOBILE_FFMPEG_LTS)
return JNI_TRUE;
#else
return JNI_FALSE;
#endif
}
@@ -53,16 +53,10 @@ JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi
/*
* Class: com_arthenica_mobileffmpeg_AbiDetect
* Method: getNativeCpuAbi
* Method: getCpuAbi
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeCpuAbi(JNIEnv *, jclass);
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getCpuAbi(JNIEnv *, jclass);
/**
* Class: com_arthenica_mobileffmpeg_AbiDetect
* Method: isNativeLTSBuild
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_isNativeLTSBuild(JNIEnv *, jclass);
#endif /* MOBILE_FFMPEG_ABIDETECT_H */
@@ -63,9 +63,9 @@ public class AbiDetect {
}
/**
* <p>Returns loaded ABI name.
* <p>Returns native loaded ABI name.
*
* @return loaded ABI name
* @return native loaded ABI name
*/
private native static String getNativeAbi();
@@ -74,13 +74,6 @@ public class AbiDetect {
*
* @return ABI name of the running cpu
*/
public native static String getNativeCpuAbi();
/**
* <p>Returns whether MobileFFmpeg release is a long term release or not.
*
* @return YES or NO
*/
native static boolean isNativeLTSBuild();
public native static String getCpuAbi();
}
@@ -81,7 +81,7 @@ public class Config {
Log.i(Config.TAG, "Loading mobile-ffmpeg.");
/* ALL LIBRARIES LOADED AT STARTUP */
Abi cpuAbi = Abi.from(AbiDetect.getNativeCpuAbi());
Abi cpuAbi = Abi.from(AbiDetect.getCpuAbi());
FFmpeg.class.getName();
/*
@@ -89,21 +89,12 @@ public class Config {
*/
boolean nativeLibraryLoaded = false;
if (cpuAbi == Abi.ABI_ARMV7A_NEON) {
if (AbiDetect.isNativeLTSBuild()) {
/*
* IF CPU SUPPORTS ARM-V7A-NEON THE TRY TO LOAD IT FIRST. IF NOT LOAD DEFAULT ARM-V7A
*/
try {
System.loadLibrary("mobileffmpeg-armv7a-neon");
nativeLibraryLoaded = true;
AbiDetect.setArmV7aNeonLoaded(true);
} catch (final UnsatisfiedLinkError e) {
Log.i(Config.TAG, "NEON supported armeabi-v7a library not found. Loading default armeabi-v7a library.", e);
}
} else {
try {
System.loadLibrary("mobileffmpeg-armv7a-neon");
nativeLibraryLoaded = true;
AbiDetect.setArmV7aNeonLoaded(true);
} catch (final UnsatisfiedLinkError e) {
Log.i(Config.TAG, "NEON supported armeabi-v7a library not found. Loading default armeabi-v7a library.", e);
}
}
@@ -79,11 +79,7 @@ public class FFmpeg {
* @return MobileFFmpeg version
*/
public static String getVersion() {
if (AbiDetect.isNativeLTSBuild()) {
return String.format("%s-lts", Config.getNativeVersion());
} else {
return Config.getNativeVersion();
}
return Config.getNativeVersion();
}
/**
@@ -183,13 +179,4 @@ public class FFmpeg {
}
}
/**
* <p>Returns whether MobileFFmpeg release is a long term release or not.
*
* @return YES or NO
*/
public static boolean isLTSBuild() {
return AbiDetect.isNativeLTSBuild();
}
}
@@ -34,6 +34,7 @@ class Packages {
static {
supportedExternalLibraries = new ArrayList<>();
supportedExternalLibraries.add("chromaprint");
supportedExternalLibraries.add("fontconfig");
supportedExternalLibraries.add("freetype");
supportedExternalLibraries.add("fribidi");
@@ -54,9 +55,11 @@ class Packages {
supportedExternalLibraries.add("opencore-amr");
supportedExternalLibraries.add("opus");
supportedExternalLibraries.add("shine");
supportedExternalLibraries.add("sdl");
supportedExternalLibraries.add("snappy");
supportedExternalLibraries.add("soxr");
supportedExternalLibraries.add("speex");
supportedExternalLibraries.add("tesseract");
supportedExternalLibraries.add("twolame");
supportedExternalLibraries.add("wavpack");
supportedExternalLibraries.add("x264");
@@ -131,7 +134,8 @@ class Packages {
}
if (fullGpl) {
if (externalLibraryList.contains("fontconfig") &&
if (externalLibraryList.contains("chromaprint") &&
externalLibraryList.contains("fontconfig") &&
externalLibraryList.contains("freetype") &&
externalLibraryList.contains("fribidi") &&
externalLibraryList.contains("gmp") &&
@@ -151,9 +155,11 @@ class Packages {
externalLibraryList.contains("opencore-amr") &&
externalLibraryList.contains("opus") &&
externalLibraryList.contains("shine") &&
externalLibraryList.contains("sdl") &&
externalLibraryList.contains("snappy") &&
externalLibraryList.contains("soxr") &&
externalLibraryList.contains("speex") &&
externalLibraryList.contains("tesseract") &&
externalLibraryList.contains("twolame") &&
externalLibraryList.contains("wavpack") &&
externalLibraryList.contains("x264") &&
@@ -166,7 +172,8 @@ class Packages {
}
if (full) {
if (externalLibraryList.contains("fontconfig") &&
if (externalLibraryList.contains("chromaprint") &&
externalLibraryList.contains("fontconfig") &&
externalLibraryList.contains("freetype") &&
externalLibraryList.contains("fribidi") &&
externalLibraryList.contains("gmp") &&
@@ -185,9 +192,11 @@ class Packages {
externalLibraryList.contains("opencore-amr") &&
externalLibraryList.contains("opus") &&
externalLibraryList.contains("shine") &&
externalLibraryList.contains("sdl") &&
externalLibraryList.contains("snappy") &&
externalLibraryList.contains("soxr") &&
externalLibraryList.contains("speex") &&
externalLibraryList.contains("tesseract") &&
externalLibraryList.contains("twolame") &&
externalLibraryList.contains("wavpack")) {
return "full";
+1 -1
View File
@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
Binary file not shown.
+2 -1
View File
@@ -1,5 +1,6 @@
#Thu Mar 15 21:50:32 EET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+44 -56
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
##############################################################################
##
@@ -6,6 +6,42 @@
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@@ -24,46 +60,6 @@ cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -89,7 +85,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -154,19 +150,11 @@ if $cygwin ; then
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
APP_ARGS=$(save "$@")
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+10 -4
View File
@@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,9 +46,10 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -59,6 +60,11 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
+1
View File
@@ -1,3 +1,4 @@
/build
/.idea/
/gradle/
/local.properties
+5 -24
View File
@@ -4,10 +4,10 @@ android {
compileSdkVersion 27
defaultConfig {
applicationId "com.arthenica.mobileffmpeg.test"
minSdkVersion 24
minSdkVersion 21
targetSdkVersion 27
versionCode 240420
versionName "4.2"
versionCode 30
versionName "3.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -16,31 +16,12 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
universalApk false
}
}
}
ext.abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4]
import com.android.build.OutputFile
android.applicationVariants.all { variant ->
variant.outputs.each {
output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
output.versionCodeOverride = baseAbiVersionCode + variant.versionCode
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.arthenica:mobile-ffmpeg-full:4.2'
// implementation 'com.arthenica:mobile-ffmpeg-full:3.0'
implementation project(':app')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Binary file not shown.
@@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-172
View File
@@ -1,172 +0,0 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
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
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; 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
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
-84
View File
@@ -1,84 +0,0 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
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%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@@ -117,7 +117,7 @@ public class CommandTabFragment extends Fragment {
public void runFFmpeg() {
clearLog();
final String ffmpegCommand = String.format("-hide_banner %s", commandText.getText().toString());
final String ffmpegCommand = commandText.getText().toString();
android.util.Log.d(MainActivity.TAG, "Testing COMMAND synchronously.");
@@ -135,7 +135,7 @@ public class CommandTabFragment extends Fragment {
public void runFFmpegAsync() {
clearLog();
final String ffmpegCommand = String.format("-hide_banner %s", commandText.getText().toString());
final String ffmpegCommand = commandText.getText().toString();
android.util.Log.d(MainActivity.TAG, "Testing COMMAND asynchronously.");
@@ -41,7 +41,6 @@ import android.widget.TextView;
import com.arthenica.mobileffmpeg.Config;
import com.arthenica.mobileffmpeg.FFmpeg;
import com.arthenica.mobileffmpeg.util.RunCallback;
import com.arthenica.mobileffmpeg.util.AsynchronousTaskService;
import com.arthenica.mobileffmpeg.util.RunCallback;
+7 -7
View File
@@ -47,21 +47,21 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DFFT_LIB=kissfft \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_chromaprint_package_config "1.4.3"
+75 -112
View File
@@ -131,11 +131,7 @@ get_target_build() {
echo "arm"
;;
arm-v7a-neon)
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
echo "arm/neon"
else
echo "arm"
fi
echo "arm/neon"
;;
arm64-v8a)
echo "arm64"
@@ -184,15 +180,11 @@ get_android_arch() {
}
get_common_includes() {
echo "-I${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot/usr/include -I${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot/usr/local/include"
echo "-I${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/include -I${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/local/include"
}
get_common_cflags() {
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
local LTS_BUILD__FLAG="-DMOBILE_FFMPEG_LTS "
fi
echo "-fstrict-aliasing -fPIC -DANDROID ${LTS_BUILD__FLAG}-D__ANDROID__ -D__ANDROID_API__=${API}"
echo "-fstrict-aliasing -fPIC -DANDROID -D__ANDROID__ -D__ANDROID_API__=${API}"
}
get_arch_specific_cflags() {
@@ -217,56 +209,38 @@ get_arch_specific_cflags() {
get_size_optimization_cflags() {
local ARCH_OPTIMIZATION=""
ARCH_OPTIMIZATION=""
case ${ARCH} in
arm-v7a | arm-v7a-neon)
case $1 in
ffmpeg)
ARCH_OPTIMIZATION="-flto -O2 -ffunction-sections -fdata-sections"
;;
*)
ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections"
;;
esac
;;
arm64-v8a)
case $1 in
ffmpeg | nettle)
ARCH_OPTIMIZATION="-flto -fuse-ld=gold -O2 -ffunction-sections -fdata-sections"
;;
*)
ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections"
;;
esac
arm-v7a | arm-v7a-neon | arm64-v8a)
if [[ $1 -eq libwebp ]]; then
ARCH_OPTIMIZATION="-Os"
else
ARCH_OPTIMIZATION="-Os -finline-limit=64"
fi
;;
x86 | x86-64)
case $1 in
ffmpeg)
ARCH_OPTIMIZATION="-flto -Os -ffunction-sections -fdata-sections"
;;
*)
ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections"
;;
esac
if [[ $1 -eq libvpx ]]; then
ARCH_OPTIMIZATION="-O2"
else
ARCH_OPTIMIZATION="-O2 -finline-limit=300"
fi
;;
esac
local LIB_OPTIMIZATION=""
LIB_OPTIMIZATION=""
echo "${ARCH_OPTIMIZATION} ${LIB_OPTIMIZATION}"
}
get_app_specific_cflags() {
local APP_FLAGS=""
APP_FLAGS=""
case $1 in
xvidcore)
APP_FLAGS=""
;;
ffmpeg)
APP_FLAGS="-Wno-unused-function -DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD"
;;
shine)
ffmpeg | shine)
APP_FLAGS="-Wno-unused-function"
;;
soxr | snappy | libwebp)
@@ -284,61 +258,41 @@ get_app_specific_cflags() {
}
get_cflags() {
local ARCH_FLAGS=$(get_arch_specific_cflags)
local APP_FLAGS=$(get_app_specific_cflags $1)
local COMMON_FLAGS=$(get_common_cflags)
ARCH_FLAGS=$(get_arch_specific_cflags)
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
OPTIMIZATION_FLAGS=""
fi
local COMMON_INCLUDES=$(get_common_includes)
COMMON_INCLUDES=$(get_common_includes)
echo "${ARCH_FLAGS} ${APP_FLAGS} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_INCLUDES}"
}
get_cxxflags() {
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS="-Os -ffunction-sections -fdata-sections"
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
fi
case $1 in
gnutls)
echo "-std=c++11 -fno-rtti ${OPTIMIZATION_FLAGS}"
;;
ffmpeg)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
echo "-std=c++11 -fno-exceptions -fno-rtti -flto -O2 -ffunction-sections -fdata-sections"
else
echo "-std=c++11 -fno-exceptions -fno-rtti ${MOBILE_FFMPEG_DEBUG}"
fi
echo "-std=c++11 -fno-rtti"
;;
opencore-amr)
echo "${OPTIMIZATION_FLAGS}"
echo ""
;;
x265)
echo "-std=c++11 -fno-exceptions ${OPTIMIZATION_FLAGS}"
echo "-std=c++11 -fno-exceptions"
;;
*)
echo "-std=c++11 -fno-exceptions -fno-rtti ${OPTIMIZATION_FLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti"
;;
esac
}
get_common_linked_libraries() {
local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/${TARGET_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot/usr/lib -L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/lib"
local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/${TARGET_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/lib -L${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/lib"
case $1 in
ffmpeg)
if [[ -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
echo "-lc -lm -ldl -llog -lcamera2ndk -lmediandk -lc++_shared ${COMMON_LIBRARY_PATHS}"
else
echo "-lc -lm -ldl -llog -lc++_shared ${COMMON_LIBRARY_PATHS}"
fi
;;
tesseract)
ffmpeg | tesseract)
echo "-lc -lm -ldl -llog -lc++_shared ${COMMON_LIBRARY_PATHS}"
;;
libvpx)
@@ -353,24 +307,10 @@ get_common_linked_libraries() {
get_size_optimization_ldflags() {
case ${ARCH} in
arm64-v8a)
case $1 in
ffmpeg | nettle)
echo "-Wl,--gc-sections -flto -fuse-ld=gold -O2 -ffunction-sections -fdata-sections -finline-functions"
;;
*)
echo "-Wl,--gc-sections -Os -ffunction-sections -fdata-sections"
;;
esac
echo "-Wl,--gc-sections"
;;
*)
case $1 in
ffmpeg)
echo "-Wl,--gc-sections,--icf=safe -flto -O2 -ffunction-sections -fdata-sections -finline-functions"
;;
*)
echo "-Wl,--gc-sections,--icf=safe -Os -ffunction-sections -fdata-sections"
;;
esac
echo "-Wl,--gc-sections,--icf=safe"
;;
esac
}
@@ -396,13 +336,9 @@ get_arch_specific_ldflags() {
}
get_ldflags() {
local ARCH_FLAGS=$(get_arch_specific_ldflags)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS="$(get_size_optimization_ldflags $1)"
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
fi
local COMMON_LINKED_LIBS=$(get_common_linked_libraries $1)
ARCH_FLAGS=$(get_arch_specific_ldflags)
OPTIMIZATION_FLAGS=$(get_size_optimization_ldflags)
COMMON_LINKED_LIBS=$(get_common_linked_libraries $1)
echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS}"
}
@@ -795,10 +731,10 @@ EOF
}
create_zlib_package_config() {
ZLIB_VERSION=$(grep '#define ZLIB_VERSION' ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot/usr/include/zlib.h | grep -Eo '\".*\"' | sed -e 's/\"//g')
ZLIB_VERSION=$(grep '#define ZLIB_VERSION' ${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/include/zlib.h | grep -Eo '\".*\"' | sed -e 's/\"//g')
cat > "${INSTALL_PKG_CONFIG_DIR}/zlib.pc" << EOF
prefix=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot/usr
prefix=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr
exec_prefix=\${prefix}
libdir=${ANDROID_NDK_ROOT}/platforms/android-${API}/arch-${TOOLCHAIN_ARCH}/usr/lib
includedir=\${prefix}/include
@@ -876,9 +812,9 @@ download_gpl_library_source() {
GPL_LIB_DEST_DIR="libvidstab"
;;
x264)
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181224-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20181224-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20181224-2245-stable"
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20181015-2245-stable"
GPL_LIB_DEST_DIR="x264"
;;
x265)
@@ -964,7 +900,7 @@ download_gpl_library_source() {
}
set_toolchain_clang_paths() {
export PATH=$PATH:${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin
export PATH=$PATH:${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin
TARGET_HOST=$(get_target_host)
@@ -978,11 +914,38 @@ set_toolchain_clang_paths() {
export AS=${TARGET_HOST}-as
fi
case ${ARCH} in
arm64-v8a)
export ac_cv_c_bigendian=no
;;
esac
export LD=${TARGET_HOST}-ld
export RANLIB=${TARGET_HOST}-ranlib
export STRIP=${TARGET_HOST}-strip
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/pkgconfig"
export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc"
if [ ! -d ${INSTALL_PKG_CONFIG_DIR} ]; then
mkdir -p ${INSTALL_PKG_CONFIG_DIR}
fi
if [ ! -f ${ZLIB_PACKAGE_CONFIG_PATH} ]; then
create_zlib_package_config
fi
prepare_inline_sed
}
set_toolchain_gcc_paths() {
export PATH=$PATH:${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin
TARGET_HOST=$(get_target_host)
export AR=${TARGET_HOST}-ar
export CC=${TARGET_HOST}-gcc
export CXX=${TARGET_HOST}-g++
if [ "$1" == "x264" ]; then
export AS=${CC}
else
export AS=${TARGET_HOST}-as
fi
export LD=${TARGET_HOST}-ld
export RANLIB=${TARGET_HOST}-ranlib
@@ -1003,7 +966,7 @@ set_toolchain_clang_paths() {
}
create_toolchain() {
local TOOLCHAIN_DIR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-"${TOOLCHAIN}
local TOOLCHAIN_DIR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-"${TOOLCHAIN}
if [ ! -d ${TOOLCHAIN_DIR} ]; then
${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py --arch ${TOOLCHAIN_ARCH} --api ${API} --stl libc++ --install-dir ${TOOLCHAIN_DIR} || exit 1
+2 -2
View File
@@ -45,7 +45,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--without-docbook \
--without-xmlwf \
--enable-static \
@@ -53,7 +53,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./expat.pc ${INSTALL_PKG_CONFIG_DIR}
+9 -26
View File
@@ -73,8 +73,7 @@ case ${ARCH} in
;;
esac
CONFIGURE_POSTFIX=""
HIGH_PRIORITY_INCLUDES=""
CONFIGURE_POSTFIX="--disable-autodetect"
for library in {1..43}
do
@@ -138,7 +137,6 @@ do
CFLAGS+=" $(pkg-config --cflags libiconv)"
LDFLAGS+=" $(pkg-config --libs --static libiconv)"
CONFIGURE_POSTFIX+=" --enable-iconv"
HIGH_PRIORITY_INCLUDES+=" $(pkg-config --cflags libiconv)"
;;
libilbc)
CFLAGS+=" $(pkg-config --cflags libilbc)"
@@ -280,9 +278,7 @@ do
else
# THE FOLLOWING LIBRARIES SHOULD BE EXPLICITLY DISABLED TO PREVENT AUTODETECT
if [[ ${library} -eq 30 ]]; then
CONFIGURE_POSTFIX+=" --disable-sdl2"
elif [[ ${library} -eq 42 ]]; then
if [[ ${library} -eq 42 ]]; then
CONFIGURE_POSTFIX+=" --disable-zlib"
fi
fi
@@ -297,28 +293,20 @@ else
SIZE_OPTIONS="";
fi
# SET DEBUG OPTIONS
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
DEBUG_OPTIONS="--disable-debug";
else
DEBUG_OPTIONS="--enable-debug";
fi
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
echo -n -e "\n${LIB_NAME}: "
make distclean 2>/dev/null 1>/dev/null
export CFLAGS="${HIGH_PRIORITY_INCLUDES} ${CFLAGS}"
export CXXFLAGS="${CXXFLAGS}"
export LDFLAGS="${LDFLAGS}"
./configure \
--cross-prefix="${TARGET_HOST}-" \
--sysroot="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
--sysroot="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
--prefix="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
--pkg-config="${HOST_PKG_CONFIG_PATH}" \
--extra-cflags="${CFLAGS}" \
--extra-cxxflags="${CXXFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
--enable-version3 \
--arch="${TARGET_ARCH}" \
--cpu="${TARGET_CPU}" \
@@ -327,19 +315,14 @@ export LDFLAGS="${LDFLAGS}"
--enable-cross-compile \
--enable-pic \
--enable-jni \
--enable-lto \
--enable-optimizations \
--enable-swscale \
--enable-shared \
--disable-v4l2-m2m \
--disable-outdev=v4l2 \
--disable-outdev=fbdev \
--disable-indev=v4l2 \
--disable-indev=fbdev \
--enable-v4l2-m2m \
${SIZE_OPTIONS} \
--disable-openssl \
--disable-xmm-clobber-test \
${DEBUG_OPTIONS} \
--disable-debug \
--disable-neon-clobber-test \
--disable-programs \
--disable-postproc \
@@ -374,7 +357,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
make -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
echo "failed"
+1 -1
View File
@@ -57,7 +57,7 @@ fi
--disable-docs \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_fontconfig_package_config "2.13.1"
+2 -2
View File
@@ -47,7 +47,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/lib
--with-pic \
--with-zlib \
--with-png \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--without-harfbuzz \
--without-bzip2 \
--without-fsref \
@@ -60,7 +60,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/lib
--disable-mmap \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_freetype_package_config "22.0.16"
+2 -2
View File
@@ -46,7 +46,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
@@ -54,7 +54,7 @@ fi
--disable-deprecated \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -46,13 +46,13 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_giflib_package_config "5.1.4"
+2 -2
View File
@@ -45,7 +45,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-assembly \
--disable-shared \
@@ -53,7 +53,7 @@ fi
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_gmp_package_config "6.1.2"
+2 -2
View File
@@ -56,7 +56,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--with-included-libtasn1 \
--with-included-unistring \
--without-idn \
@@ -75,7 +75,7 @@ fi
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_gnutls_package_config "3.5.19"
+8 -8
View File
@@ -47,16 +47,16 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DENABLE_STATIC=1 \
-DENABLE_SHARED=0 \
@@ -66,7 +66,7 @@ cmake -Wno-dev \
-DWITH_JAVA=0 \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ${BASEDIR}/src/${LIB_NAME}/build/pkgscripts/libjpeg.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -46,13 +46,13 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./src/kvazaar.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -46,7 +46,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--with-libiconv-prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/libiconv \
--enable-static \
--disable-shared \
@@ -57,7 +57,7 @@ fi
--disable-gtktest \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libmp3lame_package_config "3.100"
+1 -1
View File
@@ -74,7 +74,7 @@ fi
--disable-programs \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp lept.pc ${INSTALL_PKG_CONFIG_DIR}
+8 -8
View File
@@ -67,16 +67,16 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
${ARCH_OPTIONS} \
-DENABLE_TESTS=0 \
@@ -86,7 +86,7 @@ cmake -Wno-dev \
-DAOM_TARGET_CPU=generic \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libaom_package_config "1.0.0"
+2 -2
View File
@@ -59,7 +59,7 @@ esac
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--disable-libtool-lock \
--enable-static \
--disable-shared \
@@ -71,7 +71,7 @@ esac
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,14 +45,14 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-rpath \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libiconv_package_config "1.15"
+2 -2
View File
@@ -45,13 +45,13 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./libilbc.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,13 +45,13 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ogg.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -61,7 +61,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
@@ -70,7 +70,7 @@ fi
${CPU_SPECIFIC_OPTIONS} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,7 +45,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
@@ -55,7 +55,7 @@ fi
--disable-external-libs \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -55,7 +55,7 @@ fi
--disable-valgrind-testing \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp theoradec.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,13 +45,13 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# AUTO-GENERATED PKG-CONFIG FILE IS WRONG. CREATING IT MANUALLY
create_uuid_package_config "1.0.3"
+7 -7
View File
@@ -57,22 +57,22 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DUSE_OMP=0 \
${ASM_FLAGS} \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp vidstab.pc ${INSTALL_PKG_CONFIG_DIR}
+7 -8
View File
@@ -25,7 +25,7 @@ fi
# PREPARING PATHS & DEFINING ${INSTALL_PKG_CONFIG_DIR}
LIB_NAME="libvorbis"
set_toolchain_clang_paths ${LIB_NAME}
set_toolchain_gcc_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
@@ -37,16 +37,15 @@ cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# -mno-ieee-fp option is not compatible with clang. removing it
${SED_INLINE} 's/\-mno-ieee-fp//g' ${BASEDIR}/src/${LIB_NAME}/configure.ac
# ALWAYS RECONFIGURE
autoreconf_library ${LIB_NAME}
# RECONFIGURING IF REQUESTED
if [[ ${RECONF_libvorbis} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--with-ogg-includes=${BASEDIR}/prebuilt/android-$(get_target_build)/libogg/include \
--with-ogg-libraries=${BASEDIR}/prebuilt/android-$(get_target_build)/libogg/lib \
--enable-static \
@@ -57,7 +56,7 @@ autoreconf_library ${LIB_NAME}
--disable-oggtest \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libvorbis_package_config "1.3.6"
+1 -1
View File
@@ -98,7 +98,7 @@ make distclean 2>/dev/null 1>/dev/null
--disable-debug-libs \
--disable-internal-stats || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+10 -28
View File
@@ -42,55 +42,37 @@ fi
mkdir build;
cd build
# OVERRIDING INCLUDE PATH ORDER
CFLAGS="-I${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/include \
-I${BASEDIR}/prebuilt/android-$(get_target_build)/jpeg/include \
-I${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/include \
-I${BASEDIR}/prebuilt/android-$(get_target_build)/tiff/include $CFLAGS"
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DGIF_INCLUDE_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/include" \
-DGIF_LIBRARY="${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/lib" \
-DJPEG_INCLUDE_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/jpeg/include" \
-DJPEG_LIBRARY="${BASEDIR}/prebuilt/android-$(get_target_build)/jpeg/lib" \
-DPNG_PNG_INCLUDE_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/include" \
-DPNG_LIBRARY="${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/lib" \
-DTIFF_INCLUDE_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/tiff/include" \
-DTIFF_LIBRARY="${BASEDIR}/prebuilt/android-$(get_target_build)/tiff/lib" \
-DZLIB_INCLUDE_DIR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot/usr/include" \
-DZLIB_INCLUDE_DIR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot/usr/include" \
-DZLIB_LIBRARY="${ANDROID_NDK_ROOT}/platform/android-${API}/arch-$(get_target_build)/usr/lib" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DGLUT_INCLUDE_DIR= \
-DGLUT_cocoa_LIBRARY= \
-DGLUT_glut_LIBRARY= \
-DOPENGL_INCLUDE_DIR= \
-DSDLMAIN_LIBRARY= \
-DSDL_INCLUDE_DIR= \
-DWEBP_BUILD_CWEBP=0 \
-DWEBP_BUILD_DWEBP=0 \
-DWEBP_BUILD_EXTRAS=0 \
-DWEBP_BUILD_GIF2WEBP=0 \
-DWEBP_BUILD_IMG2WEBP=0 \
-DWEBP_BUILD_WEBPMUX=0 \
-DWEBP_BUILD_WEBPINFO=0 \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libwebp_package_config "1.0.1"
create_libwebp_package_config "1.0.0"
make install || exit 1
+3 -3
View File
@@ -40,7 +40,7 @@ make distclean 2>/dev/null 1>/dev/null
# NOTE THAT PYTHON IS DISABLED DUE TO THE FOLLOWING ERROR
#
# .../android-sdk/ndk-bundle/toolchains/mobile-ffmpeg-api-21-arm/include/python2.7/pyport.h:1029:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
# .../android-sdk/ndk-bundle/toolchains/mobile-ffmpeg-arm/include/python2.7/pyport.h:1029:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
# #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#
@@ -50,7 +50,7 @@ autoreconf_library ${LIB_NAME}
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--with-zlib \
--with-iconv=${BASEDIR}/prebuilt/android-$(get_target_build)/libiconv/lib \
--with-sax1 \
@@ -62,7 +62,7 @@ autoreconf_library ${LIB_NAME}
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libxml2_package_config "2.9.8"
+1 -1
View File
@@ -67,7 +67,7 @@ fi
${OPTIONAL_CPU_SUPPORT} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,14 +45,14 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp amrwb/*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,7 +45,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--enable-rtcd \
--enable-asm \
@@ -59,7 +59,7 @@ fi
--disable-ambisonics \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./opus.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -47,13 +47,13 @@ fi
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--without-x \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,13 +45,13 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+8 -8
View File
@@ -47,16 +47,16 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DSNAPPY_BUILD_TESTS=0 \
-DHAVE_LIBLZO2=0 \
@@ -64,7 +64,7 @@ cmake -Wno-dev \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_snappy_package_config "1.1.7"
+8 -8
View File
@@ -47,16 +47,16 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DBUILD_TESTS=0 \
-DWITH_DEV_TRACE=0 \
@@ -66,7 +66,7 @@ cmake -Wno-dev \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_soxr_package_config "0.1.3"
+2 -2
View File
@@ -51,14 +51,14 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static ${OPTIONAL_CPU_SUPPORT} \
--disable-shared \
--disable-binaries \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -51,7 +51,7 @@ export ac_cv_c_bigendian=no
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
@@ -64,7 +64,7 @@ export ac_cv_c_bigendian=no
${SED_INLINE} 's/\-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_tesseract_package_config "3.05.02"
+2 -2
View File
@@ -45,7 +45,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--with-jpeg-include-dir=${BASEDIR}/prebuilt/android-$(get_target_build)/jpeg/include \
--with-jpeg-lib-dir=${BASEDIR}/prebuilt/android-$(get_target_build)/jpeg/lib \
--enable-static \
@@ -57,7 +57,7 @@ fi
--disable-lzma \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -49,13 +49,13 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -45,7 +45,7 @@ fi
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--with-pic \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--with-sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--without-iconv \
--enable-static \
--disable-shared \
@@ -54,7 +54,7 @@ fi
--disable-tests \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -67,13 +67,13 @@ esac
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
--enable-pic \
--sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot \
--sysroot=${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot \
--enable-static \
--disable-cli \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp x264.pc ${INSTALL_PKG_CONFIG_DIR}
+8 -8
View File
@@ -76,16 +76,16 @@ cmake -Wno-dev \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
-DCMAKE_SYSROOT="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_FIND_ROOT_PATH="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/sysroot" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CC" \
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$CXX" \
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$LD" \
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AR" \
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-${TOOLCHAIN}/bin/$AS" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DSTATIC_LINK_CRT=1 \
-DENABLE_PIC=1 \
@@ -94,7 +94,7 @@ cmake -Wno-dev \
-DCMAKE_SYSTEM_PROCESSOR="${ARCH}" \
-DENABLE_SHARED=0 ../source || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_x265_package_config "2.9"
+1 -1
View File
@@ -57,7 +57,7 @@ esac
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_xvidcore_package_config "1.3.5"
+1 -1
View File
@@ -65,7 +65,7 @@ cmake -Wno-dev \
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp libchromaprint.pc ${INSTALL_PKG_CONFIG_DIR}
+52 -152
View File
@@ -68,33 +68,6 @@ get_library_name() {
esac
}
get_package_config_file_name() {
case $1 in
1) echo "freetype2" ;;
5) echo "libmp3lame" ;;
8) echo "theora" ;;
9) echo "vorbis" ;;
10) echo "vpx" ;;
12) echo "libxml-2.0" ;;
13) echo "opencore-amrnb" ;;
21) echo "vidstab" ;;
26) echo "aom" ;;
27) echo "libchromaprint" ;;
29) echo "sdl2" ;;
32) echo "libjpeg" ;;
33) echo "ogg" ;;
35) echo "uuid" ;;
37) echo "libtiff-4" ;;
39) echo "sndfile" ;;
40) echo "lept" ;;
*) echo $(get_library_name $1)
esac
}
to_capital_case() {
echo "$(echo ${1:0:1} | tr '[a-z]' '[A-Z]')${1:1}"
}
get_static_archive_name() {
case $1 in
5) echo "libmp3lame.a" ;;
@@ -177,12 +150,18 @@ get_sdk_path() {
}
get_min_version_cflags() {
local min_version=${IOS_MIN_VERSION}
if [ "$1" == "gnutls" ]; then
min_version=${GNUTLS_IOS_MIN_VERSION}
fi
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
echo "-miphoneos-version-min=${IOS_MIN_VERSION}"
echo "-miphoneos-version-min=${min_version}"
;;
i386 | x86-64)
echo "-mios-simulator-version-min=${IOS_MIN_VERSION}"
echo "-mios-simulator-version-min=${min_version}"
;;
esac
}
@@ -192,16 +171,12 @@ get_common_includes() {
}
get_common_cflags() {
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
local LTS_BUILD__FLAG="-DMOBILE_FFMPEG_LTS "
fi
case ${ARCH} in
i386 | x86-64)
echo "-fstrict-aliasing -DIOS ${LTS_BUILD__FLAG}-isysroot ${SDK_PATH}"
echo "-fstrict-aliasing -DIOS -isysroot ${SDK_PATH}"
;;
*)
echo "-fstrict-aliasing -fembed-bitcode -DIOS ${LTS_BUILD__FLAG}-isysroot ${SDK_PATH}"
echo "-fstrict-aliasing -fembed-bitcode -DIOS -isysroot ${SDK_PATH}"
;;
esac
}
@@ -231,55 +206,22 @@ get_arch_specific_cflags() {
get_size_optimization_cflags() {
local ARCH_OPTIMIZATION=""
ARCH_OPTIMIZATION=""
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
case $1 in
x264 | x265)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
ffmpeg | mobile-ffmpeg)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
*)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
esac
if [[ $1 -eq libwebp ]]; then
ARCH_OPTIMIZATION="-Os -Wno-ignored-optimization-argument"
else
ARCH_OPTIMIZATION="-Os -finline-limit=64 -Wno-ignored-optimization-argument"
fi
;;
i386 | x86-64)
case $1 in
x264 | ffmpeg)
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
x265)
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
*)
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
esac
;;
esac
if [[ $1 -eq libvpx ]]; then
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
else
ARCH_OPTIMIZATION="-O2 -finline-limit=300 -Wno-ignored-optimization-argument"
fi
echo "${ARCH_OPTIMIZATION}"
}
get_size_optimization_asm_cflags() {
local ARCH_OPTIMIZATION=""
case $1 in
jpeg | ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
ARCH_OPTIMIZATION="-Oz"
;;
i386 | x86-64)
ARCH_OPTIMIZATION="-O2"
;;
esac
;;
*)
ARCH_OPTIMIZATION=$(get_size_optimization_cflags $1)
;;
esac
@@ -288,7 +230,7 @@ get_size_optimization_asm_cflags() {
get_app_specific_cflags() {
local APP_FLAGS=""
APP_FLAGS=""
case $1 in
fontconfig)
case ${ARCH} in
@@ -301,7 +243,7 @@ get_app_specific_cflags() {
esac
;;
ffmpeg)
APP_FLAGS="-Wno-unused-function -Wno-deprecated-declarations"
APP_FLAGS="-Wno-unused-function -DPIC"
;;
kvazaar)
APP_FLAGS="-std=gnu99 -Wno-unused-function"
@@ -315,9 +257,6 @@ get_app_specific_cflags() {
mobile-ffmpeg)
APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc"
;;
sdl2)
APP_FLAGS="-DPIC -Wno-unused-function -D__IPHONEOS__"
;;
shine)
APP_FLAGS="-Wno-unused-function"
;;
@@ -336,47 +275,42 @@ get_app_specific_cflags() {
}
get_cflags() {
local ARCH_FLAGS=$(get_arch_specific_cflags)
local APP_FLAGS=$(get_app_specific_cflags $1)
local COMMON_FLAGS=$(get_common_cflags)
ARCH_FLAGS=$(get_arch_specific_cflags)
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
OPTIMIZATION_FLAGS=""
fi
local MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
local COMMON_INCLUDES=$(get_common_includes)
MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
COMMON_INCLUDES=$(get_common_includes)
echo "${ARCH_FLAGS} ${APP_FLAGS} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS} ${MIN_VERSION_FLAGS} ${COMMON_INCLUDES}"
}
get_asmflags() {
local ARCH_FLAGS=$(get_arch_specific_cflags)
local APP_FLAGS=$(get_app_specific_cflags $1)
local COMMON_FLAGS=$(get_common_cflags)
ARCH_FLAGS=$(get_arch_specific_cflags)
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS=$(get_size_optimization_asm_cflags $1)
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
OPTIMIZATION_FLAGS=""
fi
local MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
local COMMON_INCLUDES=$(get_common_includes)
MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
COMMON_INCLUDES=$(get_common_includes)
echo "${ARCH_FLAGS} ${APP_FLAGS} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS} ${MIN_VERSION_FLAGS} ${COMMON_INCLUDES}"
}
get_cxxflags() {
local COMMON_CFLAGS="$(get_common_cflags $1) $(get_common_includes $1) $(get_arch_specific_cflags) $(get_min_version_cflags $1)"
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS="-Oz"
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
fi
local BITCODE_FLAGS=""
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
local BITCODE_FLAGS="-fembed-bitcode"
BITCODE_FLAGS="-fembed-bitcode"
;;
esac
@@ -385,19 +319,19 @@ get_cxxflags() {
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
gnutls)
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
opencore-amr)
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
libwebp | xvidcore)
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS}"
;;
libaom)
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
*)
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
;;
esac
}
@@ -410,31 +344,6 @@ get_common_ldflags() {
echo "-isysroot ${SDK_PATH}"
}
get_size_optimization_ldflags() {
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
case $1 in
ffmpeg | mobile-ffmpeg)
echo "-Oz -dead_strip"
;;
*)
echo "-Oz -dead_strip"
;;
esac
;;
*)
case $1 in
ffmpeg)
echo "-O2"
;;
*)
echo "-O2"
;;
esac
;;
esac
}
get_arch_specific_ldflags() {
case ${ARCH} in
armv7)
@@ -459,28 +368,23 @@ get_arch_specific_ldflags() {
}
get_ldflags() {
local ARCH_FLAGS=$(get_arch_specific_ldflags)
local LINKED_LIBRARIES=$(get_common_linked_libraries)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
local OPTIMIZATION_FLAGS="$(get_size_optimization_ldflags $1)"
else
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
fi
local COMMON_FLAGS=$(get_common_ldflags)
ARCH_FLAGS=$(get_arch_specific_ldflags)
LINKED_LIBRARIES=$(get_common_linked_libraries)
COMMON_FLAGS=$(get_common_ldflags)
case $1 in
mobile-ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode ${OPTIMIZATION_FLAGS}"
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode -ObjC"
;;
*)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS}"
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS}"
;;
esac
;;
*)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS}"
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS}"
;;
esac
}
@@ -917,9 +821,9 @@ download_gpl_library_source() {
GPL_LIB_DEST_DIR="libvidstab"
;;
x264)
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181224-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20181224-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20181224-2245-stable"
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_FILE="x264-snapshot-20181015-2245-stable.tar.bz2"
GPL_LIB_ORIG_DIR="x264-snapshot-20181015-2245-stable"
GPL_LIB_DEST_DIR="x264"
;;
x265)
@@ -1011,10 +915,6 @@ set_toolchain_clang_paths() {
exit 1
fi
(chmod +x ${MOBILE_FFMPEG_TMPDIR}/gas-preprocessor.pl 1>>${BASEDIR}/build.log 2>&1) || exit 1
# patch gas-preprocessor.pl against the following warning
# Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/(?:ld|st)\d\s+({ <-- HERE \s*v(\d+)\.(\d[bhsdBHSD])\s*-\s*v(\d+)\.(\d[bhsdBHSD])\s*})/ at /Users/taner/Projects/mobile-ffmpeg/.tmp/gas-preprocessor.pl line 1065.
sed -i .tmp "s/s\+({/s\+(\\\\{/g;s/s\*})/s\*\\\\})/g" ${MOBILE_FFMPEG_TMPDIR}/gas-preprocessor.pl
fi
LOCAL_GAS_PREPROCESSOR="${MOBILE_FFMPEG_TMPDIR}/gas-preprocessor.pl"
+1 -1
View File
@@ -58,7 +58,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./expat.pc ${INSTALL_PKG_CONFIG_DIR}
+16 -32
View File
@@ -86,7 +86,7 @@ case ${ARCH} in
;;
esac
CONFIGURE_POSTFIX=""
CONFIGURE_POSTFIX="--disable-autodetect"
for library in {1..47}
do
@@ -312,8 +312,6 @@ do
# THE FOLLOWING LIBRARIES SHOULD BE EXPLICITLY DISABLED TO PREVENT AUTODETECT
if [[ ${library} -eq 8 ]]; then
CONFIGURE_POSTFIX+=" --disable-iconv"
elif [[ ${library} -eq 30 ]]; then
CONFIGURE_POSTFIX+=" --disable-sdl2"
elif [[ ${library} -eq 42 ]]; then
CONFIGURE_POSTFIX+=" --disable-zlib"
elif [[ ${library} -eq 43 ]]; then
@@ -330,8 +328,12 @@ do
fi
done
# ALWAYS BUILD STATIC LIBRARIES
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
# BUILD SHARED (DEFAULT) OR STATIC LIBRARIES
if [[ -z ${MOBILE_FFMPEG_STATIC} ]]; then
BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static";
else
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
fi
# OPTIMIZE FOR SPEED INSTEAD OF SIZE
if [[ -z ${MOBILE_FFMPEG_OPTIMIZED_FOR_SPEED} ]]; then
@@ -340,39 +342,23 @@ else
SIZE_OPTIONS="";
fi
# SET DEBUG OPTIONS
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
DEBUG_OPTIONS="--disable-debug";
else
DEBUG_OPTIONS="--enable-debug";
fi
# CFLAGS PARTS
ARCH_CFLAGS=$(get_arch_specific_cflags);
APP_CFLAGS=$(get_app_specific_cflags ${LIB_NAME});
COMMON_CFLAGS=$(get_common_cflags);
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
OPTIMIZATION_CFLAGS="$(get_size_optimization_cflags ${LIB_NAME})"
else
OPTIMIZATION_CFLAGS="${MOBILE_FFMPEG_DEBUG}"
fi
OPTIMIZATION_CFLAGS=$(get_size_optimization_cflags ${LIB_NAME});
MIN_VERSION_CFLAGS=$(get_min_version_cflags);
COMMON_INCLUDES=$(get_common_includes);
# LDFLAGS PARTS
ARCH_LDFLAGS=$(get_arch_specific_ldflags);
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
OPTIMIZATION_FLAGS="$(get_size_optimization_ldflags ${LIB_NAME})"
else
OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
fi
LINKED_LIBRARIES=$(get_common_linked_libraries);
COMMON_LDFLAGS=$(get_common_ldflags);
# REORDERED FLAGS
export CFLAGS="${ARCH_CFLAGS} ${APP_CFLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS} ${MIN_VERSION_CFLAGS}${FFMPEG_CFLAGS} ${COMMON_INCLUDES}"
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS="${ARCH_LDFLAGS}${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS} ${OPTIMIZATION_FLAGS}"
CFLAGS="${ARCH_CFLAGS} ${APP_CFLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS} ${MIN_VERSION_CFLAGS} ${FFMPEG_CFLAGS} ${COMMON_INCLUDES}"
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS="${ARCH_LDFLAGS} ${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
@@ -383,6 +369,9 @@ make distclean 2>/dev/null 1>/dev/null
./configure \
--sysroot=${SDK_PATH} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--extra-cflags="${CFLAGS}" \
--extra-cxxflags="${CXXFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
--enable-version3 \
--arch="${TARGET_ARCH}" \
--cpu="${TARGET_CPU}" \
@@ -402,14 +391,9 @@ make distclean 2>/dev/null 1>/dev/null
--enable-swscale \
${BUILD_LIBRARY_OPTIONS} \
${SIZE_OPTIONS} \
--disable-v4l2-m2m \
--disable-outdev=v4l2 \
--disable-outdev=fbdev \
--disable-indev=v4l2 \
--disable-indev=fbdev \
--disable-openssl \
--disable-xmm-clobber-test \
${DEBUG_OPTIONS} \
--disable-debug \
--disable-neon-clobber-test \
--disable-programs \
--disable-postproc \
@@ -441,7 +425,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
make -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
echo "failed"
+1 -1
View File
@@ -67,7 +67,7 @@ fi
rm -f ${BASEDIR}/src/${LIB_NAME}/test/test-bz106632.c
cp ${BASEDIR}/src/${LIB_NAME}/test/test-bz106618.c ${BASEDIR}/src/${LIB_NAME}/test/test-bz106632.c
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_fontconfig_package_config "2.13.1"
+1 -1
View File
@@ -65,7 +65,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libp
--disable-mmap \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_freetype_package_config "22.0.16"
+1 -1
View File
@@ -59,7 +59,7 @@ fi
--disable-deprecated \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -57,7 +57,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_giflib_package_config "5.1.4"
+1 -1
View File
@@ -66,7 +66,7 @@ esac
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_gmp_package_config "6.1.2"
+1 -1
View File
@@ -95,7 +95,7 @@ fi
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_gnutls_package_config "3.5.19"
+2 -6
View File
@@ -38,7 +38,6 @@ TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export ASM_FLAGS=$(get_asmflags ${LIB_NAME})
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
@@ -49,9 +48,6 @@ fi
mkdir build || exit 1
cd build || exit 1
# fixing asm flags
${SED_INLINE} 's/${CMAKE_C_FLAGS} ${CMAKE_ASM_FLAGS}/${CMAKE_ASM_FLAGS}/g' ${BASEDIR}/src/${LIB_NAME}/simd/CMakeLists.txt
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCMAKE_C_FLAGS="${CFLAGS}" \
@@ -65,7 +61,7 @@ cmake -Wno-dev \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
-DCMAKE_AR="$AR" \
-DCMAKE_ASM_FLAGS="$ASM_FLAGS" \
-DCMAKE_AS="$AS" \
-DENABLE_PIC=1 \
-DENABLE_STATIC=1 \
-DENABLE_SHARED=0 \
@@ -76,7 +72,7 @@ cmake -Wno-dev \
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ${BASEDIR}/src/${LIB_NAME}/build/pkgscripts/libjpeg.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -64,7 +64,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./src/kvazaar.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -62,7 +62,7 @@ fi
--disable-gtktest \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libmp3lame_package_config "3.100"
+1 -1
View File
@@ -79,7 +79,7 @@ fi
--disable-programs \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp lept.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -6
View File
@@ -49,14 +49,10 @@ case ${ARCH} in
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/armv7s-ios.cmake"
ARCH_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
;;
arm64)
arm64 | arm64e)
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/arm64-ios.cmake"
ARCH_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
;;
arm64e)
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/arm-ios-common.cmake"
ARCH_OPTIONS="-DAOM_TARGET_CPU=arm64 -DCMAKE_SYSTEM_PROCESSOR=arm64e -DCMAKE_OSX_ARCHITECTURES=arm64e -DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
;;
i386)
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86-ios-simulator.cmake"
ARCH_OPTIONS="-DARCH_X86=1 -DENABLE_SSE=1 -DHAVE_SSE=1 -DENABLE_SSE3=1 -DHAVE_SSE3=1"
@@ -99,7 +95,7 @@ cmake -Wno-dev \
-DCONFIG_UNIT_TESTS=0 \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ${BASEDIR}/src/${LIB_NAME}/cmake-build/aom.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -62,7 +62,7 @@ fi
--disable-coretext \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -57,7 +57,7 @@ fi
--disable-rpath \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libiconv_package_config "1.15"
+1 -1
View File
@@ -56,7 +56,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./libilbc.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -56,7 +56,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ogg.pc ${INSTALL_PKG_CONFIG_DIR}
+2 -2
View File
@@ -70,9 +70,9 @@ fi
${CPU_SPECIFIC_OPTIONS} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libpng_package_config "1.6.36"
create_libpng_package_config "1.6.35"
make install || exit 1
+1 -1
View File
@@ -60,7 +60,7 @@ fi
--disable-external-libs \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -60,7 +60,7 @@ fi
--disable-valgrind-testing \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp theoradec.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -1
View File
@@ -56,7 +56,7 @@ fi
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# AUTO-GENERATED PKG-CONFIG FILE IS WRONG. CREATING IT MANUALLY
create_uuid_package_config "1.0.3"
+1 -1
View File
@@ -76,7 +76,7 @@ cmake -Wno-dev \
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp vidstab.pc ${INSTALL_PKG_CONFIG_DIR}
+1 -5
View File
@@ -48,10 +48,6 @@ if [[ ${RECONF_libvorbis} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
# -force_cpusubtype_ALL FLAG REMOVED DUE TO THE FOLLOWING ERROR
# ld: -force_cpusubtype_ALL and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
@@ -64,7 +60,7 @@ ${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure
--disable-oggtest \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libvorbis_package_config "1.3.6"
+3 -2
View File
@@ -61,7 +61,8 @@ case ${ARCH} in
arm64e)
TARGET="arm64-darwin-gcc"
ASM_FLAGS="--disable-runtime-cpu-detect --enable-neon"
# arm64e assembly support disabled
ASM_FLAGS="--disable-runtime-cpu-detect"
;;
i386)
TARGET="x86-iphonesimulator-gcc"
@@ -125,7 +126,7 @@ make distclean 2>/dev/null 1>/dev/null
--disable-debug-libs \
--disable-internal-stats || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
+12 -30
View File
@@ -47,12 +47,6 @@ fi
mkdir build;
cd build
# OVERRIDING INCLUDE PATH ORDER
CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/include \
-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/include \
-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/include \
-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/include $CFLAGS"
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCMAKE_C_FLAGS="${CFLAGS}" \
@@ -67,34 +61,22 @@ cmake -Wno-dev \
-DCMAKE_LINKER="$LD" \
-DCMAKE_AR="$AR" \
-DCMAKE_AS="$AS" \
-DGIF_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/include \
-DJPEG_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/include \
-DJPEG_LIBRARY=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/lib \
-DPNG_PNG_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/include \
-DPNG_LIBRARY=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/lib \
-DTIFF_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/include \
-DTIFF_LIBRARY=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/lib \
-DZLIB_INCLUDE_DIR=${SDK_PATH}/usr/include \
-DZLIB_LIBRARY=${SDK_PATH}/usr/lib \
-DGLUT_INCLUDE_DIR= \
-DGLUT_cocoa_LIBRARY= \
-DGLUT_glut_LIBRARY= \
-DOPENGL_INCLUDE_DIR= \
-DSDLMAIN_LIBRARY= \
-DSDL_INCLUDE_DIR= \
-DWEBP_BUILD_CWEBP=0 \
-DWEBP_BUILD_DWEBP=0 \
-DWEBP_BUILD_EXTRAS=0 \
-DWEBP_BUILD_GIF2WEBP=0 \
-DWEBP_BUILD_IMG2WEBP=0 \
-DWEBP_BUILD_WEBPMUX=0 \
-DWEBP_BUILD_WEBPINFO=0 \
-DGIF_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/include" \
-DGIF_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/lib" \
-DJPEG_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/include" \
-DJPEG_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/lib" \
-DPNG_PNG_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/include" \
-DPNG_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/lib" \
-DTIFF_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/include" \
-DTIFF_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/lib" \
-DZLIB_INCLUDE_DIR="${SDK_PATH}/usr/include" \
-DZLIB_LIBRARY="${SDK_PATH}/usr/lib" \
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libwebp_package_config "1.0.1"
create_libwebp_package_config "1.0.0"
make install || exit 1
+1 -1
View File
@@ -61,7 +61,7 @@ autoreconf_library ${LIB_NAME}
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
create_libxml2_package_config "2.9.8"
+7 -3
View File
@@ -42,8 +42,12 @@ export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/lib -framework Foundation -framework CoreVideo -lavdevice"
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
# ALWAYS BUILD STATIC LIBRARIES
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
# BUILD SHARED (DEFAULT) OR STATIC LIBRARIES
if [[ -z ${MOBILE_FFMPEG_STATIC} ]]; then
BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static";
else
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
fi
cd ${BASEDIR}/ios || exit 1
@@ -82,7 +86,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
make -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
echo "failed"
+1 -1
View File
@@ -72,7 +72,7 @@ fi
${OPTIONAL_CPU_SUPPORT} \
--host=${TARGET_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# MANUALLY COPY PKG-CONFIG FILES
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}

Some files were not shown because too many files have changed in this diff Show More