Skip to content

Commit

Permalink
Customizing build scripts for WhatTheCodec app
Browse files Browse the repository at this point in the history
  • Loading branch information
Javernaut committed Apr 8, 2020
1 parent 7406393 commit 734a4e9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ install:
- curl http://archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.14.02-1_amd64.deb --output $HOME/nasm_2.14.02-1_amd64.deb
- sudo dpkg -i $HOME/nasm_2.14.02-1_amd64.deb
script:
- bash -e ffmpeg-android-maker.sh --enable-libdav1d --enable-libmp3lame --enable-libaom --android-api-level=18
- bash -e ffmpeg-android-maker.sh --enable-libdav1d --enable-libmp3lame --enable-libaom
19 changes: 19 additions & 0 deletions scripts/ffmpeg/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env bash

case $ANDROID_ABI in
armeabi-v7a)
EXTRA_BUILD_CONFIGURATION_FLAGS=--enable-thumb
;;
x86)
# Disabling assembler optimizations, because they have text relocations
EXTRA_BUILD_CONFIGURATION_FLAGS=--disable-asm
Expand All @@ -21,6 +24,9 @@ done
DEP_CFLAGS="-I${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/include"
DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS"

# Everything that goes below ${EXTRA_BUILD_CONFIGURATION_FLAGS} is my project-specific.
# You are free to enable/disable whatever you actually need.

./configure \
--prefix=${BUILD_DIR_FFMPEG}/${ANDROID_ABI} \
--enable-cross-compile \
Expand All @@ -35,6 +41,19 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS"
--disable-static \
--pkg-config=$(which pkg-config) \
${EXTRA_BUILD_CONFIGURATION_FLAGS} \
--disable-runtime-cpudetect \
--disable-programs \
--disable-muxers \
--disable-encoders \
--disable-avdevice \
--disable-postproc \
--disable-swresample \
--disable-avfilter \
--disable-doc \
--disable-debug \
--disable-pthreads \
--disable-network \
--disable-bsfs \
$ADDITIONAL_COMPONENTS

${MAKE_EXECUTABLE} clean
Expand Down
1 change: 1 addition & 0 deletions scripts/libaom/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ${CMAKE_EXECUTABLE} .. \
-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS_DIR}/libaom/android.cmake \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DCONFIG_PIC=1 \
-DCONFIG_AV1_ENCODER=0 \
-DCONFIG_RUNTIME_CPU_DETECT=0 \
-DENABLE_TESTS=0 \
-DENABLE_DOCS=0 \
Expand Down

0 comments on commit 734a4e9

Please sign in to comment.