Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f9813877f | |||
| c5aeb63278 | |||
| 64e4f81ff6 | |||
| 85aa254fb0 | |||
| 76b6e82993 | |||
| 8c756b8033 | |||
| 1c6963374c | |||
| 3a18694799 | |||
| edb7c6bce2 | |||
| a7de983214 | |||
| 11b0155110 | |||
| 16a55ccd0e | |||
| 92c81bedaa | |||
| 73d05ee3a2 | |||
| 836d1450db | |||
| b6b29cc2c2 | |||
| c306df44af | |||
| d1ac2b37b6 | |||
| c4f30fb621 | |||
| d88571e30f | |||
| 95c4b2eb75 | |||
| 5555f759c0 | |||
| 9c87ef0546 | |||
| 69cee669d4 | |||
| 056be3480d | |||
| c8a1f43446 | |||
| 7b8c0e528a | |||
| a1bed50fa7 | |||
| 3e98adc541 | |||
| c47e6e7a70 | |||
| afd7cc625a | |||
| f5a5ec85b8 | |||
| 733566386b | |||
| 08b07197f2 | |||
| 0602d3ed42 | |||
| 17a21867e0 | |||
| 5e3ed008fd | |||
| d5f6327634 | |||
| e71f879506 | |||
| 9d1a7f9893 | |||
| fb87f6fb93 | |||
| 84f64466c6 | |||
| c29766c11d | |||
| 9ddb8e716a | |||
| 938ccf28b2 | |||
| 8351675692 | |||
| 66d0e2a43d | |||
| 1ef044c87f | |||
| fd57251531 | |||
| a145bb6e06 | |||
| 1a33b54893 | |||
| b77614be2e | |||
| 3dcff03844 | |||
| 7294c21d85 | |||
| 2c579d33cb | |||
| 703242e65c | |||
| 45ff661719 | |||
| ffc9f609f0 | |||
| 30a90c1318 | |||
| 13ac2cdc70 |
@@ -1,4 +1,4 @@
|
||||
# MobileFFmpeg [](https://gitter.im/mobile-ffmpeg/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)   
|
||||
# MobileFFmpeg [](https://gitter.im/mobile-ffmpeg/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)   
|
||||
|
||||
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` and `v4.1` releases
|
||||
- FFmpeg `v3.4.x`, `v4.0.x`, `v4.1` and `v4.2-dev` 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,7 +18,6 @@ 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`
|
||||
@@ -28,17 +27,18 @@ 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`, `i386` and `x86_64` architectures
|
||||
- Builds `armv7`, `armv7s`, `arm64`, `arm64e`, `i386` and `x86_64` architectures
|
||||
- Supports `bzip2`, `zlib` system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` system frameworks
|
||||
- Camera and microphone access
|
||||
- Objective-C API
|
||||
- Camera access
|
||||
- `ARC` enabled library
|
||||
- Built with `-fembed-bitcode` flag
|
||||
- Creates IOS shared/dynamic universal (fat) library
|
||||
- Creates IOS static universal (fat) library
|
||||
- Creates IOS dynamic framework for IOS 8 or later
|
||||
- Creates static framework and static universal (fat) library (.a)
|
||||
- Supports Xcode 7.3.1 or later
|
||||
|
||||
### 2. Using
|
||||
@@ -69,10 +69,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>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>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>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>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><sup>android system libraries</sup></td>
|
||||
@@ -92,12 +92,13 @@ 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:3.1'
|
||||
dependencies {
|
||||
implementation 'com.arthenica:mobile-ffmpeg-full:4.2'
|
||||
}
|
||||
```
|
||||
|
||||
@@ -129,15 +130,20 @@ 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. List enabled external libraries.
|
||||
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.
|
||||
```
|
||||
List<String> externalLibraries = Config.getExternalLibraries();
|
||||
```
|
||||
|
||||
7. Enable log callback.
|
||||
8. Enable log callback.
|
||||
```
|
||||
Config.enableLogCallback(new LogCallback() {
|
||||
public void apply(LogMessage message) {
|
||||
@@ -146,7 +152,7 @@ There are eight different binary packages. Below you can see which system librar
|
||||
});
|
||||
```
|
||||
|
||||
8. Enable statistics callback.
|
||||
9. Enable statistics callback.
|
||||
```
|
||||
Config.enableStatisticsCallback(new StatisticsCallback() {
|
||||
public void apply(Statistics newStatistics) {
|
||||
@@ -155,12 +161,12 @@ There are eight different binary packages. Below you can see which system librar
|
||||
});
|
||||
```
|
||||
|
||||
9. Set log level.
|
||||
10. Set log level.
|
||||
```
|
||||
Config.setLogLevel(Level.AV_LOG_FATAL);
|
||||
```
|
||||
|
||||
10. Register custom fonts directory.
|
||||
11. Register custom fonts directory.
|
||||
```
|
||||
Config.setFontDirectory(this, "<folder with fonts>", Collections.EMPTY_MAP);
|
||||
```
|
||||
@@ -168,7 +174,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', '~> 3.1'
|
||||
pod 'mobile-ffmpeg-full', '~> 4.2'
|
||||
```
|
||||
|
||||
2. Execute commands.
|
||||
@@ -253,15 +259,36 @@ execution, video encoding, accessing https, encoding audio, burning subtitles an
|
||||
|
||||
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/ios_test_app.gif" width="240">
|
||||
|
||||
### 3. Releases
|
||||
### 3. Versions
|
||||
|
||||
| | v1.0 | v1.1 | v1.2 | v2.0 | v2.1 | v2.2 | v3.0 | v3.1 |
|
||||
| :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: |
|
||||
| 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 |
|
||||
| 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 |
|
||||
`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.
|
||||
|
||||
### 4. Building
|
||||
#### 4.1 Prerequisites
|
||||
| | 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 |
|
||||
|
||||
### 4. LTS Releases
|
||||
|
||||
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
|
||||
1. Use your package manager (apt, yum, dnf, brew, etc.) to install the following packages.
|
||||
|
||||
```
|
||||
@@ -280,14 +307,14 @@ Please visit [Android Prerequisites](https://github.com/tanersener/mobile-ffmpeg
|
||||
- **Xcode 7.3.1** or later
|
||||
- **Command Line Tools**
|
||||
|
||||
#### 4.2 Build Scripts
|
||||
#### 5.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.
|
||||
##### 4.2.1 Android
|
||||
##### 5.2.1 Android
|
||||
```
|
||||
export ANDROID_NDK_ROOT=<Android NDK Path>
|
||||
./android.sh
|
||||
@@ -295,28 +322,32 @@ export ANDROID_NDK_ROOT=<Android NDK Path>
|
||||
|
||||
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/android_custom.gif" width="600">
|
||||
|
||||
##### 4.2.2 IOS
|
||||
##### 5.2.2 IOS
|
||||
```
|
||||
./ios.sh
|
||||
```
|
||||
|
||||
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/ios_custom.gif" width="600">
|
||||
|
||||
#### 4.3 GPL Support
|
||||
##### 5.2.3 Building LTS Binaries
|
||||
|
||||
Use `--lts` option to build lts binaries for each platform.
|
||||
|
||||
#### 5.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.
|
||||
|
||||
#### 4.4 External Libraries
|
||||
#### 5.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.
|
||||
|
||||
### 5. Documentation
|
||||
### 6. Documentation
|
||||
|
||||
A more detailed documentation is available at [Wiki](https://github.com/tanersener/mobile-ffmpeg/wiki).
|
||||
|
||||
### 6. License
|
||||
### 7. 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.
|
||||
@@ -329,11 +360,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.
|
||||
|
||||
### 7. Contributing
|
||||
### 8. Contributing
|
||||
|
||||
If you have any recommendations or ideas to improve it, please feel free to submit issues or pull requests. Any help is appreciated.
|
||||
|
||||
### 8. See Also
|
||||
### 9. 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)
|
||||
|
||||
+55
-16
@@ -62,8 +62,8 @@ export BASEDIR=$(pwd)
|
||||
|
||||
export MOBILE_FFMPEG_TMPDIR="${BASEDIR}/.tmp"
|
||||
|
||||
# USING API LEVEL 21 / Android 5.0 (LOLLIPOP)
|
||||
export API=21
|
||||
# USING API LEVEL 24 / Android 7.0 (NOUGAT)
|
||||
export API=24
|
||||
|
||||
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,7 +88,8 @@ 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\n"
|
||||
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 "Licensing options:"
|
||||
|
||||
@@ -152,7 +153,7 @@ display_version() {
|
||||
COMMAND=`echo $0 | sed -e 's/\.\///g'`
|
||||
|
||||
echo -e "\
|
||||
$COMMAND $(get_mobile_ffmpeg_version)\n\
|
||||
$COMMAND v$(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\
|
||||
@@ -168,13 +169,22 @@ skip_library() {
|
||||
}
|
||||
|
||||
enable_debug() {
|
||||
export MOBILE_FFMPEG_DEBUG="-d"
|
||||
export MOBILE_FFMPEG_DEBUG="-DDEBUG -g"
|
||||
|
||||
BUILD_TYPE_ID+="debug "
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
@@ -448,6 +458,10 @@ 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
|
||||
@@ -457,29 +471,34 @@ APP_ABI := ${ANDROID_ARCHITECTURES}
|
||||
|
||||
APP_STL := c++_shared
|
||||
|
||||
APP_PLATFORM := android-21
|
||||
APP_PLATFORM := android-${API}
|
||||
|
||||
APP_CFLAGS := -O3 -DANDROID -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable
|
||||
APP_CFLAGS := -O3 -DANDROID ${LTS_BUILD__FLAG}-Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
# ENABLE COMMON FUNCTIONS
|
||||
. ${BASEDIR}/build/android-common.sh
|
||||
|
||||
GPL_ENABLED="no"
|
||||
|
||||
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
|
||||
exit 0
|
||||
DISPLAY_HELP="1"
|
||||
;;
|
||||
-V | --version)
|
||||
display_version
|
||||
@@ -493,9 +512,12 @@ 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'`
|
||||
|
||||
@@ -534,16 +556,33 @@ 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 for Android\n"
|
||||
echo -e -n "INFO: Building mobile-ffmpeg for Android: " 1>>${BASEDIR}/build.log 2>&1
|
||||
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 `date` 1>>${BASEDIR}/build.log 2>&1
|
||||
|
||||
if [[ ${ENABLED_ARCHITECTURES[0]} -eq 0 ]] && [[ ${ENABLED_ARCHITECTURES[1]} -eq 1 ]]; then
|
||||
# PERFORM THIS CHECK ONLY ON LTS
|
||||
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]] && [[ ${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"
|
||||
|
||||
@@ -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 = 3.1
|
||||
PROJECT_NUMBER = 4.2
|
||||
|
||||
# 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
|
||||
|
||||
@@ -4,10 +4,10 @@ android {
|
||||
compileSdkVersion 27
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 27
|
||||
versionCode 210310
|
||||
versionName "3.1"
|
||||
versionCode 240420
|
||||
versionName "4.2"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
project.archivesBaseName = "mobile-ffmpeg"
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ buildscript {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
compileSdkVersion Integer.parseInt(releaseTargetSdk)
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
minSdkVersion Integer.parseInt(releaseMinSdk)
|
||||
targetSdkVersion Integer.parseInt(releaseTargetSdk)
|
||||
versionCode Integer.parseInt(releaseVersionCode)
|
||||
versionName releaseVersionName
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "libavutil/ffversion.h"
|
||||
|
||||
/** Library version string */
|
||||
#define MOBILE_FFMPEG_VERSION "3.1"
|
||||
#define MOBILE_FFMPEG_VERSION "4.2"
|
||||
|
||||
/** Defines tag used for Android logging. */
|
||||
#define LIB_NAME "mobile-ffmpeg"
|
||||
|
||||
@@ -25,7 +25,8 @@ const char *abiDetectClassName = "com/arthenica/mobileffmpeg/AbiDetect";
|
||||
|
||||
/** Prototypes of native functions defined by this file. */
|
||||
JNINativeMethod abiDetectMethods[] = {
|
||||
{"getAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi}
|
||||
{"getNativeAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi},
|
||||
{"getNativeCpuAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeCpuAbi}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
if ((*env)->RegisterNatives(env, abiDetectClass, abiDetectMethods, 1) < 0) {
|
||||
if ((*env)->RegisterNatives(env, abiDetectClass, abiDetectMethods, 2) < 0) {
|
||||
LOGE("OnLoad failed to RegisterNatives for class %s.\n", abiDetectClassName);
|
||||
return JNI_FALSE;
|
||||
}
|
||||
@@ -57,13 +58,36 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns running ABI name.
|
||||
* Returns loaded ABI name.
|
||||
*
|
||||
* \param env pointer to native method interface
|
||||
* \param object reference to the class on which this method is invoked
|
||||
* \return running ABI name as UTF string
|
||||
* \return loaded ABI name as UTF string
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi(JNIEnv *env, jclass object) {
|
||||
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi(JNIEnv *env, jclass object) {
|
||||
|
||||
#ifdef MOBILE_FFMPEG_ARM_V7A
|
||||
return (*env)->NewStringUTF(env, "arm-v7a");
|
||||
#elif MOBILE_FFMPEG_ARM64_V8A
|
||||
return (*env)->NewStringUTF(env, "arm64-v8a");
|
||||
#elif MOBILE_FFMPEG_X86
|
||||
return (*env)->NewStringUTF(env, "x86");
|
||||
#elif MOBILE_FFMPEG_X86_64
|
||||
return (*env)->NewStringUTF(env, "x86_64");
|
||||
#else
|
||||
return (*env)->NewStringUTF(env, "unknown");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ABI name of the running cpu.
|
||||
*
|
||||
* \param env pointer to native method interface
|
||||
* \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) {
|
||||
AndroidCpuFamily family = android_getCpuFamily();
|
||||
|
||||
if (family == ANDROID_CPU_FAMILY_ARM) {
|
||||
@@ -89,3 +113,18 @@ JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi(JNIEn
|
||||
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
|
||||
}
|
||||
|
||||
@@ -46,9 +46,23 @@
|
||||
|
||||
/*
|
||||
* Class: com_arthenica_mobileffmpeg_AbiDetect
|
||||
* Method: getAbi
|
||||
* Method: getNativeAbi
|
||||
* Signature: ()Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi(JNIEnv *, jclass);
|
||||
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_arthenica_mobileffmpeg_AbiDetect
|
||||
* Method: getNativeCpuAbi
|
||||
* Signature: ()Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeCpuAbi(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 */
|
||||
|
||||
@@ -29,6 +29,7 @@ package com.arthenica.mobileffmpeg;
|
||||
public class AbiDetect {
|
||||
|
||||
static {
|
||||
armV7aNeonLoaded = false;
|
||||
System.loadLibrary("mobileffmpeg-abidetect");
|
||||
|
||||
/* ALL LIBRARIES LOADED AT STARTUP */
|
||||
@@ -36,17 +37,50 @@ public class AbiDetect {
|
||||
FFmpeg.class.getName();
|
||||
}
|
||||
|
||||
private static boolean armV7aNeonLoaded;
|
||||
|
||||
/**
|
||||
* Default constructor hidden.
|
||||
*/
|
||||
private AbiDetect() {
|
||||
}
|
||||
|
||||
static void setArmV7aNeonLoaded(final boolean armV7aNeonLoaded) {
|
||||
AbiDetect.armV7aNeonLoaded = armV7aNeonLoaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns running ABI name.
|
||||
* <p>Returns loaded ABI name.
|
||||
*
|
||||
* @return running ABI name
|
||||
* @return loaded ABI name
|
||||
*/
|
||||
public native static String getAbi();
|
||||
public static String getAbi() {
|
||||
if (armV7aNeonLoaded) {
|
||||
return "arm-v7a-neon";
|
||||
} else {
|
||||
return getNativeAbi();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns loaded ABI name.
|
||||
*
|
||||
* @return loaded ABI name
|
||||
*/
|
||||
private native static String getNativeAbi();
|
||||
|
||||
/**
|
||||
* <p>Returns ABI name of the running cpu.
|
||||
*
|
||||
* @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();
|
||||
|
||||
}
|
||||
|
||||
@@ -81,21 +81,29 @@ public class Config {
|
||||
Log.i(Config.TAG, "Loading mobile-ffmpeg.");
|
||||
|
||||
/* ALL LIBRARIES LOADED AT STARTUP */
|
||||
String abiName = AbiDetect.getAbi();
|
||||
Abi abi = Abi.from(abiName);
|
||||
Abi cpuAbi = Abi.from(AbiDetect.getNativeCpuAbi());
|
||||
FFmpeg.class.getName();
|
||||
|
||||
/*
|
||||
* NEON supported arm-v7a library has a different name
|
||||
*/
|
||||
boolean nativeLibraryLoaded = false;
|
||||
if (abi == Abi.ABI_ARMV7A_NEON) {
|
||||
try {
|
||||
System.loadLibrary("mobileffmpeg-armv7a-neon");
|
||||
nativeLibraryLoaded = true;
|
||||
} catch (final UnsatisfiedLinkError e) {
|
||||
Log.i(Config.TAG, "NEON supported armeabi-v7a library not found. Loading default armeabi-v7a library.", e);
|
||||
abi = Abi.ABI_ARMV7A;
|
||||
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 {
|
||||
AbiDetect.setArmV7aNeonLoaded(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +111,7 @@ public class Config {
|
||||
System.loadLibrary("mobileffmpeg");
|
||||
}
|
||||
|
||||
Log.i(Config.TAG, String.format("Loaded mobile-ffmpeg-%s-%s-%s.", getPackageName(), abi.getName(), getVersion()));
|
||||
Log.i(Config.TAG, String.format("Loaded mobile-ffmpeg-%s-%s-%s.", getPackageName(), AbiDetect.getAbi(), getVersion()));
|
||||
|
||||
/* NATIVE LOG LEVEL IS RECEIVED ONLY ON STARTUP */
|
||||
activeLogLevel = Level.from(getNativeLogLevel());
|
||||
|
||||
@@ -79,7 +79,11 @@ public class FFmpeg {
|
||||
* @return MobileFFmpeg version
|
||||
*/
|
||||
public static String getVersion() {
|
||||
return Config.getNativeVersion();
|
||||
if (AbiDetect.isNativeLTSBuild()) {
|
||||
return String.format("%s-lts", Config.getNativeVersion());
|
||||
} else {
|
||||
return Config.getNativeVersion();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -179,4 +183,13 @@ 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,7 +34,6 @@ class Packages {
|
||||
|
||||
static {
|
||||
supportedExternalLibraries = new ArrayList<>();
|
||||
supportedExternalLibraries.add("chromaprint");
|
||||
supportedExternalLibraries.add("fontconfig");
|
||||
supportedExternalLibraries.add("freetype");
|
||||
supportedExternalLibraries.add("fribidi");
|
||||
@@ -55,11 +54,9 @@ 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");
|
||||
@@ -134,8 +131,7 @@ class Packages {
|
||||
}
|
||||
|
||||
if (fullGpl) {
|
||||
if (externalLibraryList.contains("chromaprint") &&
|
||||
externalLibraryList.contains("fontconfig") &&
|
||||
if (externalLibraryList.contains("fontconfig") &&
|
||||
externalLibraryList.contains("freetype") &&
|
||||
externalLibraryList.contains("fribidi") &&
|
||||
externalLibraryList.contains("gmp") &&
|
||||
@@ -155,11 +151,9 @@ 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") &&
|
||||
@@ -172,8 +166,7 @@ class Packages {
|
||||
}
|
||||
|
||||
if (full) {
|
||||
if (externalLibraryList.contains("chromaprint") &&
|
||||
externalLibraryList.contains("fontconfig") &&
|
||||
if (externalLibraryList.contains("fontconfig") &&
|
||||
externalLibraryList.contains("freetype") &&
|
||||
externalLibraryList.contains("fribidi") &&
|
||||
externalLibraryList.contains("gmp") &&
|
||||
@@ -192,11 +185,9 @@ 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";
|
||||
|
||||
+15
-1
@@ -4,6 +4,20 @@ $(call import-add-path, $(LOCAL_PATH))
|
||||
MY_ARM_MODE := arm
|
||||
MY_PATH := ../app/src/main/cpp
|
||||
|
||||
# DEFINE ARCH FLAGS
|
||||
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
|
||||
MY_ARCH_FLAGS := ARM_V7A
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH_ABI), arm64-v8a)
|
||||
MY_ARCH_FLAGS := ARM64_V8A
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH_ABI), x86)
|
||||
MY_ARCH_FLAGS := X86
|
||||
endif
|
||||
ifeq ($(TARGET_ARCH_ABI), x86_64)
|
||||
MY_ARCH_FLAGS := X86_64
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_ARM_MODE := $(MY_ARM_MODE)
|
||||
LOCAL_MODULE := cpufeatures
|
||||
@@ -17,7 +31,7 @@ include $(CLEAR_VARS)
|
||||
LOCAL_ARM_MODE := $(MY_ARM_MODE)
|
||||
LOCAL_MODULE := mobileffmpeg-abidetect
|
||||
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg_abidetect.c
|
||||
LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include -I$(NDK_ROOT)/sources/android/cpufeatures
|
||||
LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include -I$(NDK_ROOT)/sources/android/cpufeatures -DMOBILE_FFMPEG_${MY_ARCH_FLAGS}
|
||||
LOCAL_LDLIBS := -llog -lz -landroid
|
||||
LOCAL_SHARED_LIBRARIES := cpufeatures
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -4,10 +4,10 @@ android {
|
||||
compileSdkVersion 27
|
||||
defaultConfig {
|
||||
applicationId "com.arthenica.mobileffmpeg.test"
|
||||
minSdkVersion 21
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 27
|
||||
versionCode 210310
|
||||
versionName "3.1"
|
||||
versionCode 240420
|
||||
versionName "4.2"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
@@ -40,7 +40,7 @@ android.applicationVariants.all { variant ->
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.arthenica:mobile-ffmpeg-full:3.1'
|
||||
implementation 'com.arthenica:mobile-ffmpeg-full:4.2'
|
||||
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'
|
||||
|
||||
@@ -61,7 +61,7 @@ cmake -Wno-dev \
|
||||
-DFFT_LIB=kissfft \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_chromaprint_package_config "1.4.3"
|
||||
|
||||
+57
-28
@@ -131,7 +131,11 @@ get_target_build() {
|
||||
echo "arm"
|
||||
;;
|
||||
arm-v7a-neon)
|
||||
echo "arm/neon"
|
||||
if [[ ! -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
|
||||
echo "arm/neon"
|
||||
else
|
||||
echo "arm"
|
||||
fi
|
||||
;;
|
||||
arm64-v8a)
|
||||
echo "arm64"
|
||||
@@ -184,32 +188,36 @@ get_common_includes() {
|
||||
}
|
||||
|
||||
get_common_cflags() {
|
||||
echo "-fstrict-aliasing -fPIC -DANDROID -D__ANDROID__ -D__ANDROID_API__=${API}"
|
||||
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}"
|
||||
}
|
||||
|
||||
get_arch_specific_cflags() {
|
||||
case ${ARCH} in
|
||||
arm-v7a)
|
||||
echo "-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
|
||||
echo "-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -DMOBILE_FFMPEG_ARM_V7A"
|
||||
;;
|
||||
arm-v7a-neon)
|
||||
echo "-march=armv7-a -mfpu=neon -mfloat-abi=softfp"
|
||||
echo "-march=armv7-a -mfpu=neon -mfloat-abi=softfp -DMOBILE_FFMPEG_ARM_V7A_NEON"
|
||||
;;
|
||||
arm64-v8a)
|
||||
echo "-march=armv8-a"
|
||||
echo "-march=armv8-a -DMOBILE_FFMPEG_ARM64_V8A"
|
||||
;;
|
||||
x86)
|
||||
echo "-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32"
|
||||
echo "-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 -DMOBILE_FFMPEG_X86"
|
||||
;;
|
||||
x86-64)
|
||||
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel"
|
||||
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_size_optimization_cflags() {
|
||||
|
||||
ARCH_OPTIMIZATION=""
|
||||
local ARCH_OPTIMIZATION=""
|
||||
case ${ARCH} in
|
||||
arm-v7a | arm-v7a-neon)
|
||||
case $1 in
|
||||
@@ -243,14 +251,14 @@ get_size_optimization_cflags() {
|
||||
;;
|
||||
esac
|
||||
|
||||
LIB_OPTIMIZATION=""
|
||||
local LIB_OPTIMIZATION=""
|
||||
|
||||
echo "${ARCH_OPTIMIZATION} ${LIB_OPTIMIZATION}"
|
||||
}
|
||||
|
||||
get_app_specific_cflags() {
|
||||
|
||||
APP_FLAGS=""
|
||||
local APP_FLAGS=""
|
||||
case $1 in
|
||||
xvidcore)
|
||||
APP_FLAGS=""
|
||||
@@ -276,35 +284,45 @@ get_app_specific_cflags() {
|
||||
}
|
||||
|
||||
get_cflags() {
|
||||
ARCH_FLAGS=$(get_arch_specific_cflags)
|
||||
APP_FLAGS=$(get_app_specific_cflags $1)
|
||||
COMMON_FLAGS=$(get_common_cflags)
|
||||
local ARCH_FLAGS=$(get_arch_specific_cflags)
|
||||
local APP_FLAGS=$(get_app_specific_cflags $1)
|
||||
local COMMON_FLAGS=$(get_common_cflags)
|
||||
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
|
||||
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
|
||||
local OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
|
||||
else
|
||||
OPTIMIZATION_FLAGS=""
|
||||
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
|
||||
fi
|
||||
COMMON_INCLUDES=$(get_common_includes)
|
||||
local 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 -Os -ffunction-sections -fdata-sections"
|
||||
echo "-std=c++11 -fno-rtti ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
ffmpeg)
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti -flto -O2 -ffunction-sections -fdata-sections"
|
||||
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
|
||||
;;
|
||||
opencore-amr)
|
||||
echo "-Os -ffunction-sections -fdata-sections"
|
||||
echo "${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
x265)
|
||||
echo "-std=c++11 -fno-exceptions -Os -ffunction-sections -fdata-sections"
|
||||
echo "-std=c++11 -fno-exceptions ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
*)
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti -Os -ffunction-sections -fdata-sections"
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -313,7 +331,14 @@ 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"
|
||||
|
||||
case $1 in
|
||||
ffmpeg | tesseract)
|
||||
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)
|
||||
echo "-lc -lm -ldl -llog -lc++_shared ${COMMON_LIBRARY_PATHS}"
|
||||
;;
|
||||
libvpx)
|
||||
@@ -371,9 +396,13 @@ get_arch_specific_ldflags() {
|
||||
}
|
||||
|
||||
get_ldflags() {
|
||||
ARCH_FLAGS=$(get_arch_specific_ldflags)
|
||||
OPTIMIZATION_FLAGS=$(get_size_optimization_ldflags $1)
|
||||
COMMON_LINKED_LIBS=$(get_common_linked_libraries $1)
|
||||
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)
|
||||
|
||||
echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS}"
|
||||
}
|
||||
@@ -847,9 +876,9 @@ download_gpl_library_source() {
|
||||
GPL_LIB_DEST_DIR="libvidstab"
|
||||
;;
|
||||
x264)
|
||||
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181208-2245-stable.tar.bz2"
|
||||
GPL_LIB_FILE="x264-snapshot-20181208-2245-stable.tar.bz2"
|
||||
GPL_LIB_ORIG_DIR="x264-snapshot-20181208-2245-stable"
|
||||
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_DEST_DIR="x264"
|
||||
;;
|
||||
x265)
|
||||
|
||||
@@ -53,7 +53,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./expat.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -297,6 +297,13 @@ 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}: "
|
||||
@@ -332,7 +339,7 @@ export LDFLAGS="${LDFLAGS}"
|
||||
${SIZE_OPTIONS} \
|
||||
--disable-openssl \
|
||||
--disable-xmm-clobber-test \
|
||||
--disable-debug \
|
||||
${DEBUG_OPTIONS} \
|
||||
--disable-neon-clobber-test \
|
||||
--disable-programs \
|
||||
--disable-postproc \
|
||||
@@ -367,7 +374,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
|
||||
make -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed"
|
||||
|
||||
@@ -57,7 +57,7 @@ fi
|
||||
--disable-docs \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_fontconfig_package_config "2.13.1"
|
||||
|
||||
@@ -60,7 +60,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/lib
|
||||
--disable-mmap \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_freetype_package_config "22.0.16"
|
||||
|
||||
@@ -54,7 +54,7 @@ fi
|
||||
--disable-deprecated \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -52,7 +52,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_giflib_package_config "5.1.4"
|
||||
|
||||
@@ -53,7 +53,7 @@ fi
|
||||
--disable-maintainer-mode \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_gmp_package_config "6.1.2"
|
||||
|
||||
@@ -75,7 +75,7 @@ fi
|
||||
--disable-maintainer-mode \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_gnutls_package_config "3.5.19"
|
||||
|
||||
@@ -66,7 +66,7 @@ cmake -Wno-dev \
|
||||
-DWITH_JAVA=0 \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ${BASEDIR}/src/${LIB_NAME}/build/pkgscripts/libjpeg.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -52,7 +52,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./src/kvazaar.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -57,7 +57,7 @@ fi
|
||||
--disable-gtktest \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libmp3lame_package_config "3.100"
|
||||
|
||||
@@ -74,7 +74,7 @@ fi
|
||||
--disable-programs \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp lept.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -86,7 +86,7 @@ cmake -Wno-dev \
|
||||
-DAOM_TARGET_CPU=generic \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libaom_package_config "1.0.0"
|
||||
|
||||
@@ -71,7 +71,7 @@ esac
|
||||
${ASM_FLAGS} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -52,7 +52,7 @@ fi
|
||||
--disable-rpath \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libiconv_package_config "1.15"
|
||||
|
||||
@@ -51,7 +51,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./libilbc.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -51,7 +51,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ogg.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -70,7 +70,7 @@ fi
|
||||
${CPU_SPECIFIC_OPTIONS} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -55,7 +55,7 @@ fi
|
||||
--disable-external-libs \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -55,7 +55,7 @@ fi
|
||||
--disable-valgrind-testing \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp theoradec.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -51,7 +51,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# AUTO-GENERATED PKG-CONFIG FILE IS WRONG. CREATING IT MANUALLY
|
||||
create_uuid_package_config "1.0.3"
|
||||
|
||||
@@ -72,7 +72,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp vidstab.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -57,7 +57,7 @@ autoreconf_library ${LIB_NAME}
|
||||
--disable-oggtest \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libvorbis_package_config "1.3.6"
|
||||
|
||||
@@ -98,7 +98,7 @@ make distclean 2>/dev/null 1>/dev/null
|
||||
--disable-debug-libs \
|
||||
--disable-internal-stats || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -88,7 +88,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libwebp_package_config "1.0.1"
|
||||
|
||||
@@ -62,7 +62,7 @@ autoreconf_library ${LIB_NAME}
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libxml2_package_config "2.9.8"
|
||||
|
||||
@@ -67,7 +67,7 @@ fi
|
||||
${OPTIONAL_CPU_SUPPORT} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -52,7 +52,7 @@ fi
|
||||
--disable-maintainer-mode \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp amrwb/*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -59,7 +59,7 @@ fi
|
||||
--disable-ambisonics \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./opus.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -53,7 +53,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -51,7 +51,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -64,7 +64,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_snappy_package_config "1.1.7"
|
||||
|
||||
@@ -66,7 +66,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_soxr_package_config "0.1.3"
|
||||
|
||||
@@ -58,7 +58,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -64,7 +64,7 @@ export ac_cv_c_bigendian=no
|
||||
|
||||
${SED_INLINE} 's/\-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_tesseract_package_config "3.05.02"
|
||||
|
||||
@@ -57,7 +57,7 @@ fi
|
||||
--disable-lzma \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -55,7 +55,7 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -54,7 +54,7 @@ fi
|
||||
--disable-tests \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -73,7 +73,7 @@ esac
|
||||
${ASM_FLAGS} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp x264.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -94,7 +94,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR="${ARCH}" \
|
||||
-DENABLE_SHARED=0 ../source || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_x265_package_config "2.9"
|
||||
|
||||
@@ -57,7 +57,7 @@ esac
|
||||
${ASM_FLAGS} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_xvidcore_package_config "1.3.5"
|
||||
|
||||
@@ -55,7 +55,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$LD" \
|
||||
@@ -65,7 +65,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp libchromaprint.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+143
-82
@@ -68,6 +68,33 @@ 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" ;;
|
||||
@@ -95,8 +122,9 @@ get_arch_name() {
|
||||
0) echo "armv7" ;;
|
||||
1) echo "armv7s" ;;
|
||||
2) echo "arm64" ;;
|
||||
3) echo "i386" ;;
|
||||
4) echo "x86-64" ;;
|
||||
3) echo "arm64e" ;;
|
||||
4) echo "i386" ;;
|
||||
5) echo "x86-64" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -104,9 +132,20 @@ get_target_host() {
|
||||
echo "$(get_target_arch)-ios-darwin"
|
||||
}
|
||||
|
||||
get_target_build_directory() {
|
||||
case ${ARCH} in
|
||||
x86-64)
|
||||
echo "x86_64-ios-darwin"
|
||||
;;
|
||||
*)
|
||||
echo "${ARCH}-ios-darwin"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_target_arch() {
|
||||
case ${ARCH} in
|
||||
arm64)
|
||||
arm64 | arm64e)
|
||||
echo "aarch64"
|
||||
;;
|
||||
x86-64)
|
||||
@@ -124,7 +163,7 @@ get_target_sdk() {
|
||||
|
||||
get_sdk_name() {
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
echo "iphoneos"
|
||||
;;
|
||||
i386 | x86-64)
|
||||
@@ -139,7 +178,7 @@ get_sdk_path() {
|
||||
|
||||
get_min_version_cflags() {
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
echo "-miphoneos-version-min=${IOS_MIN_VERSION}"
|
||||
;;
|
||||
i386 | x86-64)
|
||||
@@ -153,12 +192,16 @@ 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 -isysroot ${SDK_PATH}"
|
||||
echo "-fstrict-aliasing -DIOS ${LTS_BUILD__FLAG}-isysroot ${SDK_PATH}"
|
||||
;;
|
||||
*)
|
||||
echo "-fstrict-aliasing -fembed-bitcode -DIOS -isysroot ${SDK_PATH}"
|
||||
echo "-fstrict-aliasing -fembed-bitcode -DIOS ${LTS_BUILD__FLAG}-isysroot ${SDK_PATH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -166,50 +209,53 @@ get_common_cflags() {
|
||||
get_arch_specific_cflags() {
|
||||
case ${ARCH} in
|
||||
armv7)
|
||||
echo "-arch armv7 -target $(get_target_host) -march=armv7 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
|
||||
echo "-arch armv7 -target $(get_target_host) -march=armv7 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -DMOBILE_FFMPEG_ARMV7"
|
||||
;;
|
||||
armv7s)
|
||||
echo "-arch armv7s -target $(get_target_host) -march=armv7s -mcpu=generic -mfpu=neon -mfloat-abi=softfp"
|
||||
echo "-arch armv7s -target $(get_target_host) -march=armv7s -mcpu=generic -mfpu=neon -mfloat-abi=softfp -DMOBILE_FFMPEG_ARMV7S"
|
||||
;;
|
||||
arm64)
|
||||
echo "-arch arm64 -target $(get_target_host) -march=armv8-a+crc+crypto -mcpu=generic"
|
||||
echo "-arch arm64 -target $(get_target_host) -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64"
|
||||
;;
|
||||
arm64e)
|
||||
echo "-arch arm64e -target $(get_target_host) -march=armv8.3-a+dotprod -mcpu=generic -DMOBILE_FFMPEG_ARM64E"
|
||||
;;
|
||||
i386)
|
||||
echo "-arch i386 -target $(get_target_host) -march=i386 -mtune=intel -mssse3 -mfpmath=sse -m32"
|
||||
echo "-arch i386 -target $(get_target_host) -march=i386 -mtune=intel -mssse3 -mfpmath=sse -m32 -DMOBILE_FFMPEG_I386"
|
||||
;;
|
||||
x86-64)
|
||||
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel"
|
||||
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_size_optimization_cflags() {
|
||||
|
||||
ARCH_OPTIMIZATION=""
|
||||
local ARCH_OPTIMIZATION=""
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
case $1 in
|
||||
x264)
|
||||
ARCH_OPTIMIZATION="-Oz"
|
||||
x264 | x265)
|
||||
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
|
||||
;;
|
||||
x265 | ffmpeg | mobile-ffmpeg)
|
||||
ARCH_OPTIMIZATION="-flto=thin -Oz"
|
||||
ffmpeg | mobile-ffmpeg)
|
||||
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
|
||||
;;
|
||||
*)
|
||||
ARCH_OPTIMIZATION="-flto -Oz"
|
||||
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
i386 | x86-64)
|
||||
case $1 in
|
||||
x264 | ffmpeg)
|
||||
ARCH_OPTIMIZATION="-O2"
|
||||
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
|
||||
;;
|
||||
x265)
|
||||
ARCH_OPTIMIZATION="-flto=thin -O2"
|
||||
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
|
||||
;;
|
||||
*)
|
||||
ARCH_OPTIMIZATION="-flto -O2"
|
||||
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -220,11 +266,11 @@ get_size_optimization_cflags() {
|
||||
|
||||
get_size_optimization_asm_cflags() {
|
||||
|
||||
ARCH_OPTIMIZATION=""
|
||||
local ARCH_OPTIMIZATION=""
|
||||
case $1 in
|
||||
jpeg | ffmpeg)
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
ARCH_OPTIMIZATION="-Oz"
|
||||
;;
|
||||
i386 | x86-64)
|
||||
@@ -242,11 +288,11 @@ get_size_optimization_asm_cflags() {
|
||||
|
||||
get_app_specific_cflags() {
|
||||
|
||||
APP_FLAGS=""
|
||||
local APP_FLAGS=""
|
||||
case $1 in
|
||||
fontconfig)
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
APP_FLAGS="-std=c99 -Wno-unused-function -D__IPHONE_OS_MIN_REQUIRED -D__IPHONE_VERSION_MIN_REQUIRED=30000"
|
||||
;;
|
||||
*)
|
||||
@@ -255,7 +301,7 @@ get_app_specific_cflags() {
|
||||
esac
|
||||
;;
|
||||
ffmpeg)
|
||||
APP_FLAGS="-Wno-unused-function -DPIC"
|
||||
APP_FLAGS="-Wno-unused-function -Wno-deprecated-declarations"
|
||||
;;
|
||||
kvazaar)
|
||||
APP_FLAGS="-std=gnu99 -Wno-unused-function"
|
||||
@@ -290,64 +336,68 @@ get_app_specific_cflags() {
|
||||
}
|
||||
|
||||
get_cflags() {
|
||||
ARCH_FLAGS=$(get_arch_specific_cflags)
|
||||
APP_FLAGS=$(get_app_specific_cflags $1)
|
||||
COMMON_FLAGS=$(get_common_cflags)
|
||||
local ARCH_FLAGS=$(get_arch_specific_cflags)
|
||||
local APP_FLAGS=$(get_app_specific_cflags $1)
|
||||
local COMMON_FLAGS=$(get_common_cflags)
|
||||
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
|
||||
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
|
||||
local OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
|
||||
else
|
||||
OPTIMIZATION_FLAGS=""
|
||||
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
|
||||
fi
|
||||
MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
|
||||
COMMON_INCLUDES=$(get_common_includes)
|
||||
local MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
|
||||
local COMMON_INCLUDES=$(get_common_includes)
|
||||
|
||||
echo "${ARCH_FLAGS} ${APP_FLAGS} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS} ${MIN_VERSION_FLAGS} ${COMMON_INCLUDES}"
|
||||
}
|
||||
|
||||
get_asmflags() {
|
||||
ARCH_FLAGS=$(get_arch_specific_cflags)
|
||||
APP_FLAGS=$(get_app_specific_cflags $1)
|
||||
COMMON_FLAGS=$(get_common_cflags)
|
||||
local ARCH_FLAGS=$(get_arch_specific_cflags)
|
||||
local APP_FLAGS=$(get_app_specific_cflags $1)
|
||||
local COMMON_FLAGS=$(get_common_cflags)
|
||||
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
|
||||
OPTIMIZATION_FLAGS=$(get_size_optimization_asm_cflags $1)
|
||||
local OPTIMIZATION_FLAGS=$(get_size_optimization_asm_cflags $1)
|
||||
else
|
||||
OPTIMIZATION_FLAGS=""
|
||||
local OPTIMIZATION_FLAGS="${MOBILE_FFMPEG_DEBUG}"
|
||||
fi
|
||||
MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
|
||||
COMMON_INCLUDES=$(get_common_includes)
|
||||
local MIN_VERSION_FLAGS=$(get_min_version_cflags $1)
|
||||
local 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)"
|
||||
local OPTIMIZATION_CFLAGS="-Oz"
|
||||
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)
|
||||
BITCODE_FLAGS="-fembed-bitcode"
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
local BITCODE_FLAGS="-fembed-bitcode"
|
||||
;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
x265)
|
||||
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
|
||||
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
|
||||
;;
|
||||
gnutls)
|
||||
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
|
||||
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
opencore-amr)
|
||||
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
|
||||
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
libwebp | xvidcore)
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
libaom)
|
||||
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
|
||||
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
*)
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
|
||||
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -362,13 +412,13 @@ get_common_ldflags() {
|
||||
|
||||
get_size_optimization_ldflags() {
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
case $1 in
|
||||
ffmpeg | mobile-ffmpeg)
|
||||
echo "-flto=thin -Oz"
|
||||
echo "-Oz -dead_strip"
|
||||
;;
|
||||
*)
|
||||
echo "-flto -Oz"
|
||||
echo "-Oz -dead_strip"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -378,7 +428,7 @@ get_size_optimization_ldflags() {
|
||||
echo "-O2"
|
||||
;;
|
||||
*)
|
||||
echo "-flto -O2"
|
||||
echo "-O2"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -396,6 +446,9 @@ get_arch_specific_ldflags() {
|
||||
arm64)
|
||||
echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode"
|
||||
;;
|
||||
arm64e)
|
||||
echo "-arch arm64e -march=armv8.3-a+dotprod -fembed-bitcode"
|
||||
;;
|
||||
i386)
|
||||
echo "-arch i386 -march=i386"
|
||||
;;
|
||||
@@ -406,15 +459,19 @@ get_arch_specific_ldflags() {
|
||||
}
|
||||
|
||||
get_ldflags() {
|
||||
ARCH_FLAGS=$(get_arch_specific_ldflags)
|
||||
LINKED_LIBRARIES=$(get_common_linked_libraries)
|
||||
OPTIMIZATION_FLAGS=$(get_size_optimization_ldflags $1)
|
||||
COMMON_FLAGS=$(get_common_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)
|
||||
|
||||
case $1 in
|
||||
mobile-ffmpeg)
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode ${OPTIMIZATION_FLAGS}"
|
||||
;;
|
||||
*)
|
||||
@@ -432,7 +489,7 @@ create_fontconfig_package_config() {
|
||||
local FONTCONFIG_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/fontconfig.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/fontconfig
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/fontconfig
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -457,7 +514,7 @@ create_freetype_package_config() {
|
||||
local FREETYPE_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/freetype2.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/freetype
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/freetype
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -478,7 +535,7 @@ create_giflib_package_config() {
|
||||
local GIFLIB_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/giflib.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -497,7 +554,7 @@ create_gmp_package_config() {
|
||||
local GMP_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/gmp.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -516,7 +573,7 @@ create_gnutls_package_config() {
|
||||
local GNUTLS_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/gnutls.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/gnutls
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gnutls
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -536,7 +593,7 @@ create_libmp3lame_package_config() {
|
||||
local LAME_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/libmp3lame.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/lame
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/lame
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -555,7 +612,7 @@ create_libiconv_package_config() {
|
||||
local LIB_ICONV_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/libiconv.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -574,7 +631,7 @@ create_libpng_package_config() {
|
||||
local LIBPNG_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/libpng.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -592,7 +649,7 @@ create_libvorbis_package_config() {
|
||||
local LIBVORBIS_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/vorbis.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libvorbis
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libvorbis
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -607,7 +664,7 @@ Cflags: -I\${includedir}
|
||||
EOF
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/vorbisenc.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libvorbis
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libvorbis
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -623,7 +680,7 @@ Cflags: -I\${includedir}
|
||||
EOF
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/vorbisfile.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libvorbis
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libvorbis
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -643,7 +700,7 @@ create_libwebp_package_config() {
|
||||
local LIB_WEBP_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/libwebp.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libwebp
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libwebp
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -662,7 +719,7 @@ create_libxml2_package_config() {
|
||||
local LIBXML2_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/libxml-2.0.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libxml2
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libxml2
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -682,7 +739,7 @@ create_snappy_package_config() {
|
||||
local SNAPPY_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/snappy.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/snappy
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/snappy
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -701,7 +758,7 @@ create_soxr_package_config() {
|
||||
local SOXR_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/soxr.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/soxr
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/soxr
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -720,7 +777,7 @@ create_tesseract_package_config() {
|
||||
local TESSERACT_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/tesseract.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/tesseract
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tesseract
|
||||
exec_prefix=\${prefix}
|
||||
bindir=\${exec_prefix}/bin
|
||||
datarootdir=\${prefix}/share
|
||||
@@ -743,7 +800,7 @@ create_uuid_package_config() {
|
||||
local UUID_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/uuid.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libuuid
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libuuid
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -761,7 +818,7 @@ create_xvidcore_package_config() {
|
||||
local XVIDCORE_VERSION="$1"
|
||||
|
||||
cat > "${INSTALL_PKG_CONFIG_DIR}/xvidcore.pc" << EOF
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/xvidcore
|
||||
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/xvidcore
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${prefix}/lib
|
||||
includedir=\${prefix}/include
|
||||
@@ -860,9 +917,9 @@ download_gpl_library_source() {
|
||||
GPL_LIB_DEST_DIR="libvidstab"
|
||||
;;
|
||||
x264)
|
||||
GPL_LIB_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20181208-2245-stable.tar.bz2"
|
||||
GPL_LIB_FILE="x264-snapshot-20181208-2245-stable.tar.bz2"
|
||||
GPL_LIB_ORIG_DIR="x264-snapshot-20181208-2245-stable"
|
||||
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_DEST_DIR="x264"
|
||||
;;
|
||||
x265)
|
||||
@@ -954,6 +1011,10 @@ 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"
|
||||
@@ -979,7 +1040,7 @@ set_toolchain_clang_paths() {
|
||||
export AS="${LOCAL_GAS_PREPROCESSOR} -arch arm -- ${CC} ${LOCAL_ASMFLAGS}"
|
||||
fi
|
||||
;;
|
||||
arm64)
|
||||
arm64 | arm64e)
|
||||
if [ "$1" == "x265" ]; then
|
||||
export AS="${LOCAL_GAS_PREPROCESSOR}"
|
||||
export AS_ARGUMENTS="-arch aarch64"
|
||||
@@ -997,7 +1058,7 @@ set_toolchain_clang_paths() {
|
||||
export RANLIB="$(xcrun --sdk $(get_sdk_name) -f ranlib)"
|
||||
export STRIP="$(xcrun --sdk $(get_sdk_name) -f strip)"
|
||||
|
||||
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/ios-$(get_target_host)/pkgconfig"
|
||||
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/pkgconfig"
|
||||
export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc"
|
||||
export BZIP2_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/bzip2.pc"
|
||||
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ if [[ ${RECONF_expat} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--without-docbook \
|
||||
@@ -58,7 +58,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./expat.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+52
-34
@@ -66,6 +66,12 @@ case ${ARCH} in
|
||||
NEON_FLAG=" --enable-neon"
|
||||
BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode"
|
||||
;;
|
||||
arm64e)
|
||||
TARGET_CPU="armv8.3-a"
|
||||
TARGET_ARCH="aarch64"
|
||||
NEON_FLAG=" --enable-neon"
|
||||
BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode"
|
||||
;;
|
||||
i386)
|
||||
TARGET_CPU="i386"
|
||||
TARGET_ARCH="i386"
|
||||
@@ -324,12 +330,8 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
# 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
|
||||
# ALWAYS BUILD STATIC LIBRARIES
|
||||
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
|
||||
|
||||
# OPTIMIZE FOR SPEED INSTEAD OF SIZE
|
||||
if [[ -z ${MOBILE_FFMPEG_OPTIMIZED_FOR_SPEED} ]]; then
|
||||
@@ -338,23 +340,39 @@ 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);
|
||||
OPTIMIZATION_CFLAGS=$(get_size_optimization_cflags ${LIB_NAME});
|
||||
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
|
||||
OPTIMIZATION_CFLAGS="$(get_size_optimization_cflags ${LIB_NAME})"
|
||||
else
|
||||
OPTIMIZATION_CFLAGS="${MOBILE_FFMPEG_DEBUG}"
|
||||
fi
|
||||
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 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}"
|
||||
export LDFLAGS="${ARCH_LDFLAGS}${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS} ${OPTIMIZATION_FLAGS}"
|
||||
|
||||
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
|
||||
|
||||
@@ -364,7 +382,7 @@ make distclean 2>/dev/null 1>/dev/null
|
||||
|
||||
./configure \
|
||||
--sysroot=${SDK_PATH} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--enable-version3 \
|
||||
--arch="${TARGET_ARCH}" \
|
||||
--cpu="${TARGET_CPU}" \
|
||||
@@ -391,7 +409,7 @@ make distclean 2>/dev/null 1>/dev/null
|
||||
--disable-indev=fbdev \
|
||||
--disable-openssl \
|
||||
--disable-xmm-clobber-test \
|
||||
--disable-debug \
|
||||
${DEBUG_OPTIONS} \
|
||||
--disable-neon-clobber-test \
|
||||
--disable-programs \
|
||||
--disable-postproc \
|
||||
@@ -423,7 +441,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
|
||||
make -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed"
|
||||
@@ -438,28 +456,28 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# MANUALLY ADD REQUIRED HEADERS
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/arm
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/aarch64
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/x86
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/arm
|
||||
cp -f ${BASEDIR}/src/ffmpeg/config.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/x86/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/x86
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/arm/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/arm
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavformat/network.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavformat
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavformat/os_support.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavformat
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavformat/url.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavformat
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/internal.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/libm.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/reverse.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/thread.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/asm.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/arm/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/arm
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/aarch64/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/aarch64
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/emms.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/arm
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/aarch64
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/x86
|
||||
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/arm
|
||||
cp -f ${BASEDIR}/src/ffmpeg/config.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/x86/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/x86
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/arm/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/arm
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavformat/network.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavformat
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavformat/os_support.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavformat
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavformat/url.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavformat
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/internal.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/libm.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/reverse.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/thread.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/asm.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/arm/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/arm
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/aarch64/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/aarch64
|
||||
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/emms.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok"
|
||||
|
||||
@@ -49,10 +49,10 @@ if [[ ${RECONF_fontconfig} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv \
|
||||
--with-expat=${BASEDIR}/prebuilt/ios-$(get_target_host)/expat \
|
||||
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv \
|
||||
--with-expat=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/expat \
|
||||
--without-libintl-prefix \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
@@ -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 ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_fontconfig_package_config "2.13.1"
|
||||
|
||||
@@ -44,11 +44,11 @@ cd ${BASEDIR}/src/${LIB_NAME} || exit 1
|
||||
make distclean 2>/dev/null 1>/dev/null
|
||||
|
||||
# OVERRIDING PKG-CONFIG
|
||||
export LIBPNG_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/include"
|
||||
export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/lib"
|
||||
export LIBPNG_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/include"
|
||||
export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/lib"
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-zlib \
|
||||
--with-png \
|
||||
@@ -65,7 +65,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/lib"
|
||||
--disable-mmap \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_freetype_package_config "22.0.16"
|
||||
|
||||
@@ -49,7 +49,7 @@ if [[ ${RECONF_fribidi} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -59,7 +59,7 @@ fi
|
||||
--disable-deprecated \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ if [[ ${RECONF_giflib} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -57,7 +57,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_giflib_package_config "5.1.4"
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ case ${ARCH} in
|
||||
esac
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -66,7 +66,7 @@ esac
|
||||
--disable-maintainer-mode \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_gmp_package_config "6.1.2"
|
||||
|
||||
+11
-11
@@ -38,20 +38,20 @@ COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
|
||||
COMMON_CXXFLAGS=$(get_cxxflags ${LIB_NAME})
|
||||
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
|
||||
|
||||
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv/include"
|
||||
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv/include"
|
||||
export CXXFLAGS="${COMMON_CXXFLAGS}"
|
||||
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv/lib"
|
||||
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv/lib"
|
||||
|
||||
export NETTLE_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/include"
|
||||
export NETTLE_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/lib"
|
||||
export HOGWEED_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/include"
|
||||
export HOGWEED_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/lib"
|
||||
export GMP_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/include"
|
||||
export GMP_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/lib"
|
||||
export NETTLE_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/include"
|
||||
export NETTLE_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/lib"
|
||||
export HOGWEED_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/include"
|
||||
export HOGWEED_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/lib"
|
||||
export GMP_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/include"
|
||||
export GMP_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/lib"
|
||||
|
||||
HARDWARE_ACCELERATION=""
|
||||
case ${ARCH} in
|
||||
arm64)
|
||||
arm64 | arm64e)
|
||||
|
||||
# HARDWARE ACCELERATION IS DISABLED DUE TO THE FOLLOWING ERROR
|
||||
#
|
||||
@@ -74,7 +74,7 @@ if [[ ${RECONF_gnutls} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--with-included-libtasn1 \
|
||||
@@ -95,7 +95,7 @@ fi
|
||||
--disable-maintainer-mode \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_gnutls_package_config "3.5.19"
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$LD" \
|
||||
@@ -76,7 +76,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ${BASEDIR}/src/${LIB_NAME}/build/pkgscripts/libjpeg.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -56,7 +56,7 @@ if [[ ${RECONF_kvazaar} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -64,7 +64,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./src/kvazaar.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+3
-3
@@ -49,10 +49,10 @@ if [[ ${RECONF_lame} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv \
|
||||
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-fast-install \
|
||||
@@ -62,7 +62,7 @@ fi
|
||||
--disable-gtktest \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libmp3lame_package_config "3.100"
|
||||
|
||||
@@ -36,8 +36,8 @@ set_toolchain_clang_paths ${LIB_NAME}
|
||||
TARGET_HOST=$(get_target_host)
|
||||
export CFLAGS="$(get_cflags ${LIB_NAME})"
|
||||
export CXXFLAGS="$(get_cxxflags ${LIB_NAME})"
|
||||
export CPPFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/include"
|
||||
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/lib -lgif"
|
||||
export CPPFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/include"
|
||||
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/lib -lgif"
|
||||
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
|
||||
|
||||
export LIBPNG_CFLAGS="$(pkg-config --cflags libpng)"
|
||||
@@ -65,7 +65,7 @@ if [[ ${RECONF_leptonica} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-zlib \
|
||||
--with-libpng \
|
||||
@@ -79,7 +79,7 @@ fi
|
||||
--disable-programs \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp lept.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+6
-2
@@ -53,6 +53,10 @@ case ${ARCH} in
|
||||
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"
|
||||
@@ -81,7 +85,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_CXX_COMPILER="$CXX" \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$LD" \
|
||||
@@ -95,7 +99,7 @@ cmake -Wno-dev \
|
||||
-DCONFIG_UNIT_TESTS=0 \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ${BASEDIR}/src/${LIB_NAME}/cmake-build/aom.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ if [[ ${RECONF_libass} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--disable-libtool-lock \
|
||||
@@ -62,7 +62,7 @@ fi
|
||||
--disable-coretext \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -48,7 +48,7 @@ if [[ ${RECONF_libiconv} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -57,7 +57,7 @@ fi
|
||||
--disable-rpath \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libiconv_package_config "1.15"
|
||||
|
||||
@@ -48,7 +48,7 @@ if [[ ${RECONF_libilbc} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -56,7 +56,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./libilbc.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ if [[ ${RECONF_libogg} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -56,7 +56,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ogg.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+4
-4
@@ -44,7 +44,7 @@ case ${ARCH} in
|
||||
x86 | x86-64)
|
||||
CPU_SPECIFIC_OPTIONS+=" --enable-sse=yes"
|
||||
;;
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
CPU_SPECIFIC_OPTIONS+=" --enable-arm-neon=yes"
|
||||
;;
|
||||
esac
|
||||
@@ -59,7 +59,7 @@ if [[ ${RECONF_libpng} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -70,9 +70,9 @@ fi
|
||||
${CPU_SPECIFIC_OPTIONS} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libpng_package_config "1.6.35"
|
||||
create_libpng_package_config "1.6.36"
|
||||
|
||||
make install || exit 1
|
||||
|
||||
@@ -48,7 +48,7 @@ if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_libsndfile} -e
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -60,7 +60,7 @@ fi
|
||||
--disable-external-libs \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -49,7 +49,7 @@ if [[ ${RECONF_libtheora} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
@@ -60,7 +60,7 @@ fi
|
||||
--disable-valgrind-testing \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp theoradec.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -48,7 +48,7 @@ if [[ ${RECONF_libuuid} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -56,7 +56,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# AUTO-GENERATED PKG-CONFIG FILE IS WRONG. CREATING IT MANUALLY
|
||||
create_uuid_package_config "1.0.3"
|
||||
|
||||
@@ -49,7 +49,7 @@ cd build
|
||||
|
||||
ASM_FLAGS=""
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
ASM_FLAGS="-DSSE2_FOUND=0 -DSSE3_FOUND=0 -DSSSE3_FOUND=0 -DSSE4_1_FOUND=0"
|
||||
;;
|
||||
*)
|
||||
@@ -65,7 +65,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$LD" \
|
||||
@@ -76,7 +76,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp vidstab.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -53,7 +53,7 @@ fi
|
||||
${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -64,7 +64,7 @@ ${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure
|
||||
--disable-oggtest \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libvorbis_package_config "1.3.6"
|
||||
|
||||
+24
-6
@@ -37,14 +37,16 @@ export CFLAGS=$(get_cflags ${LIB_NAME})
|
||||
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
|
||||
export LDFLAGS=$(get_ldflags ${LIB_NAME})
|
||||
|
||||
# note that --disable-runtime-cpu-detect is used for arm
|
||||
# using --enable-runtime-cpu-detect cause the following error
|
||||
# vpx_ports/arm_cpudetect.c:151:2: error: "--enable-runtime-cpu-detect selected, but no CPU detection method " "available for your platform. Reconfigure with --disable-runtime-cpu-detect."
|
||||
|
||||
# PREPARE CPU & ARCH OPTIONS
|
||||
TARGET=""
|
||||
ASM_FLAGS=""
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s)
|
||||
|
||||
# note that --disable-runtime-cpu-detect is used for arm
|
||||
# using --enable-runtime-cpu-detect cause the following error
|
||||
# vpx_ports/arm_cpudetect.c:151:2: error: "--enable-runtime-cpu-detect selected, but no CPU detection method " "available for your platform. Reconfigure with --disable-runtime-cpu-detect."
|
||||
|
||||
TARGET="$(get_target_arch)-darwin-gcc"
|
||||
ASM_FLAGS="--disable-runtime-cpu-detect --enable-neon --enable-neon-asm"
|
||||
;;
|
||||
@@ -56,6 +58,11 @@ case ${ARCH} in
|
||||
# vst1.64
|
||||
ASM_FLAGS="--disable-runtime-cpu-detect --enable-neon"
|
||||
;;
|
||||
arm64e)
|
||||
TARGET="arm64-darwin-gcc"
|
||||
|
||||
ASM_FLAGS="--disable-runtime-cpu-detect --enable-neon"
|
||||
;;
|
||||
i386)
|
||||
TARGET="x86-iphonesimulator-gcc"
|
||||
ASM_FLAGS="--enable-runtime-cpu-detect --disable-avx512"
|
||||
@@ -66,12 +73,23 @@ case ${ARCH} in
|
||||
;;
|
||||
esac
|
||||
|
||||
# PREPARE CONFIGURE OPTIONS
|
||||
rm -f ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
|
||||
case ${ARCH} in
|
||||
arm64e)
|
||||
cp ${BASEDIR}/tools/make/configure.libvpx.arm64e.sh ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
|
||||
;;
|
||||
*)
|
||||
cp ${BASEDIR}/tools/make/configure.libvpx.all.sh ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
|
||||
;;
|
||||
esac
|
||||
|
||||
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
|
||||
|
||||
make distclean 2>/dev/null 1>/dev/null
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--target="${TARGET}" \
|
||||
--extra-cflags="${CFLAGS}" \
|
||||
--extra-cxxflags="${CXXFLAGS}" \
|
||||
@@ -107,7 +125,7 @@ make distclean 2>/dev/null 1>/dev/null
|
||||
--disable-debug-libs \
|
||||
--disable-internal-stats || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+13
-13
@@ -48,10 +48,10 @@ mkdir build;
|
||||
cd build
|
||||
|
||||
# OVERRIDING INCLUDE PATH ORDER
|
||||
CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/include \
|
||||
-I${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/include \
|
||||
-I${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/include \
|
||||
-I${BASEDIR}/prebuilt/ios-$(get_target_host)/tiff/include $CFLAGS"
|
||||
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 \
|
||||
@@ -61,19 +61,19 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$LD" \
|
||||
-DCMAKE_AR="$AR" \
|
||||
-DCMAKE_AS="$AS" \
|
||||
-DGIF_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/include \
|
||||
-DJPEG_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/include \
|
||||
-DJPEG_LIBRARY=${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/lib \
|
||||
-DPNG_PNG_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/include \
|
||||
-DPNG_LIBRARY=${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/lib \
|
||||
-DTIFF_INCLUDE_DIR=${BASEDIR}/prebuilt/ios-$(get_target_host)/tiff/include \
|
||||
-DTIFF_LIBRARY=${BASEDIR}/prebuilt/ios-$(get_target_host)/tiff/lib \
|
||||
-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= \
|
||||
@@ -92,7 +92,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libwebp_package_config "1.0.1"
|
||||
|
||||
@@ -47,11 +47,11 @@ make distclean 2>/dev/null 1>/dev/null
|
||||
autoreconf_library ${LIB_NAME}
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--with-zlib \
|
||||
--with-iconv=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv \
|
||||
--with-iconv=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv \
|
||||
--with-sax1 \
|
||||
--without-python \
|
||||
--without-debug \
|
||||
@@ -61,7 +61,7 @@ autoreconf_library ${LIB_NAME}
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_libxml2_package_config "2.9.8"
|
||||
|
||||
@@ -37,17 +37,13 @@ TARGET_HOST=$(get_target_host)
|
||||
COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
|
||||
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
|
||||
|
||||
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include"
|
||||
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include"
|
||||
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
|
||||
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/lib -framework Foundation -framework CoreVideo -lavdevice"
|
||||
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}"
|
||||
|
||||
# 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
|
||||
# ALWAYS BUILD STATIC LIBRARIES
|
||||
BUILD_LIBRARY_OPTIONS="--enable-static --disable-shared";
|
||||
|
||||
cd ${BASEDIR}/ios || exit 1
|
||||
|
||||
@@ -72,7 +68,7 @@ ${SED_INLINE} 's/$wl-undefined //g' configure
|
||||
${SED_INLINE} 's/${wl}suppress//g' configure
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
${BUILD_LIBRARY_OPTIONS} \
|
||||
@@ -86,7 +82,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
|
||||
make -j$(get_cpu_count) 1>>${BASEDIR}/build.log 2>&1
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed"
|
||||
|
||||
+5
-5
@@ -40,7 +40,7 @@ export LDFLAGS=$(get_ldflags ${LIB_NAME})
|
||||
|
||||
OPTIONAL_CPU_SUPPORT=""
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64)
|
||||
armv7 | armv7s | arm64 | arm64e)
|
||||
OPTIONAL_CPU_SUPPORT="--enable-arm-neon"
|
||||
;;
|
||||
i386 | x86-64)
|
||||
@@ -58,11 +58,11 @@ if [[ ${RECONF_nettle} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--enable-pic \
|
||||
--enable-static \
|
||||
--with-include-path=${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/include \
|
||||
--with-lib-path=${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/lib \
|
||||
--with-include-path=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/include \
|
||||
--with-lib-path=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/lib \
|
||||
--disable-shared \
|
||||
--disable-mini-gmp \
|
||||
--disable-assembler \
|
||||
@@ -72,7 +72,7 @@ fi
|
||||
${OPTIONAL_CPU_SUPPORT} \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -58,7 +58,7 @@ if [[ ${RECONF_opencore_amr} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -67,7 +67,7 @@ fi
|
||||
--disable-maintainer-mode \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp amrwb/*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ if [[ ${RECONF_opus} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -64,7 +64,7 @@ fi
|
||||
--disable-ambisonics \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./opus.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -51,14 +51,14 @@ fi
|
||||
export ac_cv_header_libunwind_h=no
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ if [[ ${RECONF_shine} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -56,7 +56,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_CXX_COMPILER="$CXX" \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
@@ -68,7 +68,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_snappy_package_config "1.1.7"
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Generic \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$LD" \
|
||||
@@ -68,7 +68,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DBUILD_SHARED_LIBS=0 .. || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_soxr_package_config "0.1.3"
|
||||
|
||||
+2
-2
@@ -54,7 +54,7 @@ if [[ ${RECONF_speex} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -64,7 +64,7 @@ fi
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -47,11 +47,11 @@ if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_tesseract} -eq
|
||||
autoreconf_library ${LIB_NAME}
|
||||
fi
|
||||
|
||||
export LEPTONICA_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/include/leptonica"
|
||||
export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/lib -llept"
|
||||
export LEPTONICA_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/leptonica/include/leptonica"
|
||||
export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/leptonica/lib -llept"
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -66,7 +66,7 @@ export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/li
|
||||
|
||||
${SED_INLINE} 's/$wl-bind_at_load//g' libtool
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# CREATE PACKAGE CONFIG MANUALLY
|
||||
create_tesseract_package_config "3.05.02"
|
||||
|
||||
+4
-4
@@ -48,11 +48,11 @@ if [[ ${RECONF_tiff} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--with-jpeg-include-dir=${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/include \
|
||||
--with-jpeg-lib-dir=${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/lib \
|
||||
--with-jpeg-include-dir=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/include \
|
||||
--with-jpeg-lib-dir=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/lib \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-fast-install \
|
||||
@@ -62,7 +62,7 @@ fi
|
||||
--disable-lzma \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -52,7 +52,7 @@ export SNDFILE_CFLAGS="$(pkg-config --cflags sndfile)"
|
||||
export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
@@ -60,7 +60,7 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
|
||||
--disable-fast-install \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
@@ -48,7 +48,7 @@ if [[ ${RECONF_wavpack} -eq 1 ]]; then
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--with-pic \
|
||||
--with-sysroot=${SDK_PATH} \
|
||||
--without-iconv \
|
||||
@@ -59,7 +59,7 @@ fi
|
||||
--disable-tests \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+6
-3
@@ -47,8 +47,11 @@ cd ${BASEDIR}/src/${LIB_NAME} || exit 1
|
||||
|
||||
make distclean 2>/dev/null 1>/dev/null
|
||||
|
||||
ASM_FLAGS=""
|
||||
case ${ARCH} in
|
||||
i386 |x86-64)
|
||||
ASM_FLAGS="--disable-assembly"
|
||||
|
||||
if ! [ -x "$(command -v nasm)" ]; then
|
||||
echo -e "(*) nasm command not found\n"
|
||||
exit 1
|
||||
@@ -59,15 +62,15 @@ case ${ARCH} in
|
||||
esac
|
||||
|
||||
./configure \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
|
||||
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
|
||||
--enable-pic \
|
||||
--sysroot=${SDK_PATH} \
|
||||
--enable-static \
|
||||
--enable-lto \
|
||||
${ASM_FLAGS} \
|
||||
--disable-cli \
|
||||
--host=${TARGET_HOST} || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp x264.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@ case ${ARCH} in
|
||||
armv7 | armv7s)
|
||||
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=1"
|
||||
;;
|
||||
arm64)
|
||||
arm64 | arm64e)
|
||||
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1"
|
||||
;;
|
||||
*)
|
||||
@@ -120,7 +120,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSROOT="${SDK_PATH}" \
|
||||
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
|
||||
-DCMAKE_SYSTEM_NAME=Generic \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_CXX_COMPILER="$CXX" \
|
||||
@@ -134,7 +134,7 @@ cmake -Wno-dev \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
|
||||
-DENABLE_SHARED=0 ../source || exit 1
|
||||
|
||||
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
|
||||
make -j$(get_cpu_count) || exit 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp x265.pc ${INSTALL_PKG_CONFIG_DIR}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user