replace wavpack with dav1d
This commit is contained in:
parent
0cc4e89a9d
commit
2fceb5f5ed
10
README.md
10
README.md
|
@ -12,7 +12,7 @@ FFmpeg kit for applications. Supports Android, iOS, tvOS.
|
|||
- FFmpeg `v4.4-dev` releases
|
||||
- 29 external libraries
|
||||
|
||||
`chromaprint`, `fontconfig`, `freetype`, `fribidi`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libtheora`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `opencore-amr`, `openh264`, `opus`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `twolame`, `vo-amrwbenc`, `wavpack`
|
||||
`chromaprint`, `fontconfig`, `freetype`, `fribidi`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libtheora`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `opencore-amr`, `openh264`, `opus`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `twolame`, `vo-amrwbenc`, `dav1d`
|
||||
|
||||
- 5 external libraries with GPL license
|
||||
|
||||
|
@ -23,7 +23,7 @@ FFmpeg kit for applications. Supports Android, iOS, tvOS.
|
|||
- Exposes both FFmpeg library and FFmpegKit wrapper library capabilities
|
||||
- Includes cross-compile instructions for 48 open-source libraries
|
||||
|
||||
`chromaprint`, `expat`, `ffmpeg`, `fontconfig`, `freetype`, `fribidi`, `giflib`, `gmp`, `gnutls`, `harfbuzz`, `kvazaar`, `lame`, `leptonica`, `libaom`, `libass`, `libiconv`, `libilbc`, `libjpeg`, `libjpeg-turbo`, `libogg`, `libpng`, `libsamplerate`, `libsndfile`, `libtheora`, `libuuid`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `nettle`, `opencore-amr`, `openh264`, `opus`, `rubberband`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `tiff`, `twolame`, `vid.stab`, `vo-amrwbenc`, `wavpack`, `x264`, `x265`, `xvidcore`
|
||||
`chromaprint`, `expat`, `ffmpeg`, `fontconfig`, `freetype`, `fribidi`, `giflib`, `gmp`, `gnutls`, `harfbuzz`, `kvazaar`, `lame`, `leptonica`, `libaom`, `libass`, `libiconv`, `libilbc`, `libjpeg`, `libjpeg-turbo`, `libogg`, `libpng`, `libsamplerate`, `libsndfile`, `libtheora`, `libuuid`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `nettle`, `opencore-amr`, `openh264`, `opus`, `rubberband`, `sdl`, `shine`, `snappy`, `soxr`, `speex`, `tesseract`, `tiff`, `twolame`, `vid.stab`, `vo-amrwbenc`, `dav1d`, `x264`, `x265`, `xvidcore`
|
||||
|
||||
- Licensed under LGPL 3.0, can be customized to support GPL v3.0
|
||||
|
||||
|
@ -85,10 +85,10 @@ Please remember that some parts of `FFmpeg` are licensed under the `GPL` and onl
|
|||
<td align="center"><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
|
||||
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup></td>
|
||||
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup><br><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
|
||||
<td align="center"><sup>lame</sup><br><sup>libilbc</sup><br><sup>libvorbis</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>vo-amrwbenc</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>vo-amrwbenc</sup><br><sup>dav1d</sup></td>
|
||||
<td align="center"><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>kvazaar</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libtheora</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>snappy</sup></td>
|
||||
<td align="center"><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>twolame</sup><br><sup>vo-amrwbenc</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>vo-amrwbenc</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>vo-amrwbenc</sup><br><sup>dav1d</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>vo-amrwbenc</sup><br><sup>dav1d</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>
|
||||
|
|
|
@ -32,6 +32,7 @@ class Packages {
|
|||
|
||||
static {
|
||||
supportedExternalLibraries = new ArrayList<>();
|
||||
supportedExternalLibraries.add("dav1d");
|
||||
supportedExternalLibraries.add("fontconfig");
|
||||
supportedExternalLibraries.add("freetype");
|
||||
supportedExternalLibraries.add("fribidi");
|
||||
|
@ -59,7 +60,6 @@ class Packages {
|
|||
supportedExternalLibraries.add("speex");
|
||||
supportedExternalLibraries.add("tesseract");
|
||||
supportedExternalLibraries.add("twolame");
|
||||
supportedExternalLibraries.add("wavpack");
|
||||
supportedExternalLibraries.add("x264");
|
||||
supportedExternalLibraries.add("x265");
|
||||
supportedExternalLibraries.add("xvid");
|
||||
|
@ -129,7 +129,8 @@ class Packages {
|
|||
}
|
||||
|
||||
if (fullGpl) {
|
||||
if (externalLibraryList.contains("fontconfig") &&
|
||||
if (externalLibraryList.contains("dav1d") &&
|
||||
externalLibraryList.contains("fontconfig") &&
|
||||
externalLibraryList.contains("freetype") &&
|
||||
externalLibraryList.contains("fribidi") &&
|
||||
externalLibraryList.contains("gmp") &&
|
||||
|
@ -152,7 +153,6 @@ class Packages {
|
|||
externalLibraryList.contains("soxr") &&
|
||||
externalLibraryList.contains("speex") &&
|
||||
externalLibraryList.contains("twolame") &&
|
||||
externalLibraryList.contains("wavpack") &&
|
||||
externalLibraryList.contains("x264") &&
|
||||
externalLibraryList.contains("x265") &&
|
||||
externalLibraryList.contains("xvid")) {
|
||||
|
@ -163,7 +163,8 @@ class Packages {
|
|||
}
|
||||
|
||||
if (full) {
|
||||
if (externalLibraryList.contains("fontconfig") &&
|
||||
if (externalLibraryList.contains("dav1d") &&
|
||||
externalLibraryList.contains("fontconfig") &&
|
||||
externalLibraryList.contains("freetype") &&
|
||||
externalLibraryList.contains("fribidi") &&
|
||||
externalLibraryList.contains("gmp") &&
|
||||
|
@ -184,8 +185,7 @@ class Packages {
|
|||
externalLibraryList.contains("snappy") &&
|
||||
externalLibraryList.contains("soxr") &&
|
||||
externalLibraryList.contains("speex") &&
|
||||
externalLibraryList.contains("twolame") &&
|
||||
externalLibraryList.contains("wavpack")) {
|
||||
externalLibraryList.contains("twolame")) {
|
||||
return "full";
|
||||
} else {
|
||||
return "custom";
|
||||
|
@ -193,7 +193,8 @@ class Packages {
|
|||
}
|
||||
|
||||
if (video) {
|
||||
if (externalLibraryList.contains("fontconfig") &&
|
||||
if (externalLibraryList.contains("dav1d") &&
|
||||
externalLibraryList.contains("fontconfig") &&
|
||||
externalLibraryList.contains("freetype") &&
|
||||
externalLibraryList.contains("fribidi") &&
|
||||
externalLibraryList.contains("kvazaar") &&
|
||||
|
@ -218,8 +219,7 @@ class Packages {
|
|||
externalLibraryList.contains("shine") &&
|
||||
externalLibraryList.contains("soxr") &&
|
||||
externalLibraryList.contains("speex") &&
|
||||
externalLibraryList.contains("twolame") &&
|
||||
externalLibraryList.contains("wavpack")) {
|
||||
externalLibraryList.contains("twolame")) {
|
||||
return "audio";
|
||||
} else {
|
||||
return "custom";
|
||||
|
|
|
@ -92,6 +92,7 @@ public class FFmpegKitConfigTest {
|
|||
|
||||
final List<String> supportedExternalLibraries = new ArrayList<>();
|
||||
supportedExternalLibraries.add("chromaprint");
|
||||
supportedExternalLibraries.add("dav1d");
|
||||
supportedExternalLibraries.add("fontconfig");
|
||||
supportedExternalLibraries.add("freetype");
|
||||
supportedExternalLibraries.add("fribidi");
|
||||
|
@ -118,7 +119,6 @@ public class FFmpegKitConfigTest {
|
|||
supportedExternalLibraries.add("speex");
|
||||
supportedExternalLibraries.add("tesseract");
|
||||
supportedExternalLibraries.add("twolame");
|
||||
supportedExternalLibraries.add("wavpack");
|
||||
supportedExternalLibraries.add("x264");
|
||||
supportedExternalLibraries.add("x265");
|
||||
supportedExternalLibraries.add("xvidcore");
|
||||
|
|
4
apple.sh
4
apple.sh
|
@ -45,6 +45,7 @@ After that this script should be used to create an umbrella xcframework.\n"
|
|||
echo -e "Libraries:"
|
||||
echo -e " --full\t\t\tbuilds umbrella xcframeworks all non-GPL external libraries"
|
||||
echo -e " --enable-chromaprint\t\tbuild umbrella xcframework for chromaprint [no]"
|
||||
echo -e " --enable-dav1d\t\tbuild umbrella xcframework for dav1d [no]"
|
||||
echo -e " --enable-fontconfig\t\tbuild umbrella xcframework for fontconfig [no]"
|
||||
echo -e " --enable-freetype\t\tbuild umbrella xcframework for freetype [no]"
|
||||
echo -e " --enable-fribidi\t\tbuild umbrella xcframework for fribidi [no]"
|
||||
|
@ -70,8 +71,7 @@ After that this script should be used to create an umbrella xcframework.\n"
|
|||
echo -e " --enable-speex\t\tbuild umbrella xcframework for speex [no]"
|
||||
echo -e " --enable-tesseract\t\tbuild umbrella xcframework for tesseract [no]"
|
||||
echo -e " --enable-twolame\t\tbuild umbrella xcframework for twolame [no]"
|
||||
echo -e " --enable-vo-amrwbenc\t\tbuild umbrella xcframework for vo-amrwbenc [no]"
|
||||
echo -e " --enable-wavpack\t\tbuild umbrella xcframework for wavpack [no]\n"
|
||||
echo -e " --enable-vo-amrwbenc\t\tbuild umbrella xcframework for vo-amrwbenc [no]\n"
|
||||
|
||||
echo -e "GPL libraries:"
|
||||
echo -e " --enable-libvidstab\t\tbuild umbrella xcframework for libvidstab [no]"
|
||||
|
|
|
@ -424,6 +424,7 @@ void callbackBlockFunction() {
|
|||
|
||||
+ (void)initialize {
|
||||
supportedExternalLibraries = [[NSMutableArray alloc] init];
|
||||
[supportedExternalLibraries addObject:@"dav1d"];
|
||||
[supportedExternalLibraries addObject:@"fontconfig"];
|
||||
[supportedExternalLibraries addObject:@"freetype"];
|
||||
[supportedExternalLibraries addObject:@"fribidi"];
|
||||
|
@ -452,7 +453,6 @@ void callbackBlockFunction() {
|
|||
[supportedExternalLibraries addObject:@"speex"];
|
||||
[supportedExternalLibraries addObject:@"tesseract"];
|
||||
[supportedExternalLibraries addObject:@"twolame"];
|
||||
[supportedExternalLibraries addObject:@"wavpack"];
|
||||
[supportedExternalLibraries addObject:@"x264"];
|
||||
[supportedExternalLibraries addObject:@"x265"];
|
||||
[supportedExternalLibraries addObject:@"xvid"];
|
||||
|
@ -755,7 +755,8 @@ void callbackBlockFunction() {
|
|||
}
|
||||
|
||||
if (fullGpl) {
|
||||
if ([enabledLibraryArray containsObject:@"fontconfig"] &&
|
||||
if ([enabledLibraryArray containsObject:@"dav1d"] &&
|
||||
[enabledLibraryArray containsObject:@"fontconfig"] &&
|
||||
[enabledLibraryArray containsObject:@"freetype"] &&
|
||||
[enabledLibraryArray containsObject:@"fribidi"] &&
|
||||
[enabledLibraryArray containsObject:@"gmp"] &&
|
||||
|
@ -779,7 +780,6 @@ void callbackBlockFunction() {
|
|||
[enabledLibraryArray containsObject:@"soxr"] &&
|
||||
[enabledLibraryArray containsObject:@"speex"] &&
|
||||
[enabledLibraryArray containsObject:@"twolame"] &&
|
||||
[enabledLibraryArray containsObject:@"wavpack"] &&
|
||||
[enabledLibraryArray containsObject:@"x264"] &&
|
||||
[enabledLibraryArray containsObject:@"x265"] &&
|
||||
[enabledLibraryArray containsObject:@"xvid"]) {
|
||||
|
@ -790,7 +790,8 @@ void callbackBlockFunction() {
|
|||
}
|
||||
|
||||
if (full) {
|
||||
if ([enabledLibraryArray containsObject:@"fontconfig"] &&
|
||||
if ([enabledLibraryArray containsObject:@"dav1d"] &&
|
||||
[enabledLibraryArray containsObject:@"fontconfig"] &&
|
||||
[enabledLibraryArray containsObject:@"freetype"] &&
|
||||
[enabledLibraryArray containsObject:@"fribidi"] &&
|
||||
[enabledLibraryArray containsObject:@"gmp"] &&
|
||||
|
@ -812,8 +813,7 @@ void callbackBlockFunction() {
|
|||
[enabledLibraryArray containsObject:@"snappy"] &&
|
||||
[enabledLibraryArray containsObject:@"soxr"] &&
|
||||
[enabledLibraryArray containsObject:@"speex"] &&
|
||||
[enabledLibraryArray containsObject:@"twolame"] &&
|
||||
[enabledLibraryArray containsObject:@"wavpack"]) {
|
||||
[enabledLibraryArray containsObject:@"twolame"]) {
|
||||
return @"full";
|
||||
} else {
|
||||
return @"custom";
|
||||
|
@ -821,7 +821,8 @@ void callbackBlockFunction() {
|
|||
}
|
||||
|
||||
if (video) {
|
||||
if ([enabledLibraryArray containsObject:@"fontconfig"] &&
|
||||
if ([enabledLibraryArray containsObject:@"dav1d"] &&
|
||||
[enabledLibraryArray containsObject:@"fontconfig"] &&
|
||||
[enabledLibraryArray containsObject:@"freetype"] &&
|
||||
[enabledLibraryArray containsObject:@"fribidi"] &&
|
||||
[enabledLibraryArray containsObject:@"kvazaar"] &&
|
||||
|
@ -847,8 +848,7 @@ void callbackBlockFunction() {
|
|||
[enabledLibraryArray containsObject:@"shine"] &&
|
||||
[enabledLibraryArray containsObject:@"soxr"] &&
|
||||
[enabledLibraryArray containsObject:@"speex"] &&
|
||||
[enabledLibraryArray containsObject:@"twolame"] &&
|
||||
[enabledLibraryArray containsObject:@"wavpack"]) {
|
||||
[enabledLibraryArray containsObject:@"twolame"]) {
|
||||
return @"audio";
|
||||
} else {
|
||||
return @"custom";
|
||||
|
|
27
scripts/android/dav1d.sh
Normal file
27
scripts/android/dav1d.sh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SET BUILD FLAGS
|
||||
CROSS_FILE="${BASEDIR}"/src/"${LIB_NAME}"/package/crossfiles/$ARCH-$FFMPEG_KIT_BUILD_TYPE.meson
|
||||
|
||||
create_mason_cross_file "$CROSS_FILE" || return 1
|
||||
|
||||
# ALWAYS CLEAN THE PREVIOUS BUILD
|
||||
rm -rf "${BUILD_DIR}" || return 1
|
||||
|
||||
meson "${BUILD_DIR}" \
|
||||
--cross-file="$CROSS_FILE" \
|
||||
-Db_lto=true \
|
||||
-Db_ndebug=false \
|
||||
-Denable_asm=false \
|
||||
-Denable_tools=false \
|
||||
-Denable_examples=false \
|
||||
-Denable_tests=false || return 1
|
||||
|
||||
cd "${BUILD_DIR}" || return 1
|
||||
|
||||
ninja -j$(get_cpu_count) || return 1
|
||||
|
||||
ninja install || return 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp "${BUILD_DIR}"/meson-private/dav1d.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1
|
|
@ -92,6 +92,11 @@ for library in {1..58}; do
|
|||
exit 1
|
||||
fi
|
||||
;;
|
||||
dav1d)
|
||||
CFLAGS+=" $(pkg-config --cflags dav1d 2>>"${BASEDIR}"/build.log)"
|
||||
LDFLAGS+=" $(pkg-config --libs --static dav1d 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-libdav1d"
|
||||
;;
|
||||
fontconfig)
|
||||
CFLAGS+=" $(pkg-config --cflags fontconfig 2>>"${BASEDIR}"/build.log)"
|
||||
LDFLAGS+=" $(pkg-config --libs --static fontconfig 2>>"${BASEDIR}"/build.log)"
|
||||
|
@ -241,11 +246,6 @@ for library in {1..58}; do
|
|||
LDFLAGS+=" $(pkg-config --libs --static vo-amrwbenc 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-libvo-amrwbenc"
|
||||
;;
|
||||
wavpack)
|
||||
CFLAGS+=" $(pkg-config --cflags wavpack 2>>"${BASEDIR}"/build.log)"
|
||||
LDFLAGS+=" $(pkg-config --libs --static wavpack 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-libwavpack"
|
||||
;;
|
||||
x264)
|
||||
CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)"
|
||||
LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)"
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# ALWAYS CLEAN THE PREVIOUS BUILD
|
||||
make distclean 2>/dev/null 1>/dev/null
|
||||
|
||||
# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED
|
||||
if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_wavpack} -eq 1 ]]; then
|
||||
autoreconf_library "${LIB_NAME}"
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix="${LIB_INSTALL_PREFIX}" \
|
||||
--with-pic \
|
||||
--with-sysroot="${ANDROID_SYSROOT}" \
|
||||
--without-iconv \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-apps \
|
||||
--disable-fast-install \
|
||||
--disable-tests \
|
||||
--host="${HOST}" || return 1
|
||||
|
||||
make -j$(get_cpu_count) || return 1
|
||||
|
||||
make install || return 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1
|
27
scripts/apple/dav1d.sh
Normal file
27
scripts/apple/dav1d.sh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SET BUILD FLAGS
|
||||
CROSS_FILE="${BASEDIR}"/src/"${LIB_NAME}"/package/crossfiles/$ARCH-$FFMPEG_KIT_BUILD_TYPE.meson
|
||||
|
||||
create_mason_cross_file "$CROSS_FILE" || return 1
|
||||
|
||||
# ALWAYS CLEAN THE PREVIOUS BUILD
|
||||
rm -rf "${BUILD_DIR}" || return 1
|
||||
|
||||
meson "${BUILD_DIR}" \
|
||||
--cross-file="$CROSS_FILE" \
|
||||
-Db_lto=false \
|
||||
-Db_ndebug=false \
|
||||
-Denable_asm=false \
|
||||
-Denable_tools=false \
|
||||
-Denable_examples=false \
|
||||
-Denable_tests=false || return 1
|
||||
|
||||
cd "${BUILD_DIR}" || return 1
|
||||
|
||||
ninja -j$(get_cpu_count) || return 1
|
||||
|
||||
ninja install || return 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp "${BUILD_DIR}"/meson-private/dav1d.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1
|
|
@ -121,6 +121,11 @@ for library in {1..58}; do
|
|||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static libchromaprint 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-chromaprint"
|
||||
;;
|
||||
dav1d)
|
||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags dav1d 2>>"${BASEDIR}"/build.log)"
|
||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static dav1d 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-libdav1d"
|
||||
;;
|
||||
fontconfig)
|
||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags fontconfig 2>>"${BASEDIR}"/build.log)"
|
||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static fontconfig 2>>"${BASEDIR}"/build.log)"
|
||||
|
@ -264,11 +269,6 @@ for library in {1..58}; do
|
|||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static vo-amrwbenc 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-libvo-amrwbenc"
|
||||
;;
|
||||
wavpack)
|
||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags wavpack 2>>"${BASEDIR}"/build.log)"
|
||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static wavpack 2>>"${BASEDIR}"/build.log)"
|
||||
CONFIGURE_POSTFIX+=" --enable-libwavpack"
|
||||
;;
|
||||
x264)
|
||||
FFMPEG_CFLAGS+=" $(pkg-config --cflags x264 2>>"${BASEDIR}"/build.log)"
|
||||
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static x264 2>>"${BASEDIR}"/build.log)"
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SET BUILD OPTIONS
|
||||
ASM_OPTIONS=""
|
||||
case ${ARCH} in
|
||||
armv7 | armv7s | arm64*)
|
||||
ASM_OPTIONS="--disable-asm"
|
||||
;;
|
||||
*)
|
||||
ASM_OPTIONS="--enable-asm"
|
||||
;;
|
||||
esac
|
||||
|
||||
# ALWAYS CLEAN THE PREVIOUS BUILD
|
||||
make distclean 2>/dev/null 1>/dev/null
|
||||
|
||||
# REGENERATE BUILD FILES IF NECESSARY OR REQUESTED
|
||||
if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_wavpack} -eq 1 ]]; then
|
||||
autoreconf_library "${LIB_NAME}"
|
||||
fi
|
||||
|
||||
./configure \
|
||||
--prefix="${LIB_INSTALL_PREFIX}" \
|
||||
--with-pic \
|
||||
--with-sysroot="${SDK_PATH}" \
|
||||
--without-iconv \
|
||||
${ASM_OPTIONS} \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-apps \
|
||||
--disable-fast-install \
|
||||
--disable-tests \
|
||||
--host="${HOST}" || return 1
|
||||
|
||||
make -j$(get_cpu_count) || return 1
|
||||
|
||||
make install || return 1
|
||||
|
||||
# MANUALLY COPY PKG-CONFIG FILES
|
||||
cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1
|
|
@ -447,6 +447,31 @@ get_ldflags() {
|
|||
echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS} -Wl,--hash-style=both -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a"
|
||||
}
|
||||
|
||||
create_mason_cross_file() {
|
||||
cat >"$1" <<EOF
|
||||
[binaries]
|
||||
c = '$CC'
|
||||
cpp = '$CXX'
|
||||
ar = '$AR'
|
||||
strip = '$STRIP'
|
||||
pkgconfig = 'pkg-config'
|
||||
|
||||
[properties]
|
||||
sys_root = '$ANDROID_SYSROOT'
|
||||
has_function_printf = true
|
||||
|
||||
[host_machine]
|
||||
system = '$(get_meson_target_host_family)'
|
||||
cpu_family = '$(get_meson_target_cpu_family)'
|
||||
cpu = '$(get_cmake_system_processor)'
|
||||
endian = 'little'
|
||||
|
||||
[built-in options]
|
||||
default_library = 'static'
|
||||
prefix = '${LIB_INSTALL_PREFIX}'
|
||||
EOF
|
||||
}
|
||||
|
||||
create_chromaprint_package_config() {
|
||||
local CHROMAPRINT_VERSION="$1"
|
||||
|
||||
|
|
|
@ -1204,6 +1204,31 @@ get_sdk_path() {
|
|||
echo "$(xcrun --sdk "$(get_sdk_name)" --show-sdk-path)"
|
||||
}
|
||||
|
||||
create_mason_cross_file() {
|
||||
cat >"$1" <<EOF
|
||||
[binaries]
|
||||
c = '$CC'
|
||||
cpp = '$CXX'
|
||||
ar = '$AR'
|
||||
strip = '$STRIP'
|
||||
pkgconfig = 'pkg-config'
|
||||
|
||||
[properties]
|
||||
sys_root = '$SDK_PATH'
|
||||
has_function_printf = true
|
||||
|
||||
[host_machine]
|
||||
system = '$(get_meson_target_host_family)'
|
||||
cpu_family = '$(get_meson_target_cpu_family)'
|
||||
cpu = '$(get_target_cpu)'
|
||||
endian = 'little'
|
||||
|
||||
[built-in options]
|
||||
default_library = 'static'
|
||||
prefix = '${LIB_INSTALL_PREFIX}'
|
||||
EOF
|
||||
}
|
||||
|
||||
create_fontconfig_package_config() {
|
||||
local FONTCONFIG_VERSION="$1"
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ get_library_name() {
|
|||
13) echo "opencore-amr" ;;
|
||||
14) echo "shine" ;;
|
||||
15) echo "speex" ;;
|
||||
16) echo "wavpack" ;;
|
||||
16) echo "dav1d" ;;
|
||||
17) echo "kvazaar" ;;
|
||||
18) echo "x264" ;;
|
||||
19) echo "xvidcore" ;;
|
||||
|
@ -194,7 +194,7 @@ from_library_name() {
|
|||
opencore-amr) echo 13 ;;
|
||||
shine) echo 14 ;;
|
||||
speex) echo 15 ;;
|
||||
wavpack) echo 16 ;;
|
||||
dav1d) echo 16 ;;
|
||||
kvazaar) echo 17 ;;
|
||||
x264) echo 18 ;;
|
||||
xvidcore) echo 19 ;;
|
||||
|
@ -246,7 +246,7 @@ from_library_name() {
|
|||
is_library_supported_on_platform() {
|
||||
local library_index=$(from_library_name "$1")
|
||||
case ${library_index} in
|
||||
0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20)
|
||||
0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20)
|
||||
echo "0"
|
||||
;;
|
||||
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 40)
|
||||
|
@ -378,6 +378,34 @@ get_package_config_file_name() {
|
|||
esac
|
||||
}
|
||||
|
||||
get_meson_target_host_family() {
|
||||
case ${FFMPEG_KIT_BUILD_TYPE} in
|
||||
android)
|
||||
echo "android"
|
||||
;;
|
||||
*)
|
||||
echo "darwin"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_meson_target_cpu_family() {
|
||||
case ${ARCH} in
|
||||
arm*)
|
||||
echo "arm"
|
||||
;;
|
||||
x86-64*)
|
||||
echo "x86_64"
|
||||
;;
|
||||
x86*)
|
||||
echo "x86"
|
||||
;;
|
||||
*)
|
||||
echo "${ARCH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_target() {
|
||||
case ${ARCH} in
|
||||
*-mac-catalyst)
|
||||
|
@ -546,6 +574,7 @@ display_help_licensing() {
|
|||
|
||||
display_help_common_libraries() {
|
||||
echo -e " --enable-chromaprint\t\tbuild with chromaprint [no]"
|
||||
echo -e " --enable-dav1d\t\tbuild with dav1d [no]"
|
||||
echo -e " --enable-fontconfig\t\tbuild with fontconfig [no]"
|
||||
echo -e " --enable-freetype\t\tbuild with freetype [no]"
|
||||
echo -e " --enable-fribidi\t\tbuild with fribidi [no]"
|
||||
|
@ -578,8 +607,7 @@ display_help_common_libraries() {
|
|||
echo -e " --enable-speex\t\tbuild with speex [no]"
|
||||
echo -e " --enable-tesseract\t\tbuild with tesseract [no]"
|
||||
echo -e " --enable-twolame\t\tbuild with twolame [no]"
|
||||
echo -e " --enable-vo-amrwbenc\t\tbuild with vo-amrwbenc [no]"
|
||||
echo -e " --enable-wavpack\t\tbuild with wavpack [no]\n"
|
||||
echo -e " --enable-vo-amrwbenc\t\tbuild with vo-amrwbenc [no]\n"
|
||||
}
|
||||
|
||||
display_help_gpl_libraries() {
|
||||
|
@ -744,6 +772,9 @@ set_library() {
|
|||
# CPU-FEATURES IS ALWAYS ENABLED
|
||||
ENABLED_LIBRARIES[LIBRARY_CPU_FEATURES]=1
|
||||
;;
|
||||
dav1d)
|
||||
ENABLED_LIBRARIES[LIBRARY_DAV1D]=$2
|
||||
;;
|
||||
fontconfig)
|
||||
ENABLED_LIBRARIES[LIBRARY_FONTCONFIG]=$2
|
||||
ENABLED_LIBRARIES[LIBRARY_EXPAT]=$2
|
||||
|
@ -880,9 +911,6 @@ set_library() {
|
|||
vo-amrwbenc)
|
||||
ENABLED_LIBRARIES[LIBRARY_VO_AMRWBENC]=$2
|
||||
;;
|
||||
wavpack)
|
||||
ENABLED_LIBRARIES[LIBRARY_WAVPACK]=$2
|
||||
;;
|
||||
x264)
|
||||
ENABLED_LIBRARIES[LIBRARY_X264]=$2
|
||||
;;
|
||||
|
|
|
@ -21,6 +21,11 @@ get_library_source() {
|
|||
SOURCE_ID="v0.6.0"
|
||||
SOURCE_TYPE="TAG"
|
||||
;;
|
||||
dav1d)
|
||||
SOURCE_REPO_URL="https://code.videolan.org/videolan/dav1d"
|
||||
SOURCE_ID="0.8.1"
|
||||
SOURCE_TYPE="TAG"
|
||||
;;
|
||||
expat)
|
||||
SOURCE_REPO_URL="https://github.com/tanersener/libexpat"
|
||||
SOURCE_ID="R_2_2_10"
|
||||
|
@ -30,7 +35,7 @@ get_library_source() {
|
|||
SOURCE_REPO_URL="https://github.com/tanersener/FFmpeg"
|
||||
SOURCE_ID="9f38fac053010205806ece11e6aea9b7d3bde041"
|
||||
SOURCE_TYPE="COMMIT"
|
||||
SOURCE_GIT_DESCRIBE="n4.4-dev-2765-g9f38fac053" # git describe --tags
|
||||
SOURCE_GIT_DESCRIBE="n4.4-dev-2765-g9f38fac053" # git describe --tags
|
||||
;;
|
||||
fontconfig)
|
||||
SOURCE_REPO_URL="https://github.com/tanersener/fontconfig"
|
||||
|
@ -232,11 +237,6 @@ get_library_source() {
|
|||
SOURCE_ID="v0.1.3"
|
||||
SOURCE_TYPE="TAG"
|
||||
;;
|
||||
wavpack)
|
||||
SOURCE_REPO_URL="https://github.com/tanersener/wavpack"
|
||||
SOURCE_ID="5.3.0"
|
||||
SOURCE_TYPE="TAG"
|
||||
;;
|
||||
x264)
|
||||
SOURCE_REPO_URL="https://github.com/tanersener/x264"
|
||||
SOURCE_ID="d198931a63049db1f2c92d96c34904c69fde8117"
|
||||
|
|
|
@ -63,7 +63,7 @@ LIBRARY_LIBXML2=12
|
|||
LIBRARY_OPENCOREAMR=13
|
||||
LIBRARY_SHINE=14
|
||||
LIBRARY_SPEEX=15
|
||||
LIBRARY_WAVPACK=16
|
||||
LIBRARY_DAV1D=16
|
||||
LIBRARY_KVAZAAR=17
|
||||
LIBRARY_X264=18
|
||||
LIBRARY_XVIDCORE=19
|
||||
|
|
2
src/.gitignore
vendored
2
src/.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
chromaprint
|
||||
cpu-features
|
||||
dav1d
|
||||
expat
|
||||
ffmpeg
|
||||
fontconfig
|
||||
|
@ -42,7 +43,6 @@ tesseract
|
|||
tiff
|
||||
twolame
|
||||
vo-amrwbenc
|
||||
wavpack
|
||||
x264
|
||||
x265
|
||||
xvidcore
|
||||
|
|
Loading…
Reference in New Issue
Block a user