diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 7912152..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml deleted file mode 100644 index dbe0e46..0000000 --- a/.idea/markdown-navigator.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml deleted file mode 100644 index 57927c5..0000000 --- a/.idea/markdown-navigator/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index ba7052b..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 7676871..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/build_ffmpeg_onelib.sh b/build_ffmpeg_onelib.sh new file mode 100644 index 0000000..9d4b4c3 --- /dev/null +++ b/build_ffmpeg_onelib.sh @@ -0,0 +1,53 @@ +cd ffmpeg + +make clean + +archbit=32 + +#=========================== +if [ $archbit -eq 32 ];then +echo "build for 32bit" +#32bit +abi='armeabi' +cpu='arm' +arch='arm' +android='androideabi' +else +#64bit +echo "build for 64bit" +abi='arm64-v8a' +cpu='aarch64' +arch='arm64' +android='android' +fi + +export NDK=/home/frank/android/android-ndk-r10e +export PREBUILT=$NDK/toolchains/$cpu-linux-$android-4.9/prebuilt +export PLATFORM=$NDK/platforms/android-21/arch-$cpu +export PREFIX=../ff-onelib + +build_one(){ + ./configure --target-os=linux --prefix=$PREFIX \ +--enable-cross-compile \ +--enable-runtime-cpudetect \ +--arch=$cpu \ +--cc=$PREBUILT/linux-x86_64/bin/$cpu-linux-$android-gcc \ +--cross-prefix=$PREBUILT/linux-x86_64/bin/$cpu-linux-$android- \ +--disable-stripping \ +--nm=$PREBUILT/linux-x86_64/bin/$cpu-linux-$android-nm \ +--sysroot=$PLATFORM \ +--enable-gpl --enable-static --disable-shared --enable-nonfree --enable-version3 --enable-small \ +--enable-neon --enable-mediacodec --enable-asm \ +--enable-zlib --disable-ffprobe --disable-ffplay --enable-ffmpeg --disable-debug \ +--enable-jni \ +--extra-cflags="-fpic -mfpu=neon -mcpu=cortex-a8 -mfloat-abi=softfp -marm -march=armv7-a" +} +#march=armv7-a +build_one + +make +make install + +$PREBUILT/linux-x86_64/bin/$cpu-linux-$android-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib -soname libffmpeg.so -shared -nostdlib -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libswresample/libswresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a libpostproc/libpostproc.a libavdevice/libavdevice.a -lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker $PREBUILT/linux-x86_64/lib/gcc/$cpu-linux-$android/4.9/libgcc.a + +cd ..