Commit 15240feb authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'hexene/scratchpad'

* hexene/scratchpad:
  Move & Rename buildscript, remove tabs
  Fix regular build
  Support (H/W accelerated) H.264 decoding on Android via Stagefright
  Add build-script for Android
  C++ Support ;)

Conflicts:
	Changelog
	Makefile
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/version.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents f27f68eb 9c29ab58
...@@ -51,6 +51,8 @@ easier to use. The changes are: ...@@ -51,6 +51,8 @@ easier to use. The changes are:
- Speex encoder via libspeex - Speex encoder via libspeex
- JSON output in ffprobe - JSON output in ffprobe
- WTV muxer - WTV muxer
- C++ Support
- H.264 Decoding on Android via Stagefright
version 0.8: version 0.8:
......
...@@ -2,13 +2,13 @@ MAIN_MAKEFILE=1 ...@@ -2,13 +2,13 @@ MAIN_MAKEFILE=1
include config.mak include config.mak
vpath %.c $(SRC_PATH) vpath %.c $(SRC_PATH)
vpath %.cpp $(SRC_PATH)
vpath %.h $(SRC_PATH) vpath %.h $(SRC_PATH)
vpath %.S $(SRC_PATH) vpath %.S $(SRC_PATH)
vpath %.asm $(SRC_PATH) vpath %.asm $(SRC_PATH)
vpath %.v $(SRC_PATH) vpath %.v $(SRC_PATH)
vpath %.texi $(SRC_PATH) vpath %.texi $(SRC_PATH)
PROGS-$(CONFIG_FFMPEG) += ffmpeg PROGS-$(CONFIG_FFMPEG) += ffmpeg
PROGS-$(CONFIG_AVCONV) += avconv PROGS-$(CONFIG_AVCONV) += avconv
PROGS-$(CONFIG_FFPLAY) += ffplay PROGS-$(CONFIG_FFPLAY) += ffplay
......
...@@ -10,7 +10,7 @@ ifndef SUBDIR ...@@ -10,7 +10,7 @@ ifndef SUBDIR
ifndef V ifndef V
Q = @ Q = @
ECHO = printf "$(1)\t%s\n" $(2) ECHO = printf "$(1)\t%s\n" $(2)
BRIEF = CC AS YASM AR LD HOSTCC STRIP CP BRIEF = CC CXX AS YASM AR LD HOSTCC STRIP CP
SILENT = DEPCC YASMDEP RM RANLIB SILENT = DEPCC YASMDEP RM RANLIB
MSG = $@ MSG = $@
M = @$(call ECHO,$(TAG),$@); M = @$(call ECHO,$(TAG),$@);
...@@ -27,6 +27,7 @@ IFLAGS := -I. -I$(SRC_PATH)/ ...@@ -27,6 +27,7 @@ IFLAGS := -I. -I$(SRC_PATH)/
CPPFLAGS := $(IFLAGS) $(CPPFLAGS) CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
CFLAGS += $(ECFLAGS) CFLAGS += $(ECFLAGS)
CCFLAGS = $(CFLAGS) CCFLAGS = $(CFLAGS)
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
HOSTCFLAGS += $(IFLAGS) HOSTCFLAGS += $(IFLAGS)
LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS) LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)
...@@ -37,11 +38,15 @@ define COMPILE ...@@ -37,11 +38,15 @@ define COMPILE
endef endef
COMPILE_C = $(call COMPILE,CC) COMPILE_C = $(call COMPILE,CC)
COMPILE_CXX = $(call COMPILE,CXX)
COMPILE_S = $(call COMPILE,AS) COMPILE_S = $(call COMPILE,AS)
%.o: %.c %.o: %.c
$(COMPILE_C) $(COMPILE_C)
%.o: %.cpp
$(COMPILE_CXX)
%.o: %.S %.o: %.S
$(COMPILE_S) $(COMPILE_S)
......
...@@ -179,6 +179,7 @@ External library support: ...@@ -179,6 +179,7 @@ External library support:
--enable-librtmp enable RTMP[E] support via librtmp [no] --enable-librtmp enable RTMP[E] support via librtmp [no]
--enable-libschroedinger enable Dirac support via libschroedinger [no] --enable-libschroedinger enable Dirac support via libschroedinger [no]
--enable-libspeex enable Speex encoding and decoding via libspeex [no] --enable-libspeex enable Speex encoding and decoding via libspeex [no]
--enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
--enable-libtheora enable Theora encoding via libtheora [no] --enable-libtheora enable Theora encoding via libtheora [no]
--enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
--enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
...@@ -205,12 +206,14 @@ Advanced options (experts only): ...@@ -205,12 +206,14 @@ Advanced options (experts only):
--ar=AR use archive tool AR [$ar_default] --ar=AR use archive tool AR [$ar_default]
--as=AS use assembler AS [$as_default] --as=AS use assembler AS [$as_default]
--cc=CC use C compiler CC [$cc_default] --cc=CC use C compiler CC [$cc_default]
--cxx=CXX use C compiler CXX [$cxx_default]
--ld=LD use linker LD --ld=LD use linker LD
--host-cc=HOSTCC use host C compiler HOSTCC --host-cc=HOSTCC use host C compiler HOSTCC
--host-cflags=HCFLAGS use HCFLAGS when compiling for host --host-cflags=HCFLAGS use HCFLAGS when compiling for host
--host-ldflags=HLDFLAGS use HLDFLAGS when linking for host --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
--host-libs=HLIBS use libs HLIBS when linking for host --host-libs=HLIBS use libs HLIBS when linking for host
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
--extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS] --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
--extra-libs=ELIBS add ELIBS [$ELIBS] --extra-libs=ELIBS add ELIBS [$ELIBS]
--extra-version=STRING version string suffix [] --extra-version=STRING version string suffix []
...@@ -582,6 +585,10 @@ add_cflags(){ ...@@ -582,6 +585,10 @@ add_cflags(){
append CFLAGS $($filter_cflags "$@") append CFLAGS $($filter_cflags "$@")
} }
add_cxxflags(){
append CXXFLAGS $($filter_cflags "$@")
}
add_asflags(){ add_asflags(){
append ASFLAGS $($filter_asflags "$@") append ASFLAGS $($filter_asflags "$@")
} }
...@@ -606,6 +613,13 @@ check_cc(){ ...@@ -606,6 +613,13 @@ check_cc(){
check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC
} }
check_cxx(){
log check_cxx "$@"
cat > $TMPCPP
log_file $TMPCPP
check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" -c -o $TMPO $TMPCPP
}
check_cpp(){ check_cpp(){
log check_cpp "$@" log check_cpp "$@"
cat > $TMPC cat > $TMPC
...@@ -641,12 +655,14 @@ check_yasm(){ ...@@ -641,12 +655,14 @@ check_yasm(){
check_ld(){ check_ld(){
log check_ld "$@" log check_ld "$@"
type=$1
shift 1
flags='' flags=''
libs='' libs=''
for f; do for f; do
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f" test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
done done
check_cc $($filter_cflags $flags) || return check_$type $($filter_cflags $flags) || return
check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs
} }
...@@ -666,9 +682,17 @@ int x; ...@@ -666,9 +682,17 @@ int x;
EOF EOF
} }
check_cxxflags(){
log check_cxxflags "$@"
set -- $($filter_cflags "$@")
check_cxx "$@" <<EOF && append CXXFLAGS "$@"
int x;
EOF
}
test_ldflags(){ test_ldflags(){
log test_ldflags "$@" log test_ldflags "$@"
check_ld "$@" <<EOF check_ld "cc" "$@" <<EOF
int main(void){ return 0; } int main(void){ return 0; }
EOF EOF
} }
...@@ -694,7 +718,7 @@ check_func(){ ...@@ -694,7 +718,7 @@ check_func(){
func=$1 func=$1
shift shift
disable $func disable $func
check_ld "$@" <<EOF && enable $func check_ld "cc" "$@" <<EOF && enable $func
extern int $func(); extern int $func();
int main(void){ $func(); } int main(void){ $func(); }
EOF EOF
...@@ -705,7 +729,7 @@ check_mathfunc(){ ...@@ -705,7 +729,7 @@ check_mathfunc(){
func=$1 func=$1
shift shift
disable $func disable $func
check_ld "$@" <<EOF && enable $func check_ld "cc" "$@" <<EOF && enable $func
#include <math.h> #include <math.h>
float foo(float f) { return $func(f); } float foo(float f) { return $func(f); }
int main(void){ return (int) foo; } int main(void){ return (int) foo; }
...@@ -725,7 +749,26 @@ check_func_headers(){ ...@@ -725,7 +749,26 @@ check_func_headers(){
echo "long check_$func(void) { return (long) $func; }" echo "long check_$func(void) { return (long) $func; }"
done done
echo "int main(void) { return 0; }" echo "int main(void) { return 0; }"
} | check_ld "$@" && enable $funcs && enable_safe $headers } | check_ld "cc" "$@" && enable $funcs && enable_safe $headers
}
check_class_headers_cpp(){
log check_class_headers_cpp "$@"
headers=$1
classes=$2
shift 2
{
for hdr in $headers; do
echo "#include <$hdr>"
done
echo "int main(void) { "
i=1
for class in $classes; do
echo "$class obj$i;"
i=$(expr $i + 1)
done
echo "return 0; }"
} | check_ld "cxx" "$@" && enable $funcs && enable_safe $headers
} }
check_cpp_condition(){ check_cpp_condition(){
...@@ -757,6 +800,14 @@ check_lib2(){ ...@@ -757,6 +800,14 @@ check_lib2(){
check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@" check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@"
} }
check_lib_cpp(){
log check_lib_cpp "$@"
headers="$1"
classes="$2"
shift 2
check_class_headers_cpp "$headers" "$classes" "$@" && add_extralibs "$@"
}
check_pkg_config(){ check_pkg_config(){
log check_pkg_config "$@" log check_pkg_config "$@"
pkg="$1" pkg="$1"
...@@ -772,7 +823,7 @@ check_pkg_config(){ ...@@ -772,7 +823,7 @@ check_pkg_config(){
} }
check_exec(){ check_exec(){
check_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } check_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
} }
check_exec_crash(){ check_exec_crash(){
...@@ -852,6 +903,14 @@ require2(){ ...@@ -852,6 +903,14 @@ require2(){
check_lib2 "$headers" $func "$@" || die "ERROR: $name not found" check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
} }
require_cpp(){
name="$1"
headers="$2"
classes="$3"
shift 3
check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
}
require_pkg_config(){ require_pkg_config(){
pkg="$1" pkg="$1"
check_pkg_config "$@" || die "ERROR: $pkg not found" check_pkg_config "$@" || die "ERROR: $pkg not found"
...@@ -947,6 +1006,7 @@ CONFIG_LIST=" ...@@ -947,6 +1006,7 @@ CONFIG_LIST="
librtmp librtmp
libschroedinger libschroedinger
libspeex libspeex
libstagefright_h264
libtheora libtheora
libvo_aacenc libvo_aacenc
libvo_amrwbenc libvo_amrwbenc
...@@ -1183,6 +1243,7 @@ CMDLINE_SET=" ...@@ -1183,6 +1243,7 @@ CMDLINE_SET="
cc cc
cpu cpu
cross_prefix cross_prefix
cxx
dep_cc dep_cc
extra_version extra_version
host_cc host_cc
...@@ -1208,6 +1269,7 @@ CMDLINE_SET=" ...@@ -1208,6 +1269,7 @@ CMDLINE_SET="
CMDLINE_APPEND=" CMDLINE_APPEND="
extra_cflags extra_cflags
extra_cxxflags
" "
# code dependency declarations # code dependency declarations
...@@ -1430,6 +1492,7 @@ libschroedinger_decoder_deps="libschroedinger" ...@@ -1430,6 +1492,7 @@ libschroedinger_decoder_deps="libschroedinger"
libschroedinger_encoder_deps="libschroedinger" libschroedinger_encoder_deps="libschroedinger"
libspeex_decoder_deps="libspeex" libspeex_decoder_deps="libspeex"
libspeex_encoder_deps="libspeex" libspeex_encoder_deps="libspeex"
libstagefright_h264_decoder_deps="libstagefright_h264"
libtheora_encoder_deps="libtheora" libtheora_encoder_deps="libtheora"
libvo_aacenc_encoder_deps="libvo_aacenc" libvo_aacenc_encoder_deps="libvo_aacenc"
libvo_amrwbenc_encoder_deps="libvo_amrwbenc" libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
...@@ -1651,6 +1714,7 @@ shlibdir_default="$libdir_default" ...@@ -1651,6 +1714,7 @@ shlibdir_default="$libdir_default"
# toolchain # toolchain
ar_default="ar" ar_default="ar"
cc_default="gcc" cc_default="gcc"
cxx_default="g++"
cc_version=\"unknown\" cc_version=\"unknown\"
host_cc_default="gcc" host_cc_default="gcc"
install="install" install="install"
...@@ -1715,6 +1779,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' ...@@ -1715,6 +1779,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
AS_O='-o $@' AS_O='-o $@'
CC_O='-o $@' CC_O='-o $@'
CXX_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -O3 -g' host_cflags='-D_ISOC99_SOURCE -O3 -g'
host_libs='-lm' host_libs='-lm'
...@@ -1867,6 +1932,7 @@ set_default arch target_os ...@@ -1867,6 +1932,7 @@ set_default arch target_os
ar_default="${cross_prefix}${ar_default}" ar_default="${cross_prefix}${ar_default}"
cc_default="${cross_prefix}${cc_default}" cc_default="${cross_prefix}${cc_default}"
cxx_default="${cross_prefix}${cxx_default}"
nm_default="${cross_prefix}${nm_default}" nm_default="${cross_prefix}${nm_default}"
pkg_config_default="${cross_prefix}${pkg_config_default}" pkg_config_default="${cross_prefix}${pkg_config_default}"
ranlib="${cross_prefix}${ranlib}" ranlib="${cross_prefix}${ranlib}"
...@@ -1874,7 +1940,7 @@ strip_default="${cross_prefix}${strip_default}" ...@@ -1874,7 +1940,7 @@ strip_default="${cross_prefix}${strip_default}"
sysinclude_default="${sysroot}/usr/include" sysinclude_default="${sysroot}/usr/include"
set_default cc nm pkg_config strip sysinclude set_default cc cxx nm pkg_config strip sysinclude
enabled cross_compile || host_cc_default=$cc enabled cross_compile || host_cc_default=$cc
set_default host_cc set_default host_cc
...@@ -1916,6 +1982,7 @@ tmpfile(){ ...@@ -1916,6 +1982,7 @@ tmpfile(){
trap 'rm -f -- $TMPFILES' EXIT trap 'rm -f -- $TMPFILES' EXIT
tmpfile TMPC .c tmpfile TMPC .c
tmpfile TMPCPP .cpp
tmpfile TMPE $EXESUF tmpfile TMPE $EXESUF
tmpfile TMPH .h tmpfile TMPH .h
tmpfile TMPO .o tmpfile TMPO .o
...@@ -2133,9 +2200,11 @@ test -n "$cc_type" && enable $cc_type || ...@@ -2133,9 +2200,11 @@ test -n "$cc_type" && enable $cc_type ||
set_default ar as dep_cc ld set_default ar as dep_cc ld
test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD
test -n "$CXX_DEPFLAGS" || CXXDEP=$DEPEND_CMD
test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD
add_cflags $extra_cflags add_cflags $extra_cflags
add_cxxflags $extra_cxxflags
add_asflags $extra_cflags add_asflags $extra_cflags
if test -n "$sysroot"; then if test -n "$sysroot"; then
...@@ -2366,6 +2435,7 @@ if test "$?" != 0; then ...@@ -2366,6 +2435,7 @@ if test "$?" != 0; then
fi fi
add_cppflags -D_ISOC99_SOURCE add_cppflags -D_ISOC99_SOURCE
add_cxxflags -D__STDC_CONSTANT_MACROS
check_cflags -std=c99 check_cflags -std=c99
check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64 check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
#include <stdlib.h> #include <stdlib.h>
...@@ -2663,7 +2733,7 @@ elif enabled arm; then ...@@ -2663,7 +2733,7 @@ elif enabled arm; then
elif ! check_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__"; then elif ! check_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__"; then
case "${cross_prefix:-$cc}" in case "${cross_prefix:-$cc}" in
*hardfloat*) enable vfp_args; fpabi=vfp ;; *hardfloat*) enable vfp_args; fpabi=vfp ;;
*) check_ld <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;; *) check_ld "cc" <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;;
__asm__ (".eabi_attribute 28, 1"); __asm__ (".eabi_attribute 28, 1");
int main(void) { return 0; } int main(void) { return 0; }
EOF EOF
...@@ -2932,6 +3002,9 @@ enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg ...@@ -2932,6 +3002,9 @@ enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
media/stagefright/MediaBufferGroup.h media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h
media/stagefright/OMXClient.h media/stagefright/OMXCodec.h" android::OMXClient -lstagefright -lmedia -lutils -lbinder
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc
enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
...@@ -3246,6 +3319,7 @@ echo "libopenjpeg enabled ${libopenjpeg-no}" ...@@ -3246,6 +3319,7 @@ echo "libopenjpeg enabled ${libopenjpeg-no}"
echo "librtmp enabled ${librtmp-no}" echo "librtmp enabled ${librtmp-no}"
echo "libschroedinger enabled ${libschroedinger-no}" echo "libschroedinger enabled ${libschroedinger-no}"
echo "libspeex enabled ${libspeex-no}" echo "libspeex enabled ${libspeex-no}"
echo "libstagefright-h264 enabled ${libstagefright_h264-no}"
echo "libtheora enabled ${libtheora-no}" echo "libtheora enabled ${libtheora-no}"
echo "libvo-aacenc support ${libvo_aacenc-no}" echo "libvo-aacenc support ${libvo_aacenc-no}"
echo "libvo-amrwbenc support ${libvo_amrwbenc-no}" echo "libvo-amrwbenc support ${libvo_amrwbenc-no}"
...@@ -3306,6 +3380,7 @@ endif ...@@ -3306,6 +3380,7 @@ endif
CC_IDENT=$cc_ident CC_IDENT=$cc_ident
ARCH=$arch ARCH=$arch
CC=$cc CC=$cc
CXX=$cxx
AS=$as AS=$as
LD=$ld LD=$ld
DEPCC=$dep_cc DEPCC=$dep_cc
...@@ -3318,9 +3393,11 @@ LN_S=$ln_s ...@@ -3318,9 +3393,11 @@ LN_S=$ln_s
STRIP=$strip STRIP=$strip
CPPFLAGS=$CPPFLAGS CPPFLAGS=$CPPFLAGS
CFLAGS=$CFLAGS CFLAGS=$CFLAGS
CXXFLAGS=$CXXFLAGS
ASFLAGS=$ASFLAGS ASFLAGS=$ASFLAGS
AS_O=$CC_O AS_O=$CC_O
CC_O=$CC_O CC_O=$CC_O
CXX_O=$CXX_O
LDFLAGS=$LDFLAGS LDFLAGS=$LDFLAGS
FFSERVERLDFLAGS=$FFSERVERLDFLAGS FFSERVERLDFLAGS=$FFSERVERLDFLAGS
SHFLAGS=$SHFLAGS SHFLAGS=$SHFLAGS
...@@ -3337,6 +3414,7 @@ EXESUF=$EXESUF ...@@ -3337,6 +3414,7 @@ EXESUF=$EXESUF
EXTRA_VERSION=$extra_version EXTRA_VERSION=$extra_version
DEPFLAGS=$DEPFLAGS DEPFLAGS=$DEPFLAGS
CCDEP=$CCDEP CCDEP=$CCDEP
CXXDEP=$CXXDEP
ASDEP=$ASDEP ASDEP=$ASDEP
CC_DEPFLAGS=$CC_DEPFLAGS CC_DEPFLAGS=$CC_DEPFLAGS
AS_DEPFLAGS=$AS_DEPFLAGS AS_DEPFLAGS=$AS_DEPFLAGS
......
...@@ -594,6 +594,7 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \ ...@@ -594,6 +594,7 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
libdirac_libschro.o libdirac_libschro.o
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
OBJS-$(CONFIG_LIBSTAGEFRIGHT_H264_DECODER)+= libstagefright.o
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
......
...@@ -382,6 +382,7 @@ void avcodec_register_all(void) ...@@ -382,6 +382,7 @@ void avcodec_register_all(void)
REGISTER_DECODER (LIBOPENJPEG, libopenjpeg); REGISTER_DECODER (LIBOPENJPEG, libopenjpeg);
REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger); REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger);
REGISTER_ENCDEC (LIBSPEEX, libspeex); REGISTER_ENCDEC (LIBSPEEX, libspeex);
REGISTER_DECODER (LIBSTAGEFRIGHT_H264, libstagefright_h264);
REGISTER_ENCODER (LIBTHEORA, libtheora); REGISTER_ENCODER (LIBTHEORA, libtheora);
REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc); REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc);
REGISTER_ENCODER (LIBVO_AMRWBENC, libvo_amrwbenc); REGISTER_ENCODER (LIBVO_AMRWBENC, libvo_amrwbenc);
......
This diff is collapsed.
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define AVCODEC_VERSION_H #define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53 #define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 13 #define LIBAVCODEC_VERSION_MINOR 14
#define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
#!/bin/bash
if [ "$NDK" = "" ]; then
echo NDK variable not set, assuming ${HOME}/android-ndk
export NDK=${HOME}/android-ndk
fi
SYSROOT=$NDK/platforms/android-9/arch-arm
# Expand the prebuilt/* path into the correct one
TOOLCHAIN=`echo $NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/*-x86`
export PATH=$TOOLCHAIN/bin:$PATH
ANDROID_SOURCE=$HOME/android
ANDROID_LIBS=$HOME/glib
rm -rf ../build/libav
mkdir -p ../build/libav
DEST=../build/libav
FLAGS="--target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm --cpu=armv7-a"
FLAGS="$FLAGS --sysroot=$SYSROOT"
FLAGS="$FLAGS --disable-avdevice --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-libstagefright-h264"
EXTRA_CFLAGS="-I$ANDROID_SOURCE/frameworks/base/include -I$ANDROID_SOURCE/system/core/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/media/libstagefright"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/include/media/stagefright/openmax"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$NDK/sources/cxx-stl/system/include"
EXTRA_CFLAGS="$EXTRA_CFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8 -L$ANDROID_LIBS -Wl,-rpath-link,$ANDROID_LIBS"
EXTRA_CXXFLAGS="-Wno-multichar -fno-exceptions -fno-rtti"
ABI="armeabi-v7a"
DEST="$DEST/$ABI"
FLAGS="$FLAGS --prefix=$DEST"
mkdir -p $DEST
echo $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" --extra-cxxflags="$EXTRA_CXXFLAGS" > $DEST/info.txt
./configure $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" --extra-cxxflags="$EXTRA_CXXFLAGS" | tee $DEST/configuration.txt
[ $PIPESTATUS == 0 ] || exit 1
make clean
make -j4 || exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment