美文网首页
mac android ffmpeg4.0.1

mac android ffmpeg4.0.1

作者: OK2018 | 来源:发表于2018-07-17 16:44 被阅读0次

    修改configure文件

    # SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
    # LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
    # SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
    # SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
    SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'  
    LIB_INSTALL_EXTRA_CMD='$$(RANLIB)"$(LIBDIR)/$(LIBNAME)"'  
    SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'  
    SLIB_INSTALL_LINKS='$(SLIBNAME)'
    

    新建build_android.sh

    #!/bin/bash
    NDK=/Users/liujx/android-ndk-r10e
    SYSROOT=$NDK/platforms/android-21/arch-arm/
    CPU=armv7-a
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
    PREFIX=$(pwd)/android/$CPU
    ADDI_CFLAGS="-marm"
    OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "
    
    function build_android
    {
    ./configure \
    --prefix=$PREFIX \
    --enable-neon \
    --enable-hwaccels \
    --enable-shared \
    --enable-jni \
    --enable-mediacodec \
    --enable-decoder=h264_mediacodec \
    --disable-static \
    --disable-doc \
    --enable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --enable-avdevice \
    --disable-doc \
    --disable-symver \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --target-os=android \
    --arch=arm \
    --cpu=armv7-a \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
    --extra-ldflags="$ADDI_LDFLAGS" \
    $ADDITIONAL_CONFIGURE_FLAG
    }
    build_android
    
    

    chmod 777 build_android.sh

    ./build_android.sh

    make j2
    make install

    相关文章

      网友评论

          本文标题:mac android ffmpeg4.0.1

          本文链接:https://www.haomeiwen.com/subject/gfrgpftx.html