Merge branch 'main' into development-react-native

This commit is contained in:
Taner Sener 2022-06-01 00:08:49 +01:00
commit 5b794ca79c
10 changed files with 103 additions and 18 deletions

View File

@ -5,9 +5,21 @@ on:
branches: branches:
- development - development
- main - main
paths:
- '.github/workflows/android-build-scripts.yml'
- 'android/**'
- 'scripts/**'
- 'tools/**'
- 'android.sh'
pull_request: pull_request:
branches: branches:
- main - main
paths:
- '.github/workflows/android-build-scripts.yml'
- 'android/**'
- 'scripts/**'
- 'tools/**'
- 'android.sh'
jobs: jobs:
build-main-on-linux: build-main-on-linux:
@ -126,3 +138,32 @@ jobs:
- name: print ffbuild logs - name: print ffbuild logs
if: ${{ failure() }} if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-without-ffmpeg-kit-protocols-on-linux:
name: build without ffmpeg-kit protocols
runs-on: ubuntu-20.04
strategy:
matrix:
ndk-version: [ 'r22b-linux-x86_64' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: set up adopt jdk 8
uses: actions/setup-java@v2.2.0
with:
distribution: 'adopt'
java-version: '8'
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh --no-ffmpeg-kit-protocols --disable-x86 --disable-x86-64 --disable-arm-v7a --disable-arm-v7a-neon
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'

View File

@ -5,9 +5,23 @@ on:
branches: branches:
- development - development
- main - main
paths:
- '.github/workflows/ios-build-scripts.yml'
- 'apple/**'
- 'scripts/**'
- 'tools/**'
- 'apple.sh'
- 'ios.sh'
pull_request: pull_request:
branches: branches:
- main - main
paths:
- '.github/workflows/ios-build-scripts.yml'
- 'apple/**'
- 'scripts/**'
- 'tools/**'
- 'apple.sh'
- 'ios.sh'
jobs: jobs:
build-main-on-macos-bigsur: build-main-on-macos-bigsur:

View File

@ -5,9 +5,23 @@ on:
branches: branches:
- development - development
- main - main
paths:
- '.github/workflows/macos-build-scripts.yml'
- 'apple/**'
- 'scripts/**'
- 'tools/**'
- 'apple.sh'
- 'macos.sh'
pull_request: pull_request:
branches: branches:
- main - main
paths:
- '.github/workflows/macos-build-scripts.yml'
- 'apple/**'
- 'scripts/**'
- 'tools/**'
- 'apple.sh'
- 'macos.sh'
jobs: jobs:
build-main-on-macos-bigsur: build-main-on-macos-bigsur:

View File

@ -20,11 +20,11 @@ jobs:
with: with:
ref: ${{ matrix.branches }} ref: ${{ matrix.branches }}
- name: prerequisites - name: prerequisites
run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja ragel --overwrite
- name: set up xcode - name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script - name: run the build script
run: PATH="/usr/local/opt/bison/bin:$PATH" ./ios.sh -x --full --enable-gpl --disable-lib-srt run: PATH="/usr/local/opt/bison/bin:$PATH" XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./ios.sh -x --full --enable-gpl --disable-lib-srt
- name: print build logs - name: print build logs
if: ${{ always() }} if: ${{ always() }}
run: cat build.log run: cat build.log
@ -46,11 +46,11 @@ jobs:
with: with:
ref: ${{ matrix.branches }} ref: ${{ matrix.branches }}
- name: prerequisites - name: prerequisites
run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja ragel --overwrite
- name: set up xcode - name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script - name: run the build script
run: PATH="/usr/local/opt/bison/bin:$PATH" ./ios.sh -l --full --enable-gpl --disable-lib-srt run: PATH="/usr/local/opt/bison/bin:$PATH" XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./ios.sh -l --full --enable-gpl --disable-lib-srt
- name: print build logs - name: print build logs
if: ${{ always() }} if: ${{ always() }}
run: cat build.log run: cat build.log
@ -72,11 +72,11 @@ jobs:
with: with:
ref: ${{ matrix.branches }} ref: ${{ matrix.branches }}
- name: prerequisites - name: prerequisites
run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja ragel --overwrite
- name: set up xcode - name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script - name: run the build script
run: PATH="/usr/local/opt/bison/bin:$PATH" ./macos.sh -x --full --enable-gpl --disable-lib-srt run: PATH="/usr/local/opt/bison/bin:$PATH" XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./macos.sh -x --full --enable-gpl --disable-lib-srt
- name: print build logs - name: print build logs
if: ${{ always() }} if: ${{ always() }}
run: cat build.log run: cat build.log
@ -98,11 +98,11 @@ jobs:
with: with:
ref: ${{ matrix.branches }} ref: ${{ matrix.branches }}
- name: prerequisites - name: prerequisites
run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja ragel --overwrite
- name: set up xcode - name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script - name: run the build script
run: PATH="/usr/local/opt/bison/bin:$PATH" ./macos.sh -l --full --enable-gpl --disable-lib-srt run: PATH="/usr/local/opt/bison/bin:$PATH" XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./macos.sh -l --full --enable-gpl --disable-lib-srt
- name: print build logs - name: print build logs
if: ${{ always() }} if: ${{ always() }}
run: cat build.log run: cat build.log
@ -124,11 +124,11 @@ jobs:
with: with:
ref: ${{ matrix.branches }} ref: ${{ matrix.branches }}
- name: prerequisites - name: prerequisites
run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja ragel --overwrite
- name: set up xcode - name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script - name: run the build script
run: PATH="/usr/local/opt/bison/bin:$PATH" ./tvos.sh -x --full --enable-gpl --disable-lib-srt run: PATH="/usr/local/opt/bison/bin:$PATH" XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./tvos.sh -x --full --enable-gpl --disable-lib-srt
- name: print build logs - name: print build logs
if: ${{ always() }} if: ${{ always() }}
run: cat build.log run: cat build.log
@ -150,11 +150,11 @@ jobs:
with: with:
ref: ${{ matrix.branches }} ref: ${{ matrix.branches }}
- name: prerequisites - name: prerequisites
run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja run: brew install autoconf automake libtool pkg-config curl git cmake gcc gperf texinfo yasm nasm bison autogen wget meson ninja ragel --overwrite
- name: set up xcode - name: set up xcode
run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh
- name: run the build script - name: run the build script
run: PATH="/usr/local/opt/bison/bin:$PATH" ./tvos.sh -l --full --enable-gpl --disable-lib-srt run: PATH="/usr/local/opt/bison/bin:$PATH" XML_CATALOG_FILES="/usr/local/etc/xml/catalog" ./tvos.sh -l --full --enable-gpl --disable-lib-srt
- name: print build logs - name: print build logs
if: ${{ always() }} if: ${{ always() }}
run: cat build.log run: cat build.log

View File

@ -5,9 +5,23 @@ on:
branches: branches:
- development - development
- main - main
paths:
- '.github/workflows/tvos-build-scripts.yml'
- 'apple/**'
- 'scripts/**'
- 'tools/**'
- 'apple.sh'
- 'tvos.sh'
pull_request: pull_request:
branches: branches:
- main - main
paths:
- '.github/workflows/tvos-build-scripts.yml'
- 'apple/**'
- 'scripts/**'
- 'tools/**'
- 'apple.sh'
- 'tvos.sh'
jobs: jobs:
build-main-on-macos-bigsur: build-main-on-macos-bigsur:

View File

@ -77,7 +77,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director
} }
dependencies { dependencies {
implementation 'com.arthenica:ffmpeg-kit-full:4.5.1' implementation 'com.arthenica:ffmpeg-kit-full:4.5.1-1'
} }
``` ```

View File

@ -1,7 +1,7 @@
buildscript { buildscript {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.android.tools.build:gradle:4.2.2'
@ -11,7 +11,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }

View File

@ -66,7 +66,7 @@ Please note that `FFmpegKit` project repository includes the source code of `FFm
Use your package manager (brew, etc.) to install the following packages. Use your package manager (brew, etc.) to install the following packages.
``` ```
autoconf automake libtool pkg-config curl cmake gcc gperf texinfo yasm nasm bison autogen git wget autopoint meson ninja autoconf automake libtool pkg-config curl cmake gcc gperf texinfo yasm nasm bison autogen git wget gettext meson ninja
``` ```
#### 2.2 Options #### 2.2 Options

View File

@ -405,7 +405,7 @@ ${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffb
# 3. Enable ffmpeg-kit protocols # 3. Enable ffmpeg-kit protocols
if [[ ${NO_FFMPEG_KIT_PROTOCOLS} == "1" ]]; then if [[ ${NO_FFMPEG_KIT_PROTOCOLS} == "1" ]]; then
${SED_INLINE} "s/ av_set_fd_close/\/\/av_set_fd_close/g" "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.c 1>>"${BASEDIR}"/build.log 2>&1 ${SED_INLINE} "s| av_set_saf|//av_set_saf|g" "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.c 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nINFO: Disabled custom ffmpeg-kit protocols\n" 1>>"${BASEDIR}"/build.log 2>&1 echo -e "\nINFO: Disabled custom ffmpeg-kit protocols\n" 1>>"${BASEDIR}"/build.log 2>&1
else else
cat ../../tools/protocols/libavformat_file.c >> libavformat/file.c cat ../../tools/protocols/libavformat_file.c >> libavformat/file.c

View File

@ -99,6 +99,7 @@ x86-64-mac-catalyst)
esac esac
CONFIGURE_POSTFIX="" CONFIGURE_POSTFIX=""
HIGH_PRIORITY_LDFLAGS=""
# SET CONFIGURE OPTIONS # SET CONFIGURE OPTIONS
for library in {0..61}; do for library in {0..61}; do
@ -294,6 +295,7 @@ for library in {0..61}; do
expat) expat)
FFMPEG_CFLAGS+=" $(pkg-config --cflags expat 2>>"${BASEDIR}"/build.log)" FFMPEG_CFLAGS+=" $(pkg-config --cflags expat 2>>"${BASEDIR}"/build.log)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static expat 2>>"${BASEDIR}"/build.log)" FFMPEG_LDFLAGS+=" $(pkg-config --libs --static expat 2>>"${BASEDIR}"/build.log)"
HIGH_PRIORITY_LDFLAGS+=" $(pkg-config --libs --static expat 2>>"${BASEDIR}"/build.log)"
;; ;;
libogg) libogg)
FFMPEG_CFLAGS+=" $(pkg-config --cflags ogg 2>>"${BASEDIR}"/build.log)" FFMPEG_CFLAGS+=" $(pkg-config --cflags ogg 2>>"${BASEDIR}"/build.log)"
@ -449,7 +451,7 @@ COMMON_LDFLAGS=$(get_common_ldflags)
# UPDATE BUILD FLAGS # UPDATE BUILD 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 CXXFLAGS=$(get_cxxflags "${LIB_NAME}")
export LDFLAGS="${ARCH_LDFLAGS}${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS} ${OPTIMIZATION_FLAGS}" export LDFLAGS="${ARCH_LDFLAGS}${HIGH_PRIORITY_LDFLAGS}${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS} ${OPTIMIZATION_FLAGS}"
echo -n -e "\n${LIB_NAME}: " echo -n -e "\n${LIB_NAME}: "