media/extensions/flac
olly 78cdd08684 Add some missing @param Javadoc to extensions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164105607
2017-08-03 14:45:45 +01:00
..
src Add some missing @param Javadoc to extensions 2017-08-03 14:45:45 +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 Update READMEs with new local build instructions 2017-06-28 22:26:05 +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