media/extensions/flac
olly 40f34956a8 Bump minimum and target API levels + support lib version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164863447
2017-08-11 15:01:43 +01:00
..
src Bump minimum and target API levels + support lib version 2017-08-11 15:01:43 +01:00
build.gradle Make it easier to use ExoPlayer modules in other projects II 2017-06-28 22:26:05 +01:00
proguard-rules.txt Keep FlacStreamInfo unobfuscated as it is accessed from native methods 2017-02-15 16:54:16 +00:00
README.md Clean up extension READMEs 2017-08-07 11:54:21 +01:00

ExoPlayer Flac extension

Description

The Flac extension is a Renderer implementation that helps you bundle libFLAC (the Flac decoding library) into your app and use it along with ExoPlayer to play Flac audio on Android devices.

Build instructions

To use this extension you need to clone the ExoPlayer repository and depend on its modules locally. Instructions for doing this can be found in ExoPlayer's top level README. In addition, it's necessary to build the extension's native components as follows:

  • Set the following environment variables:
cd "<path to exoplayer checkout>"
EXOPLAYER_ROOT="$(pwd)"
FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"
  • Download the Android NDK and set its location in an environment variable:
NDK_PATH="<path to Android NDK>"
  • Download and extract flac-1.3.1 as "${FLAC_EXT_PATH}/jni/flac" folder:
cd "${FLAC_EXT_PATH}/jni" && \
curl http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz | tar xJ && \
mv flac-1.3.1 flac
  • Build the JNI native libraries from the command line:
cd "${FLAC_EXT_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4