From b9582c6beea6e14da180f32a6d0d90197d0783a5 Mon Sep 17 00:00:00 2001 From: xufulong <839789740@qq.com> Date: Thu, 13 Sep 2018 21:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89idea=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/compiler.xml | 22 ------ .idea/copyright/profiles_settings.xml | 3 - .idea/gradle.xml | 19 ----- .idea/markdown-navigator.xml | 72 ------------------- .../markdown-navigator/profiles_settings.xml | 3 - .idea/misc.xml | 33 --------- .idea/modules.xml | 12 ---- .idea/runConfigurations.xml | 12 ---- .idea/vcs.xml | 6 -- build_ffmpeg_onelib.sh | 53 ++++++++++++++ 10 files changed, 53 insertions(+), 182 deletions(-) delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/markdown-navigator.xml delete mode 100644 .idea/markdown-navigator/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/vcs.xml create mode 100644 build_ffmpeg_onelib.sh 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 ..