Android
  • Introduction
  • Android Studio
    • AS的项目结构
    • adb
    • aapt
    • dx
    • Gradle
    • Kotlin on android
  • Smaller
  • decompiler
  • MISC
  • 框架 framework
  • 设计模式
  • dex
  • reinforce加固
  • code
    • Java Tips
      • 负数 negative
      • The Java Tutorials
        • 原始数据类型 Primitive Data Types
      • 运算符
        • 一元运算符
        • 算术运算符
        • 移位运算符
        • 关系运算符
      • 逻辑运算符
        • 逻辑 非 ! 关系值表
        • 逻辑 与 && 关系值表
        • 逻辑 或 || 关系值表
        • 与 & And
        • 或 | Or
        • 非 ~ Nor
        • 异或 ^ Xor
        • 赋值运算符
        • tips
      • == equals
      • Try Catch finally
        • 有意思的东西
      • String、StringBuilder、StringBuffer区别
      • inner classes、nested static classes
    • runtime_memory
    • javaStackTrace
    • Guava
    • FFMPEG
    • GoogleSamples
    • Full Kotlin Reference
    • release屏蔽Log代码
    • Thread
  • ANR
  • 注解改进代码检查
Powered by GitBook
On this page

Was this helpful?

  1. code

FFMPEG

PreviousGuavaNextGoogleSamples

Last updated 5 years ago

Was this helpful?

官方有基础的ndk build jni的所有基础用法。

  1. build ffmpeg for android

    1. download resource >

    2. create build.sh

      touch $FFMPEG_dir/build.sh

      #!/bin/bash
      cd ffmpeg
      export TMPDIR=/Users/jiek/workspace/ffmpeg/tempdir
      NDK=/Users/Shared/sdk/ndk-bundle
      SYSROOT=$NDK/platforms/android-16/arch-arm/
      TOOLCHAIN=/Users/Shared/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
      CPU=arm
      PREFIX=/Users/jiek/workspace/ffmpeg/output
      ADDI_CFLAGS="-marm"
      function build_one
      {
      ./configure \
         --prefix=$PREFIX \
         --enable-shared \
         --disable-static \
         --disable-doc \
         --disable-ffmpeg \
         --disable-ffplay \
         --disable-ffprobe \
         --disable-ffserver \
         --disable-doc \
         --disable-symver \
         --enable-small \
         --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
         --target-os=linux \
         --arch=arm \
         --enable-cross-compile \
         --sysroot=$SYSROOT \
         --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
         --extra-ldflags="$ADDI_LDFLAGS" \
         $ADDITIONAL_CONFIGURE_FLAG
      make clean
      make
      make install
      }
      build_one
      cd ../
    3. run build

      $ ./build.sh output a number of SO files in $PREFIX folder.

  2. build android project Env.

    1. Use Android studio 2.3 IDE

    2. checked include C++ support.

googlesamples
https://ffmpeg.org/download.html#releases